Installing Ubiquiti UniFi Controller 5 on Raspberry Pi

Installing Ubiquiti UniFi Controller 5 on Raspberry Pi

The next step is to install the UniFi Controller software.

Add the UniFi repository to the sources list, using the following commands:

echo 'deb unifi5 ubiquiti' | sudo tee -a /etc/apt/sources.list.d/ubnt.list > /dev/null
sudo apt-key adv --keyserver --recv C0A52C50
sudo apt-get update

Install UniFi, using the following package install command:

sudo apt-get install unifi -y

*The installation takes a couple of minutes to complete, but is fully automated and includes all the prerequisite components such as MongoDB and OpenJDK Java 7.

Disable the default MongoDB database instance, using the following commands:

echo 'ENABLE_MONGODB=no' | sudo tee -a /etc/mongodb.conf > /dev/null

Without making this small configuration change, you will have two separate instances of MongoDB running; an unused default database instance, and the UniFi database instance. This is obviously not desirable on a device with limited resources, such as the Raspberry Pi.

Update to the latest release of the Snappy Java Library, using the following commands:

cd /usr/lib/unifi/lib
sudo rm snappy-java-1.0.5.jar
sudo wget
sudo ln -s snappy-java-1.1.3-M1.jar snappy-java-1.0.5.jar

*This fixes a number of issues particularly with the older models of Raspberry Pi, but also brings the library well up-to-date as the version Ubiquiti includes with the UniFi package is from 2013.

Once completed, reboot your Raspberry Pi using the following command:
sudo reboot

When the reboot is complete, use a web browser to view HTTPS port 8443 on your Raspberry Pi:



Before updating the UniFi Controller software, it is highly recommended that you first backup the controller configuration.

To update the UniFi Controller software to the latest version, simply use the standard Debian package update and upgrade commands:

sudo apt-get update && sudo apt-get upgrade -y

The UniFi Controller software will be updated along with all other packages installed on your Raspberry Pi.

Alternatively, if you just want to update the UniFi Controller software only, run the initial package installation command again:

sudo apt-get install unifi -y