Installation guide built on Debian 12.
This guide doesn't cover upgrading from lower versions of Unifi or any of its dependencies.
Obtain v1.1 of libssl
from the Debian.org FTP server
wget https://ftp.debian.org/debian/pool/main/o/openssl/libssl1.1_1.1.1w-0+deb11u1_amd64.deb
We'll install MongoDB v4.4 for compatibility reasons. Good job Ubiquiti /s.
Add the v4.4 repo
echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg ] http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list
Add the repo key
curl -fsSL https://www.mongodb.org/static/pgp/server-4.4.asc | gpg -o /usr/share/keyrings/mongodb-server-4.4.gpg --dearmor
Install MongoDB v4.4
apt install mongodb-org
Verify mDB version
mongod --version
Install Java 17
apt install openjdk-17-jre-headless
Install package dependencies
apt install ca-certificates apt-transport-https
Add the Unifi repository and its key
echo 'deb [ arch=amd64 signed-by=/etc/apt/keyrings/unifi-repo.gpg ] https://www.ui.com/downloads/unifi/debian unifi-8.0 ubiquiti' | tee /etc/apt/sources.list.d/100-ubnt-unifi.list
curl -fsSL https://dl.ui.com/unifi/unifi-repo.gpg | gpg --dearmor -o /etc/apt/keyrings/unifi-repo.gpg
Update and install Unifi Controller
apt update
apt install unifi
To access the Unifi Controller, navigate to https://[IP-or-hostname]:8443
I've created a custom firewalld service because of the port requirements Unifi has.
Create a new xml file at /etc/network/unifi-service.xml
with the following contents Remove the comments for ports as you need them.
<?xml version="1.0" encoding="utf-8"?>
<service>
<!--<port port="53" protocol="tcp"/>-->
<!--<port port="53" protocol="udp"/>-->
<port port="3478" protocol="udp"/>
<port port="5514" protocol="udp"/>
<port port="8080" protocol="tcp"/>
<!-- <port port="443" protocol="tcp"/>-->
<port port="8443" protocol="tcp"/>
<port port="8880" protocol="tcp"/>
<port port="8843" protocol="tcp"/>
<port port="6789" protocol="tcp"/>
<port port="27117" protocol="tcp"/>
<port port="5656-5699" protocol="udp"/>
<port port="10001" protocol="udp"/>
<port port="1900" protocol="udp"/>
<!--<port port="123" protocol="udp"/>-->
</service>
Create the new service
firewall-offline-cmd --new-service-from-file=/etc/network/unifi-service.xml --name=Unifi
firewall-cmd --reload
Enable the new service
firewall-cmd --permanent --add-service=Unifi