How-to: installing Ubiquiti Unifi controller on Raspberry Pi

How-to: installing Ubiquiti Unifi controller on Raspberry Pi

Install Raspbian as per other post
Install pre-requisites

Install Java

sudo apt install openjdk-8-jre-headless

Install the rng-tools to speed up startup

sudo apt install rng-tools

and make a minor modification

sudo nano /etc/default/rng-tools

by uncommenting the following line

#HRNGDEVICE=/dev/hwrng

and saving with Ctrl+X, Y, <ENTER>

Restart the rng-tools to reload the changed config

sudo systemctl restart rng-tools
Install the Unifi Controller

Add, validate and update the repositories

echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list

sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg

sudo apt update

Install the unifi software and enable it as a service

sudo apt install unifi

Then goto:

https://[IPADDRESS]:8443

and follow the configuraiton wizard

Then set a static address on the ethernet NIC of the Pi. Edit the following file

sudo nano /etc/dhcpcd.conf

to add the following lines

interface eth0
static ip_address=<STATICIP>/24
static routers=<ROUTERIP>
static domain_name_servers=<DNSIP>

Then connect it all up on its own wired network and log into https://<STATICIP>:8443 with same username and password – note it takes ages to log in when its on a LAN with no internet

Follow-up after an issue I needed to resolve 2 years later…

Or, just follow these instructions….!

which worked perfectly for the installation of an older version to allow me to restore a backup from a controller with a broken GUI and a 404 Not Found error.

Once running select to restore from backup during setup. Download the backup to the local machine from the broken controller using scp – rroot@old_controller_ip:/usr/lib/unifi/data/backup/ /Users/macuser/unifi_backup. Then select a file to upload for restore and pick the latest autobackup from the autobackups folder just scp’d.

Note to get current version of controller software:

/usr/lib/unifi/bin/ubnt-apttool showpkgver unifi

Leave a Reply

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