Upgrade UniFi Controller as a service
https://www.mcbsys.com/blog/2017/12/upgrade-unifi-controller-running-as-a-service/
Ubiquiti provides instructions here for running the UniFi Controller as a service. What they don’t tell you is that when you try to upgrade the controller, you can’t, because the service is still running. Here are the instructions for that:
1. Back up your config from Settings > Maintenance > Download Backup. If that doesn’t work from remote access, try it from a browser on the LAN. If _that_ doesn’t work, go to Settings > Auto Backup and download the most recent backup.
2. On the server running the controller, open an administrative Command Prompt. Stop the UniFi Java service:
cd "%UserProfile%\Ubiquiti UniFi\"
java -jar lib\ace.jar stopsvc
3. Overinstall the new controller (run UniFi-installer.exe). On the last page of the install wizard, check “Start UniFi Controller after installation”.
4. In the small window that opens, wait until it says “UniFi Controller (x.xx.xx) started”:
Close the window (do not launch browser).
5. Back at the administrative Command Prompt, install and start the service:
java -jar lib\ace.jar installsvc
java -jar lib\ace.jar startsvc
6. Test access from a brows