Reply
Highlighted
Member
Posts: 254
Registered: ‎06-10-2014
Kudos: 130
Solutions: 3
Accepted Solution

Change cloudkey port

Does anyone know how to change the cloudkey ports??

Ubiquiti Certified - UCWA

Accepted Solutions
Senior Member
Posts: 16,238
Registered: ‎08-04-2017
Kudos: 2975
Solutions: 801

Re: Change cloudkey port

Hello @smtharrison,

 

You will need to edit the NGINX ports, sorry for the confusion.

/etc/nginx

I personally haven't tested it. (I'm not in a position to test it sorry)

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W 3x • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2-PLUS • UCK-G2 • UCK

View solution in original post

Member
Posts: 254
Registered: ‎06-10-2014
Kudos: 130
Solutions: 3

Re: Change cloudkey port

Got it changed.  Thanks Glen!

 

FYI for those interested:

 

you need to edit  /etc/nginx/sites-available/default

 

change the following from 80 to whatever port you want to use (8082 in my example).

 

server {
listen 8082 default_server;
listen [::]:8082 default_server;

 

Then edit /etc/nginx/sites-available/cloudkey-webui

 

change the following from 80 to whatever for http (8082 in my example)

 

server {
            listen [::]:8082 ipv6only=off;

 

then further down, change the following from 443 to whatever for https (843 in my example)

 

server {
            listen [::]:843 ssl ipv6only=off;

 

Reboot CloudKey (/sbin/shutdown -r now)

 

For me this did break the cloudkey login.  Simple fix... see here:

 

https://community.ubnt.com/t5/UniFi-Wireless/Cannot-log-in-to-Cloud-Key-WebUI/td-p/1766902

 

Now I should be able to change the unifi ports.  WIll try that now.

 

Ubiquiti Certified - UCWA

View solution in original post


All Replies
Member
Posts: 133
Registered: ‎06-08-2015
Kudos: 30
Solutions: 3

Re: Change cloudkey port

[ Edited ]

Hey smtharrison,

 

Have you seen this support document here.... I think this has all the dirt..

https://help.ubnt.com/hc/en-us/articles/204910084-UniFi-Change-Default-Ports-for-Controller-and-UAPs

 

https://help.ubnt.com/hc/en-us/articles/115000169007-UniFi-Port-Requirements-for-Cloud-Key

 

 

If not, I have no idea where to start!

 

Cheers,

E

Today's dilemma: How long after walking into someone's house is it acceptable to ask for their WiFi password?
Member
Posts: 254
Registered: ‎06-10-2014
Kudos: 130
Solutions: 3

Re: Change cloudkey port

[ Edited ]
  • I know how to change the Unifi ports, but I’m not sure what will happen if I do it on a cloud key.  When you call up a cloud key, it answers on port 80 and 443 where you can select the Unifi controller or cloud key config.  If I change the Unifi management port to port 80 and 443, I would think it would conflict.
Ubiquiti Certified - UCWA
Member
Posts: 254
Registered: ‎06-10-2014
Kudos: 130
Solutions: 3

Re: Change cloudkey port

Poked around, but can't seem to find any cloud key file to change the ports, just the usual unifi system.properties.  @UBNT-MikeD ?

Ubiquiti Certified - UCWA
Member
Posts: 133
Registered: ‎06-08-2015
Kudos: 30
Solutions: 3

Re: Change cloudkey port

I see what you're saying, yeah. I'm not the guy that knows definitively unfortunately. I'm curious to know the answer...hope someone jumps in.
Today's dilemma: How long after walking into someone's house is it acceptable to ask for their WiFi password?
Senior Member
Posts: 16,238
Registered: ‎08-04-2017
Kudos: 2975
Solutions: 801

Re: Change cloudkey port

[ Edited ]

Hello @smtharrison,

 

Yup, edit the system.properties file.

I would recommend stopping the UniFi service when you're editing.

service unifi stop

Either remove the # on the other lines or add these.

## device inform
unifi.http.port=8080
## controller UI / API
unifi.https.port=8443
## portal redirect port for HTTP
portal.http.port=8880
## portal redirect port for HTTPs
portal.https.port=8843
## local-bound port for DB server
unifi.db.port=27117
## UDP port used for STUN
unifi.stun.port=3478

Just change the port numbers to your likings, after the changes start the service

service unifi start

 

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W 3x • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2-PLUS • UCK-G2 • UCK
Member
Posts: 254
Registered: ‎06-10-2014
Kudos: 130
Solutions: 3

Re: Change cloudkey port

Glen, I have done this before running my on controllers, however this is a cloud key.  I do not see how to change the cloud key port (which is  port 80 and 443by default).

Ubiquiti Certified - UCWA
Senior Member
Posts: 16,238
Registered: ‎08-04-2017
Kudos: 2975
Solutions: 801

Re: Change cloudkey port

Hello @smtharrison,

 

You will need to edit the NGINX ports, sorry for the confusion.

/etc/nginx

I personally haven't tested it. (I'm not in a position to test it sorry)

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W 3x • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2-PLUS • UCK-G2 • UCK
Member
Posts: 254
Registered: ‎06-10-2014
Kudos: 130
Solutions: 3

Re: Change cloudkey port

Ahh... that gives me something to play with.  Thank you!  Will let you know how it goes

Ubiquiti Certified - UCWA
Established Member
Posts: 1,613
Registered: ‎11-12-2015
Kudos: 443
Solutions: 46

Re: Change cloudkey port

Just curious - why?

 

I understand when you are installing  on your own server that has conflicting demands for ports. But that isn't an issue with the CK.

 

Member
Posts: 254
Registered: ‎06-10-2014
Kudos: 130
Solutions: 3

Re: Change cloudkey port

Because I want unifi mgmt at https://unifi.domain.com

 

I have a school district I manage a multi site unifi server on (Linux).  I have folks that would never remember to add :8443, and they would always call to remind them the url.  When I changed the unifi mgmt port to 443, those calls pretty much ceased.  Would like to do the same with a cloud key.

Ubiquiti Certified - UCWA
Member
Posts: 254
Registered: ‎06-10-2014
Kudos: 130
Solutions: 3

Re: Change cloudkey port

Got it changed.  Thanks Glen!

 

FYI for those interested:

 

you need to edit  /etc/nginx/sites-available/default

 

change the following from 80 to whatever port you want to use (8082 in my example).

 

server {
listen 8082 default_server;
listen [::]:8082 default_server;

 

Then edit /etc/nginx/sites-available/cloudkey-webui

 

change the following from 80 to whatever for http (8082 in my example)

 

server {
            listen [::]:8082 ipv6only=off;

 

then further down, change the following from 443 to whatever for https (843 in my example)

 

server {
            listen [::]:843 ssl ipv6only=off;

 

Reboot CloudKey (/sbin/shutdown -r now)

 

For me this did break the cloudkey login.  Simple fix... see here:

 

https://community.ubnt.com/t5/UniFi-Wireless/Cannot-log-in-to-Cloud-Key-WebUI/td-p/1766902

 

Now I should be able to change the unifi ports.  WIll try that now.

 

Ubiquiti Certified - UCWA
Member
Posts: 254
Registered: ‎06-10-2014
Kudos: 130
Solutions: 3

Re: Change cloudkey port

limited seccess.  when i chnage the unifi system.properties file from the default ports, i get no response (after starting and stopping services).  CK page answers with the new ports.  

Ubiquiti Certified - UCWA
Reply