Cloudflare DDNS Updates (Aug 2018 Edition)

In one of my old blog posts I covered some scripts to update Cloudflare’s DNS system. This is useful if you’re hosting sites at home on a Raspberry PI (like this one still is!), where you might not have a static IP.

In the intervening 3 years, the API has changed, so I’ve revisited the scripts to update them to the new shiny “Cloudflare API V4”. The updated scripts are tested on the current latest image of Raspbian Stretch at the time of writing. The new scripts are available on GitHub here.

The structure of the scripts is still the same:

  • is the main update script, intended to be setup to run automatically via crontab or similar.
  • is used to read the host id value from the host record that needs updating (while Cloudflare mention some API details and stubs of requests in the API section of the DNS dash page, there still doesn’t seem to be a nice way to get this id. Its just mentioned as “:identifier” in those stubs).

If they break again and I don’t notice, or if there are any problems with the scripts, please raise an issue on the Github Repo.

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.