sudo apt update && sudo apt -y upgrade
sudo apt install -y openjdk-8-jre-headless
WARNING: Do not install Java 11.
The newer Java is not fully working.
Register the Ubiquity package repository and trust their pgp key:
echo 'deb http://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.ubnt.com/unifi/unifi-repo.gpg sudo apt update
sudo apt install -y unifi
sudo reboot
The UniFi Controller is now running and accessible at https://yourcontroller:8443/