Make Gadgets Work

DDCLIENT set-up on Fedora for Namecheap

Ankit Mittal


  1. Configure Namecheap
  2. Set-up DDCLIENT
  3. Test DDCLIENT
  4. Set up DDCLIENT to run at start-up
  5. Known Issue with DDCLIENT

Configure Namecheap

Follow the Namecheap guide here


For a subdomain "", just replace @ with "oxygen"


#Install DDCLIENT on Fedora
sudo dnf install ddclient
#Edit the configuration file to update IP on your Dynamic DNS host
sudo nano /etc/ddclient/ddclient.conf

Press Ctrl+W and type the name of host for your Dynamic DNS. Mine is with Namecheap and I needed to configure for the subdomain hence following config reflects how to do it for Namecheap. For other hosts, you will need to refer their documentation.

## NameCheap (
protocol=namecheap, \, \, \
password=<copy the password from namecheap advanced DN section> \

The password to be provided above is what you will find on namecheap dashboard (Ref. Screenshot above).

  1. Log in to the namecheap account.


Before we schedule ddclient to run at boot, we need to test if it has been configured properly and is able to communicate with Namecheap by sudo ddclient -daemon=0 -debug -verbose -noquiet. If it is configured properly, you will see a message similar to this as part of the final output.

SUCCESS: updating oxygen: good: IP address set to

If it is not what you see, and more importantly, if you do not see last line as "Success", then there is something wrong with configuration and you must correct it before proceeding.

If this test worked, we are ready to update the DDCLIENT service.

Set up DDCLIENT to run at start-up

When we install ddclient using dnf, a ddclient.service file is automatically created in the location /etc/systemd/system/ddclient.service with following content.

Description=A Perl Client Used To Update Dynamic DNS

ExecStartPre=/bin/touch /var/cache/ddclient/ddclient.cache
ExecStart=/usr/sbin/ddclient $DDCLIENT_OPTIONS


We will enable and start this service by issuing following commands:

sudo systemctl enable ddclient.service
sudo systemctl start ddclient.service

One would think that enabling and starting this service is all you need to do but that is not usually the case. I was getting following error:

/bin/touch: cannot touch `/var/cache/ddclient/ddclient.cache': Permission denied

A quick google search establishes that there seems to be some bug in how the ddclient cache file is created and how the permissions are set. After lot of searching, scratching head later, I did the following which fixed the issue. So if sudo systemctl start ddclient results in error, you may need to do the following:

#Go Root
#Create a directory for ddclient
mkdir /var/run/ddclient
#Chown the various directories for ddclient as user
chown ddclient:ddclient /etc/ddclient.conf
chown ddclient:ddclient /var/run/ddclient/
#change directory
cd /var/run/ddclient
#delete ddclient.cache if it exists
rm ddclient.cache
#change directory
cd /etc/sysconfig
#delete ddclients.cache
rm ddclients.cache
#create a blank ddclient.cache
nano /var/run/ddclient/ddclient.cache
#chown it for ddclient user
chown ddclient:ddclient /var/run/ddclient/ddclient.cache
#exit root
#enable and start ddclient service
sudo systemctl enable ddclient.service
sudo systemctl start ddclient.service

Done !!!

Known Issue with DDCLIENT

There is a known issue and I can confirm that I have seen on my logfile as recently as today.

WARNING: cannot connect to socket: IO::Socket::INET: Bad hostname ''

It isn't major but it is there and restarting the service by issuing the command sudo systemctl restart ddclient.service fixes the problem.