In conclusion I gave up on freedns (doesn’t do free dns challenge) and duckdns (unreliable free dns challenge) and bought a cheap 1.111B Class domain and manage it with free cloudflare.
This caddy-cloudflare docker image allowed me to migrate my two html challenge caddy hosts to dns challenge.
To get it to work I had to add a Caddyfile where the vanilla caddy docker image was working in html challenge without me adding one.
{$DOMAIN} {
# Proxy everything to Rocket
reverse_proxy myappcontainer:80
tls {
dns cloudflare {$CLOUDFLARE_API_TOKEN}
}
}
Time to enjoy automatic certificate renewals with no open ports in my homelab.