Jens Segers on May 21 2016

Dynamic DNS for CloudFlare with ddclient

Today I found out that ddclient added support for CloudFlare since version 3.8.2. Unfortunately, Ubuntu 14.04 ships with version 3.8.1, but I will show you how to update it.

It is actually easier to have the old version still installed because it sets up the background daemon. So make sure ddclient is installed, and perl has json support:

> sudo apt-get install ddclient libjson-any-perl

Now download and extract the last version of the ddclient binary. At the time of writing, the latest version is 3.8.3, click here to see if there is a newer version available and modify the download link below:

> wget
> tar -jxvf ddclient-3.8.3.tar.bz2

Then, overwrite the existing binary with the newer one:

> cp -f ddclient-3.8.3/ddclient /usr/sbin/ddclient

In this version, the location of the default configuration file has changed from /etc/ddclient.conf to /etc/ddclient/ddclient.conf. So create the new directory and move the old configuration file (or just create a new one):

> mkdir /etc/ddclient
> mv /etc/ddclient.conf /etc/ddclient

Below is my ddclient configuration using the cloudflare protocol. Use your CloudFlare global API key as the password, you can find it in the account section section. Make sure you replace all the values between *'s.


Hope this guide was useful!


ismail 2 years ago

how to make it autorun on startup

░▒▓█│【Walkman】│█▓▒░ 2 years ago

I had 3.8.2 and it said the cloudflare protocol didn't exists, thanks very much for this, and the config

aa6my1 2 years ago

@ismail sudo ddclient -daemon=0 -debug -verbose -noquiet

Ben Walters 2 years ago

Thanks for the walkthrough, Jens! It's easy to follow and saved me a lot of time in updating my guide on Setting Up a Raspberry Pi Web Server . I hope you don't mind me sharing your post.

Gino 2 years ago

What should i put on Full host name

jurgenweber 2 years ago

I keep getting

 ddclient[15498]: WARNING:  cannot connect to socket: Network is unreachable IO::Socket::IP configuration failed
ddclient[15498]: FAILED:   updating Could not connect to

any ideas?

Michael Moller 2 years ago


Try: sudo apt-get install ca-certificates

Reference Link:

Ben in Seattle 1 week ago

You'll need ddclient 3.9 if you want to use cloudflare with the v4 API. Also, remove the "server=" line as it will cause ddclient to fail silently. (The old address now redirects to, but if you don't specify the server, then ddclient does the right thing.)