Namecheap multiple domain hosts with ddclient




Wednesday, August 22, 2012

Linux Make ddclient Work with Multiple Namecheap Domains


If you are using ddclient 3.8.1 or older, and are updating multiple Namecheap domains, there is a possibility it is not working.

If you are updating multiple domains, for example and, along with multiple hostnames for each domain, for example @, www, or mail, ddclient will only update the first hostname it encounters.

For example, if your /etc/ddclient/ddclient.conf looks like the configuration below, during each update only,,, and will be updated.,, and will not be updated because those hostnames were already checked for the first domain name.

protocol=namecheap, \, \ \ password=faefjawpefoij30498320493r23 \ @, www, mail protocol=namecheap, \, \ \ password=faefjawpefoij30498320493r23 \ @, www, mail, smtp

The following steps can be followed to fix this. Note that this patch has only been tested on ddclient 3.8.1 running on RHEL 6. Your mileage may vary with different versions and Linux distributions, and this patch may be applied to future ddclient releases negating the need for these steps.

Patch ddclient

Stop the ddclient service:

service ddclient stop

Copy your existing ddclient binary to another folder:

mkdir /root/ddclient-patch cp /usr/sbin/ddclient /root/ddclient-patch/

Download and save the ddclient patch:

wget -O /root/ddclient-patch/ddclient.patch

Change to the directory:

cd /root/ddclient-patch

Apply the patch:

patch -b -p0 -i ddclient.patch # Successful output patching file ddclient

Copy the newly patched ddclient back:

cp /root/ddclient-patch/ddclient /usr/sbin/

Modify /etc/ddclient/ddclient.conf

Modify your /etc/ddclient/ddclient.conf file and add the domain name to each hostname like so:

protocol=namecheap, \, \ \ password=faefjawpefoij30498320493r23 \,, protocol=namecheap, \, \ \ password=faefjawpefoij30498320493r23 \,,,

Start the ddclient Service Again

Remove the ddclient cache file:

rm /var/cache/ddclient/ddclient.cache

Start the service:

service ddclient start

Monitor /var/log/messages to verify everything is working.

Leave a Reply