Automation
Dynamic IPs change without warning, so run the updater on a schedule. It exits quickly when nothing changed (one paginated API read, no writes), and the lock prevents overlapping runs.
Linux / macOS: cron
Section titled “Linux / macOS: cron”Schedule the updater with cron:
crontab -e# Every 5 minutes, quietly*/5 * * * * /opt/Cloudflare-DNS-Updater/cloudflare-dns-updater.sh --silentUse the absolute path to the launcher (or binary). Output is already suppressed by --silent; errors still print and land in cron mail if configured.
Linux: systemd timer
Section titled “Linux: systemd timer”Prefer a systemd timer? Create the service unit at /etc/systemd/system/cf-updater.service:
[Unit]Description=Cloudflare DNS UpdaterAfter=network-online.targetWants=network-online.target
[Service]Type=oneshotExecStart=/opt/Cloudflare-DNS-Updater/cloudflare-dns-updater.sh --silent/etc/systemd/system/cf-updater.timer:
[Unit]Description=Run Cloudflare DNS Updater every 5 minutes
[Timer]OnBootSec=2minOnUnitActiveSec=5min
[Install]WantedBy=timers.targetsudo systemctl daemon-reloadsudo systemctl enable --now cf-updater.timersystemctl list-timers cf-updater.timerWindows: Task Scheduler
Section titled “Windows: Task Scheduler”- Open Task Scheduler → Create Basic Task.
- Name it e.g. “Cloudflare DNS Updater”.
- Trigger: Daily, then edit the task’s properties to Repeat task every 5 minutes for a duration of Indefinitely.
- Action: Start a Program → browse to
cf-updater-windows-x86_64.exe. - Arguments:
--silent. - In the task’s settings, set Start in to the folder containing
cloudflare-dns.yaml.
Choosing an interval
Section titled “Choosing an interval”Every run that detects no change costs one read request to the Cloudflare API. Cloudflare’s global API rate limit (1200 requests per 5 minutes per user) leaves enormous headroom even at one run per minute; every 5 minutes is a comfortable default for home connections.
Frequently asked questions
Section titled “Frequently asked questions”How often should it run?
Section titled “How often should it run?”Every 5 minutes is a comfortable default for home connections. Cloudflare’s limit of 1200 requests per 5 minutes leaves large headroom even at one run per minute.
Will overlapping runs cause problems?
Section titled “Will overlapping runs cause problems?”No. A lockfile makes a second invocation exit immediately, so aggressive schedules are safe.
How do I check it is working?
Section titled “How do I check it is working?”Run it once with --debug to watch IP detection and the API calls. When running from source, the same output is also written to logs/updater.log in the project directory.
Does a run cost an API request when nothing changed?
Section titled “Does a run cost an API request when nothing changed?”Yes, one read request per run. It only writes to the API when the IP actually changed (or when you pass --force).