Some services like inadyn or ddclient for updating a resolvable name at a DynDNS provider are sometimes hard to configure. The ddns-updater comes in a Docker image and a web interface for monitoring the state. So let's try this out.
To let interact the ddns-updater with the internet out of its container properly, Docker must be configured to assign IPv6 addresses to it's containers. This is described in this guide.
The container image comes on Docker hub and the best way to install this on a local Docker host is to write a new service section in the docker-compose.yml
file:
services:
ddns-updater:
image: qmcgaw/ddns-updater
container_name: ddns-updater
network_mode: bridge
ports:
- 8000:8000/tcp
volumes:
- ddns-updater-data:/updater/data
environment:
- CONFIG=
- PERIOD=5m
- UPDATE_COOLDOWN_PERIOD=5m
- PUBLICIP_FETCHERS=all
- PUBLICIP_HTTP_PROVIDERS=all
- PUBLICIPV4_HTTP_PROVIDERS=all
- PUBLICIPV6_HTTP_PROVIDERS=all
- PUBLICIP_DNS_PROVIDERS=all
- PUBLICIP_DNS_TIMEOUT=3s
- HTTP_TIMEOUT=10s
# Web UI
- LISTENING_ADDRESS=:8000
- ROOT_URL=/
# Backup
- BACKUP_PERIOD=0 # 0 to disable
- BACKUP_DIRECTORY=/updater/data
# Other
- LOG_LEVEL=info
- LOG_CALLER=hidden
- SHOUTRRR_ADDRESSES=
restart: always
volumes:
ddns-updater-data:
With a docker compose up -d
the container image is pulled and started.
The configuration file resides inside of the container mounted volume and is host accessible under /var/lib/docker/volume/ddns-updater-data/_data/config.json
.
Here we are using a configuration example for the free desec.io
service:
{
"settings": [
{
"provider": "desec",
"domain": "exampledomain.dedyn.io",
"host": "host1,host2",
"token": "<token>",
"ip_version": "ipv4",
"provider_ip": true
}
]
}
It turns out, that the service dynv6 isn't working with that mechanism for subdomains, so once again, also this updater has it's drawbacks.
By opening the URL given by the Docker container localhost:8000
there is a nice overview of all the entries and their update status.