CloudFlare DDNS updates

This blog is hosted on a Raspberry Pi under my TV at home. As is common with this scenario I have a dynamic WAN IP, updating intermittently at the whim of my ISP/router.

After a few attempts I’ve finally got a stable DDNS update that works with CloudFlare (having had trouble with various bits of ddclient+patches etc) in the form of some scripts that call curl against the Api directly. This seems nice and neat, and the scripts can be scheduled using cron.

I’ve posted the scripts used here. I’ll try to keep these updated as the CloudFlare Api changes (as I’ll have to to keep the site running!).

I’ve included the script required to download details of the dns records from CloudFlare, as this is required to get the rec_id value for the dns entry, which is then sent back for the update. My version of the main update script also maintains a simple log file of updates.

The repo is here, the update script is here
and the read script is here

3 thoughts on “CloudFlare DDNS updates”

  1. Hi,

    Is your cloudflare script using the latest cloudflare api? Is everything still working out with it? I’m thinking about giving it a try on my home web server.



    1. Nothing seems to have changed lately – not that would break these scripts anyway. They’re still running fine and keeping this blog online.

Leave a Reply

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see

This site uses Akismet to reduce spam. Learn how your comment data is processed.