Installing UniFi Network Appliance on a Linux host can be a challange.
There is a nice Unifi community post1) [ Credits to:Glenn R ] for an automated installation.
It might be paranoid, but I personally prefer to do my own stuff and not let scrips written by others run on my machines (although this one can be checked, as it is open to look into).
For this reason I worked out myself how the challenge is taken within a few moments. It's just a matter of picking the right stuff.
Here you go:
Click on the code to copy to clipboard
sudo apt install -y apt-transport-https ca-certificates gnupg2 curl
We need MongoDB Server in version 4.4, since Ubiquiti hasn't managed to implement a newer version yet.
This is only availible as package installation.
You will also need libssl1.1 as prerequisite for installation, it can be found here:
wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1n-0+deb11u5_amd64.deb; sudo apt install -y ~/libssl1.1_1.1.1n-0+deb11u5_amd64.deb
Some distros need absolute path instead of ~ ( /home/<YOUR USER>/libssl1.1* )
Then MongoDB:
wget https://repo.mongodb.org/apt/debian/dists/buster/mongodb-org/4.4/main/binary-amd64/mongodb-org-server_4.4.29_amd64.deb; sudo apt install -y ~/mongodb-org-server_4.4.29_amd64.deb
Some distros need absolute path instead of ~ ( /home/<YOUR USER>/mongodb-* )
We need Java runtime environment 17 (headless is fine):
sudo apt install -y openjdk-17-jre-headless
Note: don't forget to „apt-mark hold openjdk-17-jre-headless“ , else it will be upgraded on next update run
Fetch unifi gpg key, add repo and install:
sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg; echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list; sudo apt update; sudo apt install -y unifi
You may now access your UNA with https://IP.of.your.server:8443 and deploy your backup or create a new site.
Don't forget to consider upscaling, depending on amount of devices at your sites.
Recommendation:
If you want to deploy a backup (*.unf) file, do it before proceeding with next steps.
You may also continue with UNA behind a NGINX reverse proxy if you want to enhance your installation.
References:
https://help.ui.com/hc/en-us/articles/220066768-UniFi-Network-Updating-Third-Party-non-Console-UniFi-Network-Applications-Linux-Advanced-
https://www.mongodb.com/download-center/community/releases
https://www.mongodb.com/docs/v3.6/tutorial/install-mongodb-on-debian/
Enjoy!