UniFi - Change default ports for controller and UAPs

by Ubiquiti Employee on ‎03-11-2013 09:46 AM - edited 3 weeks ago (75,244 Views)

Overview


Readers will learn the default ports used by UniFi controller and how to change them. By default, the UniFi controller will operate on the following ports:

  • unifi.shutdown.port=8081 (used for management purposes)
  • unifi.http.port=8080 (port for UAP to inform controller)
  • unifi.https.port=8443 (port for controller GUI / API, as seen in web browser)
  • portal.http.port=8880 (port for HTTP portal redirect)
  • portal.https.port=8843 (port for HTTPS portal redirect)
  • unifi.db.port=27117 (local-bound port for DB server)

Note: In version 4.5.2 and later, users can also define the port assigned to STUN services, for scenarios where two or more separate UniFi instances are desired on the same controller machine.

  • unifi.stun.port=3478 # UDP port used for STUN

Note: Since v3.2.9+ and v4.6.0+, two more ports are being reserved for device redirector. There is no need to open firewall for these ports on controller, however, on controller, avoid to use these ports.

  • port 8881 for redirector port for wireless clients
  • port 8882 for redirector port for wired clients

Steps


UniFi gives operators the freedom to change these ports from their default assignments. By using a network utility (netstat, etc.), users can determine which ports are in use/opened/closed. The steps are outlined below:

  1. Close any instances of UniFi software running on controller(s)
  2. Modify the file system.properties accordingly—the file can be found in the directory <unifi_base>/data/system.properties
  3. Make sure all ports needed by UniFi are available
  4. Restart UniFi

IMPORTANT: Make sure not to place any spaces, comments, or other characters after any of the custom lines as the controller will ignore your customizations if you do so.

 

Example (Windows)


  1. Run “netstat – ano” command in the command line.
  2. Locate the PID for the mentioned port in use.
  3.  Open task manager and select view and select columns , put a check for PID (process identifiers)
  4. Check the process corresponding to the PID located for the port during step 2.
  5. End the process if it is possible.
  6. If not possible go on the location <unifi_base>/data and open the system file with word or notepad.
  7. Modify this file to change the port that was in use.  For example if port 8081 was in use you would modify the line "unifi.shutdown.port=8081" to something like "unifi.shutdown.port=8089" assuming port 8089 was not already in use.

Video tutorial


Note: The following video is based on v2.x, however, the system.properties file still rests in the same directory "<unifi_base>/data/system.properties"  in v3.x (current) and v4.x (future).

 

FCC Compliance Information
For information on compliance with FCC rules and requirements, please read this: FCC Compliance Information
Disclaimer
The articles in the knowledge base are voluntarily provided by community members, and Ubiquiti Networks makes no guarantee of the validity of this content.