A lightweight DynDNS bridge for Fritz!Box routers that keeps Cloudflare AAAA (IPv6) records in sync with your home network.
When your ISP rotates your IPv6 prefix (or reassigns your router's WAN address), Fritz!Box calls this service via its built-in DynDNS hook. The service upserts Cloudflare DNS records — creating them if they don't exist, updating them only when the address has changed.
Two record modes are supported:
- Prefix + suffix — combines the delegated LAN prefix with a static per-host suffix. Use this for hosts behind the router (NAS, server, etc.).
- Router IP — uses the router's WAN IPv6 address directly. Use this when you want a DNS record for the router itself and the ISP assigns the full address (no fixed suffix).
Prefix + suffix mode (hosts behind the router):
Fritz!Box → GET /update?token=<secret>&ip6lanprefix=2001:db8:1234::/64
↓
prefix "2001:db8:1234::/64" + suffix "::1"
↓
Cloudflare AAAA "2001:db8:1234::1"
Router IP mode (the router itself):
Fritz!Box → GET /update?token=<secret>&ip6addr=2001:db8:1234:5601:abcd:ef01:2345:6789
↓
Cloudflare AAAA "2001:db8:1234:5601:abcd:ef01:2345:6789"
Both parameters can be sent in the same request to update all record types at once.
- A Cloudflare account with DNS zones managed by Cloudflare
- A Cloudflare API token with DNS:Edit permission for the target zone(s)
- A Fritz!Box router with DynDNS support
Copy config.yaml and fill in your values:
# Secret token Fritz!Box sends with every update request.
update_token: "change-me"
cloudflare:
api_token: "your-cloudflare-api-token" # or set CLOUDFLARE_API_TOKEN env var
records:
# Prefix + suffix: full address = ip6lanprefix + suffix
- zone_id: "your-cloudflare-zone-id"
name: "home.example.com"
suffix: "::1"
- zone_id: "your-cloudflare-zone-id"
name: "nas.example.com"
suffix: "::2"
# Router IP: no suffix → uses ip6addr (the router's WAN IPv6 address) directly
- zone_id: "your-cloudflare-zone-id"
name: "router.example.com"update_token and cloudflare.api_token can be overridden via environment variables UPDATE_TOKEN and CLOUDFLARE_API_TOKEN respectively.
The image is published to the GitHub Container Registry. Pull and start with:
docker compose up -dThe service binds to port 8080. Pass secrets via env vars to avoid storing them in config.yaml:
UPDATE_TOKEN=secret CLOUDFLARE_API_TOKEN=cf-token docker compose up -dTo pin a specific release instead of latest, edit docker-compose.yml and change the image tag:
image: ghcr.io/aivus/dyndns:1.0.0go run ./cmd/dyndns -config config.yaml -addr :8080To enable debug logging:
go run ./cmd/dyndns -config config.yaml -addr :8080 -debugWith Docker Compose, add -debug to the command in docker-compose.yml:
services:
dyndns:
image: ghcr.io/aivus/dyndns:latest
command: ["-config", "/config/config.yaml", "-addr", ":8080", "-debug"]In Fritz!Box go to Internet → Freigaben → DynDNS and configure:
| Field | Value |
|---|---|
| Provider | Custom |
| Update URL | http://<your-server>:8080/update?token=<username>&ip6lanprefix=<ip6lanprefix>&ip6addr=<ip6addr> |
| Domain name | (any valid domain name) |
| Username | your secret token (Fritz!Box sends this as token) |
| Password | (any value) |
Fritz!Box substitutes <username>, <ip6lanprefix>, and <ip6addr> with the actual values on each update. Including both parameters lets you update prefix+suffix records and router IP records in a single request. You can omit either parameter if you only have one record type.
go test ./...
go vet ./...CI runs on every push to main and on all pull requests.
This project is licensed under the MIT License.