Caddy + Cloudflare: TLS challenge fails

1. The problem I’m having:

Hi there,

I am trying to use cloudflare DDoS protection on DNS level. Now I am getting HTTP 525 as the cert is invalid.

I found this source How to use Caddy with Cloudflare's SSL settings

So I would need to download GitHub - caddy-dns/cloudflare: Caddy module: dns.providers.cloudflare in order to get this working?

2. Error messages and/or full log output:

The logs tell me:

Cannot negotiate ALPN protocol "acme-tls/1" for tls-alpn-01 challenge

3. Caddy version:

v2.10.0 h1:fonubSaQKF1YANl8TXqGcn4IbIRUDdfAkpcsfI/vX5U=

4. How I installed and ran Caddy:

Ubuntu repository

a. System environment:

Ubuntu 24.04 LTS