Https certificates with caddy and duckdns

Hi all,
I use duckdns and my router have 80 and 443 ports blocked.
Reading on the net, I understood that I need a DNS challenge…
Could anyone help me to create the correct caddyfile?

Many thanks

Not sure what Caddy has to do here.
A “DNS challenge” means that the DNS record pointing to your duckdns domain must be updated with some random value.

If you are using the duckdns addon, it does this for you.