I want to start moving over to Caddy 2 but would like to convert this Caddyfile properly, so that it works. The current Caddy 1.0 works fine with the above Caddyfile.
The proxy directive is now reverse_proxy, and websocket and transparent subdirectives aren’t needed anymore, those are now implicit. Also, all headers are forwarded by default now, so you shouldn’t need anything in v2 for the Authorization header to be passed through.
For v2, DNS challenge is supported, but no DNS-challenge-provider plugins have been implemented yet. For now, you could use the HTTP challenge instead, which requires having port 80 open. You’ll need to specify an email. See the tls docs here.
I’m not sure if there’s time-frame set for it. We’re currently limited in resources and time. The codebase and the config structure have support for the DNS challenge, but, as @francislavoie said, no DNS-challenge-providers have been implemented and compiled into the codebase yet.
So to use the DNS challenge for duckdns, you will need a Caddy module that accepts the config of this shape:
"challenges": {
"dns": {
"provider": "duckdns",
// whatever the duckdns API requires for the DNS challenge
}
}
Am I correct in saying it’s now possible to use Cloudflare DNS challenges in Caddy v2, similar to what I’m currently using in v1? https://github.com/caddyserver/tls.dns