UniFi Site Controller custom SSL
Download the script:
sudo wget https://raw.githubusercontent.com/stevejenkins/unifi-linux-utils/master/unifi_ssl_import.sh -O /usr/local/bin/unifi_ssl_import.sh
Edit the variables in the script
Add your domain
UNIFI_HOSTNAME=unifi.yourdomain.com
Comment the three lines for Fedora/RedHat/Centos by placing a # for it:
# Uncomment following three lines for Fedora/RedHat/CentOS
#UNIFI_DIR=/opt/UniFi
#JAVA_DIR=${UNIFI_DIR}
#KEYSTORE=${UNIFI_DIR}/data/keystore
Uncomment the three lines for Debian/Ubuntu
# Uncomment following three lines for Debian/Ubuntu
UNIFI_DIR=/var/lib/unifi
JAVA_DIR=/usr/lib/unifi
KEYSTORE=${UNIFI_DIR}/keystore
Set the Let’s Encrypt mode to true:
If you only enable the line, by removing the #, you will get a loop ==Yes when running the script. So set it to true. Will still get some warning about missing [[:, but the doesn’t matter.
LE_MODE=true
https://lazyadmin.nl/home-network/unifi-controller-ssl-certificate/