This tutorial will show you how to easily install the Ubiquiti Unifi controller on an Armbian Bulleyes system running onto an ARM 64 bits (aka AArch64) platform.

If you got here by accident, this software allows you to centrally manage Unifi Wi-Fi access points through a nice and easy to use GUI. Officially, AArch64 is not supported by Unifi. However, it's a Java program, so it doesn't depend on the hardware architecture.

Personally, I've installed it on a Rock64 SBC, but it should work on any AArch64 platform.

Banner

Requirements

First, update your system:

sudo apt update
sudo apt upgrade

An important point before going forward, which I learned the hard way: you must not have any user identified by unifi on your system!

Managing dependencies

As said in the introduction, the Unifi controller run on Java, version 8. It also needs an old-school MongoDB version, which is unavailable on Bullseye, but exists on Stretch.

Installing MongoDB from Stretch

In order to satisfy Unifi's dependency, we have to trick APT to get the MongoDB package from Stretch's repository. To do that, we add Stretch's repository and we specify to never prefer packages from it if they are available in another repository of the system.

echo -e '# Never prefer packages from Stretch\nPackage: *\nPin: release n=stretch\nPin-Priority: 1' | sudo tee /etc/apt/preferences.d/99stretch-mongodb.pref
echo 'deb http://deb.debian.org/debian stretch main' | sudo tee /etc/apt/sources.list.d/stretch_mongodb.list

Adding the official Unifi repository

We now have to add the official Ubiquiti's repository. First, we must download and save the associated GPG key. We will also ask APT to retrieve the list of packages for both ARM 32 and 64 bits architectures on this repository. This is needed in order to bypass the aforementioned architecture restriction.

curl https://dl.ui.com/unifi/unifi-repo.gpg | sudo tee /usr/share/keyrings/ubiquiti-archive-keyring.gpg >/dev/null
echo 'deb [arch=arm64,armhf signed-by=/usr/share/keyrings/ubiquiti-archive-keyring.gpg] https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list

Installation

Ok, now everything is ready! Let's update APT's cache one more time and then begin the installation process.

sudo apt update
sudo apt install openjdk-8-jre-headless unifi

Go to https://[IP or FQDN of your system]:8443/ to setup and use your Unifi installation!