Dynamic DNS record updater written in Golang.


To actually interact with Cloudflare, this needs a separate file provided by you, with 3 lines. The name of the file should be credfile and have the following in order:

email address
global API key
zone identifier

How to find the attributes for credfile

  1. Account Email -- This is just the email address your Cloudflare account is under.

  2. Global API Key -- This is found in the Cloudflare website under "My Profile > API Keys > Global API Key"

  3. Zone ID -- This ID is a random string of letters and numbers specific to your domain name. Found in the Cloudflare website on your domain's "Overview" page written as "Zone ID"

Use with Docker

Start your container: docker container run -d -v "$PWD/credfile:/config/credfile" starttoaster/cloudflare-go

View logs to see it run: docker logs <container name>

NOTE: You will only see text in the logs when the IP is updated. If you would like to test the program, you can change your DNS records to a random IP from the website, and watch as this script corrects them. Or you can connect to a VPN and watch as your records are updated with the VPNs IP address (remember to log out of the VPN, as you likely don't want your domain name pointed at the VPNs IP.)