Skip to content

ddclient handout

ddclient uses cloudflares api to store the dynamic ip in the dns record. the domain in use has been registered on namecheap and points to cloudflares nameserver.

installation

services:
    ddclient:
        image: lscr.io/linuxserver/ddclient:latest
        container_name: ddclient
        restart: unless-stopped
        environment:
            - PUID=1000
            - PGID=1000
            - UMASK=022
            - TZ=Galaxy/Earth
        volumes:
            - ./ddclient/config:/config

get api token from cloudflare

https://dash.cloudflare.com/profile/api-tokens

  1. create token
  2. choose use templatefor edit zone dns
  3. permission: zone dns edit and zone dns read
  4. zone resources: include all zones
  5. create token

configuration

~/ddclient/config/ddclient.conf

configfile has been edited for cloudflare

daemon=600              # check every 300 seconds
syslog=yes              # log update msgs to syslog
pid=/var/run/ddclient/ddclient.pid  # record PID in file.
ssl=yes                 # use ssl-support.  Works with
                        # ssl-library

use=web                 # via web
web=https://cloudflare.com/cdn-cgi/trace

##
## CloudFlare (www.cloudflare.com)
##
protocol=cloudflare
zone=domain.tld
ttl=1
login=token # Login for API Key: maillogin@cloudflare.com # Only needed if you are using your global API key. If you are using an API token, set it to "token" (wihtout double quotes).
password=SOMERANDOMTOKEN # API Key: SOMEAPIKEY # This is either your global API key, or an API token. If you are using an API token, it must have the permissions "Zone - DNS - Edit" and "Zone - Zone - Read". The Zone resources must be "Include - All zones".
domain.tld