Upgrading a UniFi Controller when it’s running as a service and located elsewhere.

We don’t have a cloud key as we have more devices than recommended, so I run it on a Windows server. I have the installation in the Program Files folder as our servers are configured to delete user profiles older than 30 days (to keep things tidy) as the default (and only) place to install the controller software is under the %USERPROFILE% directory. Then I have the software running as a service so that I don’t have to keep an active desktop session open for it to do its job.

Madness. Honestly these two things are probably super easy for UBNT to fix, but they don’t. Presumably to keep people buying their hardware. But I digress…

It’s super easy to run the controller as a service. It’s a very simple command. It’s also very easy to move the installation to another directory, it’s a simple copy/paste.

But, when the time comes to update the controller it’s more of a faff then it really should be.

Create a backup of the controller and save it in a safe place.

To begin with, ‘uninstall’ the service, open the Unifi folder and run:

Run the installer using the default options. Then when it asks you to start the controller untick the box and close the window. Navigate to %USERPROFILE%/ and copy the Ubiquiti Unifi folder over to C:\Program Files overwriting the existing files.

Open the folder and run:

This will ‘install’ and start the service.

Next, navigate to the webui and restore from a previous backup. Select the backup you made earlier.

Voila you’re done! It might take some time to figure itself out, but all your devices should re-appear and re-provision.

Related Post