Installing Ubiquiti Unifi Controller on a Raspberry Pi (Raspbian Stretch)

      1 Comment on Installing Ubiquiti Unifi Controller on a Raspberry Pi (Raspbian Stretch)

Running on Raspbian ‘Stretch’ ?

To get the apt-key command successfully downloading the Ubiquity GPG-key on Raspbian Stretch, you need to install the dirmngr manually. Don’t forget to update the repository first!

sudo apt-get update
sudo apt-get install dirmngr

Please note that  the APT-KEY is deprecated and this isn’t a final solution but merely a workaround.

Preparing Raspbian sources list

Adding the Unifi repository to the sources list

echo 'deb http://www.ubnt.com/downloads/unifi/debian unifi5 ubiquiti' | sudo tee -a /etc/apt/sources.list.d/ubnt.list > /dev/null
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50
sudo apt-get update

Installing the software

sudo apt-get install unifi -y

Disable the default MongoDB

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

Install Oracle Java 8
sudo apt-get install oracle-java8-jdk -y
sudo cp /lib/systemd/system/unifi.service /etc/systemd/system/
sudo sed -i '/^\[Service\]$/a Environment=JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt' /etc/systemd/system/unifi.service

Reboot your Pi

sudo reboot

After the reboot you can HTTPS to port 8443 on your Raspberry Pi:

https://[raspberrypi]:8443

One thought on “Installing Ubiquiti Unifi Controller on a Raspberry Pi (Raspbian Stretch)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.