Skip to content

Getting Started

Cloudflare DNS Updater keeps the A (IPv4) and AAAA (IPv6) records of your Cloudflare zone pointed at your current public IP. It is a plain Bash program: run it from source or grab a standalone binary, point it at a YAML config, and schedule it with cron or any task scheduler.

Either download a standalone binary or clone the repository:

Terminal window
git clone https://github.com/jmrplens/Cloudflare-DNS-Updater.git
cd Cloudflare-DNS-Updater
  1. In the Cloudflare dashboard, create a token with the Edit zone DNS template.
  2. Scope it to the zone you want to update.
  3. Copy the token — you will not see it again.

You also need the Zone ID, shown on the zone’s Overview page in the dashboard.

Terminal window
cp config.example.yaml cloudflare-dns.yaml
chmod 600 cloudflare-dns.yaml # it contains your API token

Minimal configuration:

cloudflare:
zone_id: "your_zone_id"
api_token: "your_api_token"
domains:
- name: "example.com"
- name: "www.example.com"

See the configuration reference for every option.

Terminal window
# From source
./cloudflare-dns-updater.sh --debug
# Or with a standalone binary
./cf-updater-linux-x86_64 --debug /path/to/cloudflare-dns.yaml

With --debug you see every step: IP detection, the API calls and the per-record decision. When everything looks right, schedule it and add --silent for quiet operation.

If you already keep DNS updated with a hand-written cron + curl script, here is what this tool adds:

Cloudflare DNS Updater Manual cron + curl
Setup One YAML file Write and maintain your own script
IPv4 + IPv6 Both; IPv6 read from the local interface Whatever you implement
Multiple records Batched into a single API call One request per record
Writes only on change Yes Usually every run, unless you add state
Notifications Telegram and Discord None
Dependencies Bash + optional jq (binaries bundle both) curl plus your own glue

For a multi-provider updater, ddclient is a common Perl alternative; this tool focuses on Cloudflare with batched updates and IPv6-from-interface detection.

Does Cloudflare DNS Updater create DNS records?

Section titled “Does Cloudflare DNS Updater create DNS records?”

No. It only updates records that already exist. Create the A or AAAA record once in the Cloudflare dashboard (any IP — it is corrected on the next run), then run the program.

Yes. It keeps AAAA records updated, preferring the stable global IPv6 address on your local interface and falling back to external services.

No, but it is recommended. Standalone binaries bundle jq; from source, a slower sed-based JSON parser is used when jq is absent.

Which Cloudflare API token permission does it need?

Section titled “Which Cloudflare API token permission does it need?”

An API token scoped to Edit zone DNS for your zone. A Global API Key is not required and is discouraged.

Every 5 minutes is a comfortable default for home connections. A lockfile makes overlapping runs safe, so shorter intervals also work.

Yes. It is released under the MIT license.