I run my controller on Debian and had to reinstall the Unifi Controller following a hardware change. Unfortunately, it would not install since I chose to install a Debian Buster and not a Stretch: it was missing java 8 runtime and had mongodb version issues.
I’ve run the following commands (as root) to install Unifi on my host, and tested them again in a docker. They should work out of the box for you:
1. Ensure requirements are met
apt-get update apt-get install -y --no-install-recommends gnupg curl ca-certificates
2. Add mongodb 3.6 key and package-cloud key
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 58712A2291FA4AD5
3. Add repositories
echo 'deb [arch=amd64] https://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6 main' >> /etc/apt/sources.list.d/mongodb.list echo 'deb [trusted=yes arch=amd64] https://apt.lecomte.at/repacks/debian/ buster ubiquiti' > /etc/apt/sources.list.d/buster-repacks-ubiquiti.list
4. Install unifi
apt-get update apt-get install -y unifi openjdk-8-jre-headless
All is done.