Unable to create certificates on Ubuntu 22.04 even with valid API key

Hello everyone,

I’m running Traefik on Ubuntu 22.04 inside Docker and I’m facing issues with certificate creation. Despite having a valid Cloudflare API key configured, the certificates are not being generated.

I can see Traefik attempting to obtain certificates in the logs, but it eventually fails. Here’s a snippet:

time="2025-09-08T12:55:26+05:30" level=debug msg="legolog: [INFO] [hungrytimes.in, *.hungrytimes.in] acme: Obtaining bundled SAN certificate"
time="2025-09-08T13:16:29+05:30" level=error msg="accept tcp [::]:443: use of closed network connection" entryPointName=websecure
time="2025-09-08T13:16:29+05:30" level=error msg="close tcp [::]:443: use of closed network connection" entryPointName=websecure

I’ve double-checked that the Cloudflare API credentials are correct and active.

Has anyone encountered a similar issue on Ubuntu 22.04 with Docker? Are there specific steps, configuration tweaks, or debugging methods I should try to resolve this?

Any guidance would be greatly appreciated.

Thanks in advance!

Share your full Traefik static and dynamic config, and Docker compose file(s) if used. Enable Traefik DEBUG log (doc).

The error use of closed network connection sometimes appears during Traefik container shutdown. Those are most likely not related to your TLS issues. Also note the time difference.