This was a project designed to explore the Cloudflare API through their official Go Client.
This application updates a given domain name to the current machine's ip address with the use of the https://ipify.org service. Alternative ip address services may be used if it returns the ip address of the current machine in plain text by overriding the configuration option.
You can run this service in a cron job or a systemd timer, or once, up to you!
Install via with the Go toolchain to compile from source:
go get github.com/wyattjoh/cloudflare-ddns
Download pre-compiled binary on the Releases Page for your Arch/OS.
brew install wyattjoh/stable/cloudflare-ddns
Configuration is specified in the environment or as command line arguments.
--tokenorENV['CF_API_TOKEN'](required if--keyand--emailnot provided) - The API Token that has the Zone.DNS permission for the specific zone.--keyorENV['CF_API_KEY'](required if--tokennot provided) - specify the Global (not CA) Cloudflare API Key generated on the "My Account" page.--emailorENV['CF_API_EMAIL'](required if--tokennot provided) - Email address associated with your Cloudflare account.--domainorENV['CF_DOMAIN'](required) - Comma separated domain names that should be updated. (i.e. mypage.example.com OR example.com)--ipendpointorENV['CF_IP_ENDPOINT'](optional, default:https://api.ipify.org) - Alternative ip address service endpoint.
Note: One of --key and --email or --token must be defined