Cloudflare DDNS keeps a hostname pointed at your Linux VPS when its public address changes. The updater discovers the VPS address, compares it with the Cloudflare DNS record, and writes a new value only when the two differ. The safest setup uses a zone-scoped API token with DNS write permission, a correctly identified A or AAAA record, and a scheduled client or systemd job that you verify from outside the server.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
What Cloudflare DDNS does
Dynamic DNS is an automation loop rather than a special DNS record type. A program on the VPS (or another trusted machine) periodically obtains the server’s current public address, reads the address currently stored in Cloudflare, and updates the record when necessary. This matters when a hosting provider changes an address after maintenance, migration, reallocation, or a network event.
As an Amazon Associate I earn from qualifying purchases.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesCloudflare describes two practical approaches: a script that monitors the address and calls the Cloudflare API, or ddclient, a third-party Perl client. A packaged utility such as Debian’s cloudflare-ddns can provide a similar service with distribution-specific configuration conventions.
DDNS does not make an unstable address permanent, eliminate DNS caching, or repair an application that is listening on the wrong interface. It only keeps the selected DNS record’s content synchronized with the address your updater detects.
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
Plan the record before touching the VPS
Choose the address family
| Record | Content | Use it when |
|---|---|---|
| A | An IPv4 address | Your service is reachable through a public IPv4 address. |
| AAAA | An IPv6 address | Your service is reachable through a public IPv6 address. |
IPv4 and IPv6 are separate jobs. An updater that changes an A record does not automatically maintain an AAAA record, and vice versa, unless its documentation explicitly says it handles both. Run independent address-family configurations when both records are needed. For example, force an IPv4 address check with curl -4 and an IPv6 check with curl -6, or use equivalent settings in your chosen client.
Decide whether the record is proxied
Cloudflare’s proxied field controls whether the hostname receives Cloudflare proxy services. Set it deliberately for the application behind the record. DNS-only mode returns the origin address directly; proxied mode returns Cloudflare’s proxy addresses to clients and sends supported traffic through Cloudflare. Proxy mode does not choose whether the origin is IPv4 or IPv6, so you still need the correct A or AAAA record and working origin connectivity.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchUse a practical TTL
Cloudflare accepts TTL 1 for automatic TTL selection. Ordinary TTL values range from 60 to 86,400 seconds; Enterprise zones can have a lower minimum. A short TTL can reduce the time some resolvers retain an old address, but it cannot override resolver behavior or cached answers that already exist. Automatic TTL is a reasonable default for a DDNS record unless you have a specific caching policy.
Create a narrowly scoped Cloudflare API token
Do not use a global API credential for a single DDNS record. In the Cloudflare dashboard, open the account’s API-token area, choose to create a custom token, and restrict it to the one authoritative zone that contains your hostname. Grant the DNS write/edit permission required to change records. The token should be a Bearer token when sent to the API.
- Identify the authoritative zone, such as the zone that contains
host.example.net. The zone is not necessarily the complete hostname: the zone might beexample.net. - Create a custom token limited to that zone and the DNS write/edit capability. Avoid account-wide or unrelated permissions.
- Copy the token once and store it in a root-owned configuration file or a protected environment file. Never put it in shell history, a public repository, a ticket, or a world-readable file.
- Record the zone ID. You will use it for record lookup and updates.
On the VPS, permissions should prevent ordinary users from reading the secret. For a root-managed setup, a configuration file with owner root and mode 0600 is a typical choice. Do not print the token in diagnostic output or include it in error messages.
Create and identify the DNS record
Create the hostname in the selected zone if it does not already exist. Choose A for IPv4 or AAAA for IPv6, enter the current address initially, and choose DNS-only or proxied mode. If another record with the same name and type exists, decide whether it should be managed by DDNS; blindly updating the wrong record can break an existing service.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
Cloudflare’s DNS API addresses records by a record ID. The ID is different from the zone ID and must be discovered for the exact fully qualified domain name (FQDN) and record type. For an A record, the lookup pattern is:
curl -sS "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records?name=$FQDN&type=A"
-H 'Authorization: Bearer $CLOUDFLARE_API_TOKEN'
-H 'Content-Type: application/json'
For IPv6, change type=A to type=AAAA. The response contains a result array. Confirm the returned name, type, and (if relevant) proxied value before saving the record ID. A query that returns no result usually means the zone, spelling, FQDN, or record type is wrong.
Choose an updater
Packaged cloudflare-ddns
Debian documents a cloudflare-ddns(1) utility that updates a DNS record through Cloudflare’s API. It requires a token with Zone.DNS edit permission and can read /etc/cloudflare-ddns/config.ini when no command-line arguments are supplied. Package names, versions, service units, and supported address-family options vary by distribution, so inspect the installed manual page and package files rather than assuming a unit name or option from another release.
A packaged client reduces the amount of shell and JSON code you must maintain. Check that it can discover the address you need, select the exact record, preserve your intended proxy setting, and run under a service account with access only to its configuration.
ddclient
ddclient is the third-party Perl client named in Cloudflare’s dynamic-DNS documentation. It can be convenient when your distribution already packages and integrates it. Read the installed configuration examples and verify how the package stores credentials, selects the Cloudflare zone, handles IPv4 versus IPv6, and schedules updates. A configuration written for one distribution’s service unit may not apply unchanged to another.
Custom script and systemd
A small script gives you precise control over address detection, record selection, comparison, retries, logging, and separate A/AAAA jobs. It also creates the most responsibility: quote shell variables carefully, parse JSON with a real JSON parser, check every API response, and lock down the secret file. The remainder of this guide shows the operational pattern without assuming a particular third-party package.
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
Implement the update loop safely
1. Discover the public address
The address on a VPS’s local interface can differ from the address visible on the Internet because of provider networking or translation. Use a trusted address-discovery endpoint or the provider’s documented networking method. Pin the address family: an IPv4 job should not accidentally receive an IPv6 result, and an IPv6 job should not silently fall back to IPv4.
Validate the result before sending it to Cloudflare. An IPv4 value should contain a valid IPv4 address; an IPv6 value should be a valid IPv6 address. Reject an empty response, an HTML error page, or a value containing whitespace and unrelated text.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →2. Read the current record
List or target the exact record using the zone ID, FQDN, and type. Parse the API’s success flag and the result’s content field. Do not treat an HTTP response alone as proof that the operation succeeded: Cloudflare’s JSON response also reports whether the request was successful and can include error details.
3. Compare before writing
Compare the discovered address with the record’s current content. If they match, exit successfully without making a write request. This avoids needless API calls and prevents a scheduled job from constantly rewriting an unchanged record. If they differ, retain the intended record name, type, TTL, and proxy setting while changing only the address.
4. Overwrite the record
Cloudflare provides list, create, overwrite (PUT), patch, and delete operations for zone DNS records. A complete overwrite is straightforward when your script knows all required fields. The illustrative A-record request is:
curl -sS -X PUT "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records/$RECORD_ID"
-H 'Authorization: Bearer $CLOUDFLARE_API_TOKEN'
-H 'Content-Type: application/json'
--data "{"type":"A","name":"$FQDN","content":"$PUBLIC_IP","ttl":1,"proxied":false}"
For an AAAA record, send type as AAAA and provide the validated IPv6 address. Set proxied to true only when that is the deliberate mode for the hostname. If you use a patch operation instead, confirm which fields your client sends and that it does not unintentionally reset proxy or TTL settings.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
5. Handle transient failures
Network timeouts, temporary DNS failures, and API unavailability should cause a retry on the next scheduled run rather than a tight loop. Set a request timeout, return a non-zero status on authentication or API errors, and log a concise diagnostic without the token. A systemd timer naturally provides another attempt at the next interval; a service can also use bounded retries with backoff.
Protect configuration and credentials
- Keep the token in a root-owned file or a dedicated service account’s environment file with mode
0600. - Do not place secrets directly in a world-readable unit file, shell history, source control, or command-line arguments visible through process inspection.
- Use a token limited to the one zone and DNS write/edit permission; do not grant unrelated account access.
- Ensure logs contain status, record name, and error text but not the Authorization header or full token.
- Rotate the token immediately if it appears in a repository, log, screenshot, or process listing. After rotation, update the protected configuration and test one complete run.
Schedule the updater with systemd
A service plus timer gives a repeatable schedule, dependency ordering, journal logging, and straightforward status checks. The exact script path and user are your choices; the example below assumes a root-owned script at /usr/local/sbin/cloudflare-ddns-update.
Create the service
[Unit]
Description=Update Cloudflare DNS record
Wants=network-online.target
After=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/cloudflare-ddns-update
Save it as /etc/systemd/system/cloudflare-ddns.service. If the script needs a protected environment file, reference it with an EnvironmentFile directive whose permissions you have checked, or have the script read a root-only configuration file.
Create the timer
[Unit]
Description=Run Cloudflare DDNS update periodically
[Timer]
OnBootSec=2min
OnUnitActiveSec=5min
Persistent=true
[Install]
WantedBy=timers.target
Save it as /etc/systemd/system/cloudflare-ddns.timer. Five minutes is an example interval, not a universal requirement. Choose an interval that fits how quickly an address can change, your DNS caching expectations, API limits, and the consequences of a stale record. Persistent=true lets systemd run a missed invocation after the machine returns, rather than waiting for the next full interval.
Enable and test it
- Reload unit files:
sudo systemctl daemon-reload. - Enable the timer at boot and start it now:
sudo systemctl enable --now cloudflare-ddns.timer. - Run one immediate test:
sudo systemctl start cloudflare-ddns.service. - Inspect the latest service result:
sudo systemctl status cloudflare-ddns.service. - Read detailed output:
sudo journalctl -u cloudflare-ddns.service --since '15 minutes ago'. - Confirm the schedule:
systemctl list-timers cloudflare-ddns.timer.
For separate IPv4 and IPv6 records, create separate scripts and units or use two explicit configurations. Give each job an unambiguous record type and address-family check so an IPv6 result cannot overwrite an A record.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Verify the change from outside the VPS
A successful API response proves that Cloudflare accepted the request; it does not prove that every resolver has discarded its cached answer or that the application is reachable. Verification should cover both the API result and public DNS.
Best Value
- Check the updater’s journal for the discovered address, comparison result, and Cloudflare success response. Do not log the token.
- Query the hostname from a machine outside the VPS. For IPv4, use a DNS lookup tool that requests A; for IPv6, request AAAA. Confirm the answer matches the current address.
- Query more than one public resolver when diagnosing propagation. A resolver may still serve its cached value until the record’s TTL expires.
- Test the actual service, including the expected port and protocol. DNS can be correct while a firewall, listener, TLS configuration, or proxy mode is wrong.
If you changed from DNS-only to proxied mode, expect clients to see Cloudflare proxy addresses rather than the origin address. Test the application through its hostname and inspect the origin separately using an authorized administrative method.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Troubleshooting by symptom
Authentication error or HTTP 403
- Confirm the header is exactly a Bearer token and that the token has DNS write/edit permission.
- Check that the token is restricted to the zone identified by
$ZONE_ID. - Make sure the running service reads the new secret, not an old environment file or cached process configuration.
- Rotate the token if it may have leaked, then retest with the replacement.
Record not found
Verify the zone ID, exact FQDN (including whether it is the zone apex), record type, and record ID. The apex of example.net is not the same name as host.example.net. Re-run the list request and inspect the returned names instead of guessing an ID.
The wrong address family is updated
Check the address-discovery command and force the family with curl -4 or curl -6. Ensure the lookup query and overwrite payload use the matching A or AAAA type. Maintain separate jobs when both families are in use.
Public DNS still shows the old value
First inspect the API response and the record in Cloudflare. Then query authoritative and public resolvers. Cached answers can remain until their TTL expires, and different resolvers may refresh at different times. If the API shows the new content but authoritative answers do not, re-check the zone and record ID; if authoritative answers are new but one public resolver is old, caching is the likely explanation.
The application behaves unexpectedly after enabling proxying
Re-check the proxied value and the service’s compatibility with Cloudflare proxying. Proxy mode changes the addresses presented to clients and the network path to the origin; it does not select the origin IP family. Use DNS-only mode for services that require direct origin addressing or are not supported through the proxy, and secure the exposed origin accordingly.
Recommended Free Tools
The timer runs but nothing changes
Inspect the service journal, the script’s executable permissions, and the environment file path. A no-change message can be correct when the discovered address equals the record’s content. A silent failure usually means the script is not checking command exit codes or the API’s JSON success field; make those checks explicit.
Operational checklist
- The hostname belongs to the intended authoritative zone.
- The token is custom, zone-scoped, and limited to DNS write/edit permission.
- The record ID was obtained for the exact FQDN and A or AAAA type.
- The updater validates a public address and compares it before writing.
- Proxy mode and TTL are intentional and preserved on updates.
- IPv4 and IPv6 are configured independently when both are required.
- Secrets are readable only by the service account and absent from logs.
- The scheduler has been run manually and its journal has been checked.
- External DNS queries and an application-level test confirm the expected result.
Which approach should you use?
| Approach | Best fit | Trade-offs |
|---|---|---|
Packaged cloudflare-ddns |
You want distribution-managed configuration and service integration. | Options, version behavior, and address-family support depend on the distribution package. |
ddclient |
Your distribution already packages the general-purpose Perl client. | You must verify its Cloudflare settings, credential storage, and IPv4/IPv6 behavior. |
| Custom script plus systemd | You need exact control over detection, record selection, logging, retries, or separate jobs. | You are responsible for quoting, JSON parsing, validation, secret permissions, and error handling. |
For a single VPS and one record, a maintained packaged client is usually the least code to operate, provided its installed documentation confirms the required features. Use a custom systemd-driven script when the package cannot express your address-family, proxy, or retry requirements. Whichever option you choose, the security and verification rules are the same: least-privilege token, exact record identity, compare-before-write, protected credentials, and an external DNS check.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




