Unifi Upgrade – CentOS

ORIGINAL POST: https://www.samkear.com/software/linux/upgrading-ubiquiti-unifi-controller-software-centos

I recently completed a deployment of several Ubiquiti UniFi UAP-AC-PRO access points and so far I’ve been very impressed with their performance.

One of the best things about Ubuqiti is that the UniFi controller software is completely free.

Ubiquiti UniFi

Ubiquiti provides a Linux package for Debian /Ubuntu but in order to install UniFi on Centos or any other non Debian based distro you must use their Linux DIY package.

The DIY version of the software isn’t very well documented and has a couple of caveats.

  1. The auto update feature of the UniFi controller software does not work.  
  2. The configuration backup and restore feature does not work.

Since Ubiquiti bundles new versions of the access point firmware with the UniFi controller software it is necessary to upgrade UniFi in order to deploy new AP firmware versions.

This creates a slightly annoying issue since the UniFi software can’t be automatically upgraded.

Furthering frustrations the Linux DIY package doesn’t really provide any useful instructions on the proper way to perform this upgrade.

I decided to share the procedure I’ve been using to upgrade the software to help out the other Centos Linux users out there.

These steps have been tested on Centos 7.0 but they should work for most other distros too.  If you have UniFi installed somewhere besides /opt then you will need to change the paths in the commands below.

Step 1: Stop the UniFi service

The UniFi service must be stopped before you can proceed with the upgrade.

service unifi stop

Step 2: Backup the current configuration

tar -zcvf /root/backup.tar.gz /opt/UniFi/data/

You may see a message that one of the journal files changed while being read, this is normal and can be ignored.

Step 3: Download the new UniFi package

The current release version of the UniFi DIY package is 5.2.9.

Ubiquiti recently dropped support of the DIY packages.  They have stopped posting the download links but the files are still present.  Visit the Ubiquiti download page to check for newer versions and update the wget command below based on the version you want to upgrade to.

wget http://dl.ubnt.com/unifi/5.2.8/UniFi.unix.zip /root/UniFi.unix.zip

Take a look at the Ubiquiti forums for more information about the lack of support for DIY packages.  Also, please vote for the feature request to provide officially supported RPM packages for the UniFi software.

Step 4: Unzip the new version and fix the ownership

unzip -qo /root/UniFi.unix.zip -d /opt
chown -R ubnt:ubnt /opt/UniFi

Step 5: Restore the configuration backup

tar -xzvf backup.tar.gz -C /opt/UniFi/data/

Step 6: Start the UniFi service

service unifi start

Verifying the Upgrade

To verify the new version was properly installed log into the UniFi web interface and go to the Settings \ Maintenance menu.  The version is indicated under the server information section of the maintenance page.

UniFi Controller Settings Maintenance Menu

Authorized Reseller SecurityMetrics PCI validation certification logo