While Cloudflare doesn't have a traditional DDNS set up their robust API allows for updating your DNS entries using ddclient. The Edgerouter X has ddclient built in as well so the days of crontab jobs can end. The only issue that stands in the way is a common error due to lack of documentation, noconnect.
interface : eth0
ip address :
host-name : swordandcircuitboard.com
last update : Thu Jan 1 00:00:00 1970
update-status: noconnect
The official Unifi docs here on custom DDNS with cloudflare state "The Cloudflare API key is used as the password", but Cloudflare has mulitiple types of API Keys. ddclient V3.10 should be compatible with Cloudflare API Tokens but EdgeOS 2.0.9-hotfix.7 is currently on version 3.8.3. Therefore we need to use the Global API Key. Which is terrible for security and least privledge. So weigh your options and maybe look to use ddclient outside EdgeOS until this gets updated to v3.10+.
TLDR: If using DDClient on EdgeOS you must use the Cloudflare Global API key and not the API Token with less privledges.
The Final working config for this blogs entry would looks like:
dns {
dynamic {
interface eth0 {
service custom-sword {
host-name swordandcircuitboard.com
login [email protected]
options "zone=swordandcircuitboard.com ssl=yes"
password <GLOBAL API TOKEN>
protocol cloudflare
server api.cloudflare.com/client/v4
}
web https://ipinfo.io/ip
}
}
}