This article describes how to change ports from their default assignments. Find the different default ports in our UniFi - Ports Used article.
Table of Contents
- Steps - How to Change Ports
- Example (Windows)
- Log Files Location
- Video Tutorial
- User Tips & Notes
- Related Articles
Steps - How to Change Ports
UniFi gives operators the freedom to change 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:
- Close any instances of UniFi Network Controller software.
- Modify the file
system.propertiesaccordingly—the file can be found in the directory
<unifi_base>/data/system.properties. See this article for more on
<unifi_base>, and this article for information on the
- Make sure all ports needed by UniFi are available (see this article).
- Restart UniFi.
"netstat -ano"command in the command line.
- Locate the PID (process identifiers) for the mentioned port in use.
- Open task manager, select view and select columns, put a check for PID.
- Check the process corresponding to the PID located for the port during step 2.
- End the process if it is possible.
- If not possible go on the location <unifi_base>/data and open the system file with word or notepad.
- 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=8081to something like
unifi.shutdown.port=8089assuming port 8089 was not already in use.
java -jar /usr/lib/unifi/lib/ace.jar discover
Log Files Location
Log files will be essential for any troubleshooting performed.
- Please reference How to View Log Files
sudo) privileges to access these log files. Unfamiliar with
sudo? This external article might help.
User Tips & Notes
- As mentioned in the warning above, if you customize any ports or system variables you need to make sure there are no comments (#), or extra characters leading or trailing on the line. If the variable you want to customize is in the commented section it is recommended that you copy just the variable, paste it below the commented section and customize as needed.
- If you're modifying the
system.propertiesfile on a Unix/Linux system, please note that it will require super user (sudo) privileges to edit the file. There are no special requirements other than that, so you can use your preferred text editor (vi, emacs, nano, etc.).
- Since UniFi Network Controller version 5.6.x the UniFi service does not run as root. This means that you cannot bind to privileged ports (<1024). The controller will fail to start if you try to use these ports.