1. update the system, reboot
apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove && sudo apt-get autoclean
reboot
2. install the openjdk light version and other packages
apt-get install openjdk-8-jre-headless -y
apt-get update && sudo apt-get install ca-certificates apt-transport-https
3. add the repository
echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
apt-key adv --keyserver keyserver.ubuntu.com --recv 06E85760C0A52C50/* Your code... */
4. install the unifi
apt-get update && sudo apt-get install unifi -y
5. disable the mongo database
systemctl stop mongodb
systemctl disable mongodb
6. start and enable the service
systemctl start unifi
systemctl enable unifi