Ubiquiti UniFi – Run the Network Application as a Windows Service

Windows services are often useful since they are background applications that don’t require any attention from the end-user. The service launches upon startup, without any intervention from the user. The service is a direct replacement for running the Network application manually (via the icon or a scheduled task), so there is no need to run the UniFi Network application if it is being run as a Windows service.

This article describes how to set up the UniFi Network application to run as a Windows service, and how to update it when it’s running this way.NOTES & REQUIREMENTS:

  • Applicable to the latest UniFi application versions for Windows.
  • This article applies to UniFi applications that are installed on Windows Desktop (Windows 10) and not Windows Server versions.
  • It is recommended to only install the x64 version of Java 8 for the UniFi Cloud Access Portal to work properly.
  • Make sure to allow the ports used by the UniFi application through the Windows Firewall. See the UniFi – Ports Used article for more information. 

How to set up the UniFi Network application as a Windows Service

ATTENTION: It is recommended to only install the x64 version of Java 8 for the UniFi Cloud Access Portal to work properly. However, older versions of the Network application may require both x64 and x86 Java to be installed on a Windows x64 system.

1. Close any instances of the UniFi Network application on the computer. If the UniFi Network application was just installed, make sure to open the application manually at least once, or let it run at the end of the wizard. Once you see the message UniFi Network application (a.b.c) started, the application may be closed.CLI:Open an administrative Windows Command Prompt (CMD) window.

2. Change the directory to the location of UniFi installation.

cd "%UserProfile%\Ubiquiti UniFi\"

Click to copy

3. Once in the root of the UniFi folder, run the following command to install the UniFi Network application service:

java -jar lib\ace.jar installsvc

Click to copy

4. Wait for the installation to complete, indicated by the Complete Installation log message.

5. Start the service with the command below: 

java -jar lib\ace.jar startsvc

Click to copy

6. Open a browser and navigate to the application’s IP address or https://localhost:8443.

How to upgrade a UniFi Network application that is running as a Windows Service

1. Create a backup of your Network application.CLI:Open an administrative Windows Command Prompt (CMD) window.

2. Change the directory to the location of UniFi installation.

cd "%UserProfile%\Ubiquiti UniFi\"

Click to copy

3. Once in the root of the UniFi folder, issue the following to uninstall the Network application service:

java -jar lib\ace.jar uninstallsvc

Click to copy

4. Wait for the service uninstall process to complete. 

5. Launch the Network application and update it through the Settings section. Alternatively, download the latest installation file from the Downloads section.

6. Repeat the steps from the section above after the new Network application version is installed.

Source :
https://help.ui.com/hc/en-us/articles/205144550-UniFi-Run-the-Network-Application-as-a-Windows-Service