A caddy v2 plugin for dealing with dynamic DNS setups. See the documentation for DynDnsHandler for more details.
Build a custom Caddy:
$ go install github.com/caddyserver/xcaddy@latest
$ xcaddy build \
--with github.com/nelsonxb/caddy-dyndns \
--with github.com/caddy-dns/...
This plugin was mainly developed to use with a FRITZ!Box. You might find a setup like the following useful:
{
"apps": {
"http": {
"servers": {
"default": {
"routes": [{
"match": [{
"remote_ip": { "ranges": ["192.168.178.1"] },
"path": ["/.ddns"]
}],
"handle": [
{
"handler": "authentication",
"providers": {
"http_basic": {/*...*/}
}
},
{
"handler": "dyndns",
"domain": "my.domain.com",
"provider": {/* dns.providers.* */}
}
]
}]
}
}
}
}
}
Then, in the FRITZ!Box, configure DynDNS using the User-defined provider:
Setting | Value |
---|---|
Update URL | http://192.168.178.x/.ddns?4=<ipaddr> http://192.168.178.x/.ddns?6=<ip6addr> (or <ip6addr> could be <ip6lanprefix> , also note the two space-separated URLs) |
Domain name | my.domain.com |
User name | As configured in Caddy |
Password | As configured in Caddy |