Upgrading Ubiquiti UniFi Controller On Linux

I have used the Ubiquiti UniFi product since it first came out and have watched the evolution with excitement because I believe the AP/Controller concept is the future of indoor wireless.

Ubiquiti has done it in their usual fashion by making powerful products affordable and UniFi is no different. With UniFi, you need a UniFi controller in place to fully utilize the statistical and maintenance features that make it so different than anything else at this price point.

That being said, to truly get the controller cost down, you have to use Linux to avoid the Microsoft bloat and licensing costs. If you aren’t using Debian or Ubuntu and have decided to roll your own with some other flavor of Linux like Centos, upgrading the UniFi software may not be totally obvious from the documentation so I will help you out.

Assuming you are running Centos. First, everything should be living in /usr/lib/UniFi. That directory should look like this:

The important directory is the data directory, everything else is installed with the upgrade. Therefore, make a backup of the data directory however you wish, but I recommend using tar like this:

tar -zcvf data.tar.gz /usr/lib/UniFi/data

This will create a tar.gz file in the /usr/lib/UniFi directory. Next you need to download the new UniFi binaries from Ubqiuiti. They are found HERE.

Because you have to accept the terms of their license agreement, using wget isn’t an option here so download to your laptop and then scp or ftp the zip file to your controller and place in the /usr/lib directory. Change the current UniFi directory to something else like this:

# mv UniFi UniFi-old

Then, unzip the new version in the directory /usr/lib. it should unzip itself as a directory named “UniFi”.

# cd /usr/lib # unzip UniFi.unix.zip

When the unzip operation is done, change to the newly created directory and rename the data directory like this:

# cd /usr/lib/UniFi # mv data data-dist

Then move your data tar file back to the proper directory:

# mv /usr/lib/data.tar.gz UniFi

Finally, restore your valuable data:

# tar -zxvf data.tar.gz

Unzip the file like this:

# tar -zxvf data.tar.gz

At this point you should be able to start the unifi controller and have an upgraded version with your old data still intact. Good luck!

Steve Discher

Steve Discher was born in Apple Valley, California and today makes his home in College Station, Texas with his wife and three children. He is a 1987 graduate of Texas A-M University and owns ISP Supplies, a wireless distribution company, and conducts MikroTik training classes. His hobbies include flying his Piper Cub and RV camping with his family.

Recent Posts

  • Using MikroTik LHG as a UE With a Baicells eNodeB

    This has been a dream for a long time, and a DIY project for those industrious individuals willing to cobble it together, but now it is a reality in a production device. First of all why would you want to …

  • New ISP Supplies App

    Now available on the Playstore and the iPhone Appstore, the ISP Supplies App! With great features like a powerful search engine and a reorder list, it makes it fast and easy to place orders on the go. Favorite products for quick …

  • Update: Block Countries Based on IP Addresses and Networks

    If you never used my web site https://mikrotikconfig.com to build firewalls and QOS, you have been working too hard! I recently (today) updated the database of IP addresses by Country to generate MikroTik IP Address Lists by country. Check it …

See More News