ddclient: how to install as a Docker Container

The ddclient program is used to do dynamic IP updates to a wide range of dynamic DNS servers. I like to run ddclient as a separate Docker container for easy updates, and minimal host system manipulation. I’ll be using Docker built on top of Ubuntu Server 16.04.


For the dynamic DNS system I will be using Namecheap domain provider. Once you have configured Namecheap you will need three pieces of information:

I want to create a Dynamic DNS record of: remote.techgrowingpains.com

login: techgrowingpains.com
password: <Dynamic DNS password>
sub-domain(s): remote

Note: You can add multiple sub-domains separated by commas.

Host System Set-Up:

We will need to get the user and group IDs for account creating the Docker ddclient container on the Docker host system with the  id <account> command.

javier@docker:~$ id javier
uid=1000(javier) gid=1000(javier) groups=1000(javier)

The ‘javier’ user ID ‘uid’ is 1000
The ‘javier’ group ID ‘gid’ is 1000

Next, create the ddclient configuration directory, and adjust folder permissions, on the host docker file system. For my purposes I use the  /opt/containters/parent directory for organizational purposes.

sudo mkdir -p /opt/containers/ddclient/config
sudo chown -R javier:javier /opt/containers/ddclient/

Code explanation: TGP: mkdir
Code explanation: TGP: chown

Docker Implementation:

docker run -d \
--name=ddclient \
-v /opt/containers/ddclient/config:/config \
-e PGID=1000 \
-e PUID=1000 \
-e TZ="America/Chicago" \

You can find a list of TZ formats at wikipedia: List of tz database time zones

The ddclient Docker container is up and running. Edit the ddclient conf file on the docker host file system:

sudo nano /opt/containers/ddclient/config/ddclient.conf

The default ddclient.conf file will have updated examples for many dynamic DNS providers. Using the information retrieved earlier enter your specific information at the end of the ddclient.conf file.

use=web, web=dynamicdns.park-your-domain.com/getip
password='<Dynamic DNS password>'

Once you save, and exit, the ddclient.conf file the ddclient application will reload with the new information.


For shell access into the container  docker exec -it ddclient /bin/bash

For real time log  docker logs -f ddclient


If you are familiar with using Docker compose you can build the container using the following docker-compose.yaml file.

version: "3"
    image: linuxserver/ddclient
      - PGID=1000
      - PUID=1000
      - TZ="America/Chicago"
      - /opt/containers/ddclient/config:/config

About the Author

%d bloggers like this: