Support Downloads Community

UniFi Video is an obsolete product line.

This application and its related devices will no longer receive any manner of technical support, including functional and security updates. Additionally, there will be no further updates to Help Center content pertaining to UniFi Video.

UniFi - Advanced: Changing Default Ports


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

Back to Top

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:

  1. Close any instances of the UniFi Network application.
  2. Modify the file accordingly—the file can be found in the directory <unifi_base>/data/ See this article for more on <unifi_base>, and this article for information on the file.
  3. Make sure all ports needed by UniFi are available (see this article).
  4. Restart UniFi.
ATTENTION:Make sure there are no leading or trailing spaces, comments, or other characters like hash tags (#) on any custom lines as UniFi Network will ignore the customizations if there are.

Example (Windows)

Back to Top

  1. Run "netstat -ano" command in the command line.
  2. Locate the PID (process identifiers) for the mentioned port in use.
  3. Open task manager, select view and select columns, put a check for PID.
  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.
NOTE: If the UniFi Network application has never been run, the file won't exist yet. The application must be launched to generate it.

Log Files Location

Back to Top

Log files will be essential for any troubleshooting performed. 

NOTE: If your application is running on a Unix/Linux based system, then you will require superuser (sudo) privileges to access these log files. Unfamiliar with sudo? This external article might help.

User Tips & Notes

Back to Top

  • 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 file 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.).
  • In current versions, UniFi Network does not run as root. This means that you cannot bind to privileged ports (<1024). The application will fail to start if you try to use these ports.

Related Articles

Back to Top

UniFi - File Explanation

UniFi - Ports Used

UniFi - Where is <unifi_base>?

Was this article helpful?
77 out of 165 found this helpful