Cloudflare DDNS is a command-line dynamic DNS tool that keeps Cloudflare DNS records in sync with your public IP address.
- Multiple IP Sources: Tries multiple sources in order for fetching your public IP:
- Cloudflare DNS (TLS) (using
whoami.cloudflare) - OpenDNS (TLS) (using
myip.opendns.com) - Cloudflare STUN (using
stun.cloudflare.com) - Google STUN (using
stun.l.google.com) - icanhazip.com
- AWS
- ipinfo.io
- ipify.org
- Cloudflare DNS (using
whoami.cloudflare) - OpenDNS (using
myip.opendns.com)
- Cloudflare DNS (TLS) (using
- Future Compatibility: Supports managing A and AAAA records.
- Flexible Usage: Run as a one-off command for use with cron/systemd/Kubernetes, or as a daemon with a configurable update interval.
- Simple Authentication: Use either
CF_API_TOKENorCF_API_KEYwithCF_API_EMAILto securely connect to the Cloudflare API.
Click to expand
-
If you don't have it already, install the
ca-certificatespackagesudo apt install ca-certificates
-
Add gabe565 apt repository
echo 'deb [trusted=yes] https://apt.gabe565.com /' | sudo tee /etc/apt/sources.list.d/gabe565.list -
Update apt repositories
sudo apt update
-
Install cloudflare-ddns
sudo apt install cloudflare-ddns
Click to expand
-
If you don't have it already, install the
ca-certificatespackagesudo dnf install ca-certificates
-
Add gabe565 rpm repository to
/etc/yum.repos.d/gabe565.repo[gabe565] name=gabe565 baseurl=https://rpm.gabe565.com enabled=1 gpgcheck=0
-
Install cloudflare-ddns
sudo dnf install cloudflare-ddns
Click to expand
Install cloudflare-ddns-bin with your AUR helper of choice.
Click to expand
Install cloudflare-ddns from gabe565/homebrew-tap:
brew install gabe565/tap/cloudflare-ddnsClick to expand
A Docker image is available at ghcr.io/gabe565/cloudflare-ddns
Click to expand
Download and run the latest release binary for your system and architecture.
To authenticate to the Cloudflare API, set either CF_API_TOKEN or CF_API_KEY and CF_API_EMAIL.
Runs once, then exits. Useful for crontab, systemd timers, or Kubernetes CronJobs.
export CF_API_TOKEN=token
cloudflare-ddns example.comdocker run --rm -it \
-e CF_API_TOKEN=token \
-e DDNS_DOMAINS=example.com \
ghcr.io/gabe565/cloudflare-ddns \Runs continuously, updating the DNS record every specified interval.
export CF_API_TOKEN=token
cloudflare-ddns example.com --interval=10mdocker run --rm -d --restart=always \
-e CF_API_TOKEN=token \
-e DDNS_DOMAINS=example.com \
-e DDNS_INTERVAL=10m \
ghcr.io/gabe565/cloudflare-ddns