Unifi Controller Upgrade on Debian-Based Linux

In my environment, I am running my Unifi controller on a Linode Nanode VPS running Ubuntu 16.04 LTS.

Backup the current controller settings

Before updating the controller, you must ensure that there is a current backup of the controller settings. Since I am running my controller on a Linode VPS, I also have automatic backups enabled. If the controller update fails, rolling the server back to the previous day’s backup on Linode will be the easiest way to get the controller back up and running. However, it’s best to make sure you also have a backup of the controller itself. 

To backup the controller settings, simply navigate to the controller, then head to Settings > Maintenance > Backup. You will be presented with the option to simply backup the controller settings, or the settings along with various lengths of historical data. For our purposes, it’s best to simply back up the settings (The more data you backup, the longer it will take to download the backup).

 

 

The resulting backup file will be named something similar to 5.10.12-20190211-1236.unf. Should the controller update fail, you can rebuild a new controller, and restore this *.unf backup file.

Download the controller update/install file from UBNT

You can download the Unifi controller update/install file directly from the UBNT website. The first step is to navigate to the UBNT website and find the URL for the *.deb file. Under the Software section, look for the Unifi Network Controller *** for Debian/Ubuntu Linux and Unifi Cloud Key, then click the download button. Accept the ULA and you will be presented with the URL for the download.

Rather than downloading it here, we will return the the controller server and download directly. At the time of this writing, we are on controller version 5.10.12. The following command reflects that, but can be altered for the current version. Run the command…

wget https://dl.ubnt.com/unifi/5.10.12/unifi_sysvinit_all.deb

This will download the installer into the current directory.

Run the installer/updater

While still in the same directory that you downloaded the installer into, run the command…

sudo dpkg -i unifi_sysvinit_all.deb

This will begin the installation/update process. You will be asked if you have created a backup. Since we already did this, go ahead and hit Return to say yes. The update will finish soon and upon completion will automatically restart the controller service.

 

 

 

 

Navigate to the controller in a web browser to ensure it is working

https://<IP_of_Controller_host>:8443