Add Lets Encrypt to CloudKey
This is for a Local Cloudkey
Download Easy Encrpyt Script
Download Easy Encrypt Script
curl -sO https://get.glennr.nl/unifi/extra/unifi-easy-encrypt.sh
Create cloudflare.ini
Create cloudflare.ini file
nano /root/.secrets/EUS/cloudflare.ini
Add to file
Use Cloudflare API Token Guide to create the API Key for Cloudflare.
Paste into cloudflare.ini File
dns_cloudflare_api_token =
Save the file then you can run the script.
Run Script
Replace Values
Replace $DOMAIN, $DOMAIN, $SERVER_IP and $DNS_IP for the script to run properly. (doesn't need the $)
Run Script
sudo bash unifi-easy-encrypt.sh --dns-challenge --dns-provider cloudflare --dns-provider-credentials /root/.secrets/EUS/cloudflare.ini --fqdn unifi.$DOMAIN --email $EMAIL --skip --server-ip $SERVER_IP --external-dns $DNS_IP