Table of Contents

Controller

Docker

Install MongoDB < 4.0.0

https://docs.mongodb.com/v3.6/tutorial/install-mongodb-on-debian/

apt install gnupg2
wget -qO - https://www.mongodb.org/static/pgp/server-3.6.asc | sudo apt-key add -
echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
apt-get update
sudo apt install mongodb-org
sudo systemctl start mongod

Installing Unifi controller

Inside container:

sudo apt-get update && sudo apt-get install ca-certificates apt-transport-https wget
echo 'deb https://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.ui.com/unifi/unifi-repo.gpg 
sudo apt update
sudo apt install unifi

Access running controller on: https://<IP>:8443/

Unifi controller log location:

Configure mail agent

sudo apt-get install msmtp-mta

See how to configure: MSMTP

adding own CA cert to controller

To send e-mails to own SMTP server with self-signed cert. It is enough to add cert to Debian certifcate store and restart unifi controller.

To add certificate directly to JVM store:

Digital Certificate: How to import .cer file in to .truststore file using

sudo cp cacert.crt /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security
cd /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security
keytool -v -import -file cacert.crt -alias my_own_ca -keystore cacerts -storepass changeit
/etc/init.d/unifi restart