To provide your Unifi Cloud Controller with an SSL certificate, you can perform the following actions:
Log in to your server's SSH
Run the following command: wget https://get.glennr.nl/unifi/extra/unifi-lets-encrypt.sh
chmod +x unifi-lets-encrypt.sh
./unifi-lets-encrypt.sh
Follow the steps in the script, after which your controller will be provided with an SSL certificate.