Start using ddclient

For more than 10 years, I’ve been a happy client of Tweak (how long will that link work?). One of the many features it offered was a fixed IP address.

Now that I’m forced to switch to Odido, I will lose this affordance, which serves me greatly whenever I need to connect to my VPN at home. In fact, my phone and laptop are configured to just connect to a subdomain of lanzani.nl, which pointed to my home address, and that address never changed.

I then started looking for ways to update my IP address automatically. Luckily, there seems to be a service that’s been designed for this, ddclient that I’ve set up in my home server as follows:

# ddclient.conf
daemon=600
use=web
protocol=porkbun
apikey=APIKey
secretapikey=SecretAPIKey
subdomain.lanzani.nl
services:
  ddclient:
    image: lscr.io/linuxserver/ddclient:latest
    container_name: ddclient
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - /path/to/code/ddclient:/config
    restart: unless-stopped
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────
      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝
   Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    1000
User GID:    1000
───────────────────────────────────────
[custom-init] No custom files found, skipping...
Setting up watches.
Watches established.
[ls.io-init] done.
/config/ddclient.conf MODIFY 
ddclient has been restarted
Setting up watches.
Watches established.
SUCCESS:  updating ipv4: skipped: subdomain.lanzani.nl address was already set to ...

That’s it. Just a few lines of code, and the problem is gone!