Disclaimer – I am not responsible for the damages towards your hardware. Please do this at your risk. In my personal experience, if I ended up messing up and not liking it I usually just nuked it and reinstall a fresh new OS and start from the beginning. My current setup is Raspberry Pi 2B, running Ubiquiti Unifi Controller 5 alongside with PiHole, which the article I have written previously and could be seen, here.
For Christmas, I bought myself a Ubiquiti UniFi AP; I should’ve waited for the AC-lite version, but on a second thought it’s okay since it will be only used for the office, which a lot of people still utilizing 2.4 GHz just fine. The thing about Ubiquiti UniFi AP is that it requires a hardware to run their UniFi controller alongside with their AP, since I have Raspberry Pi running PiHole on the network, I have found that you could also install the UniFi controller to RPi. I would highly recommend just to copy-paste the code that I mentioned below, to minimize the chance of errors.
Installing Ubiquiti Unifi Controller v5
- Make sure that your raspberry pi is running the Raspbian Jessie Lite OS version, which is available, here.
- Once you have everything connected, make sure that you are running the latest version of the RPi software and firmware
sudo apt-get update
sudo apt-get upgrade -y
- Add the UniFi repository to the sources list, using the following commands.
sudo apt install dirmngr
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– adding GPG key
sudo apt-get update– performing updates
sudo apt-get install unifi -y– installing UniFi controller
- The UniFi Controller is already bundled with MonggoDB, thus, we have to disable it in order to not have 2 MonggoDB running to the Raspberry Pi
echo 'ENABLE_MONGODB=no' | sudo tee -a /etc/mongodb.conf > /dev/null
- The UniFi Controller installer already bundled with OpenJDK Java 7, however, in some cases the controller can’t be accessed due to the load on Java 7. Therefore, we are going to use JDK 8 instead.
sudo apt-get update
sudo apt-get install oracle-java8-jdk -y
- Now we are going to change the Java, from the default ver 7 to ver 8 that we recently downloaded in the previous step.
echo 'JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt' | sudo tee /etc/default/unifi > /dev/null
That is it, you have successfully installed Ubiquiti Unifi Controller to your Raspberry Pi. To access your Unifi controller, visit
https://raspberrypi:8443. Do not forget to replace the
<raspberrypi> with your RPi IP address.
I would like to thank Bang Jonai, for providing the guidance on how to install Ubiquiti Unifi Controller 5 article, which the original article could be viewed, here. I have modified and added a couple steps here and there since I have faced a problem when I am trying to add the GPG keys. Anyhow, please let me know if you are having some problems, I would be more than happy to help out. Cheers!