>_dockerfix
← back to error wikicoolify

Coolify: Let's Encrypt SSL certificate renewal fails

Failed to renew certificate: Challenge failed for domain
type: urn:ietf:params:acme:error:unauthorized

What's happening

Coolify provisions and renews certificates through Traefik's ACME HTTP-01 challenge, which requires port 80 on the domain to be publicly reachable and pointed at the exact server Coolify is running on at the moment of renewal. Renewal failures are almost always environmental, not a Coolify bug: DNS for the domain changed or has a stale A record, a firewall or another reverse proxy is intercepting port 80 before Traefik sees it, or the domain's Cloudflare proxy (orange cloud) is rewriting/blocking the HTTP-01 challenge path.

Fix

1. Confirm DNS resolves to the current server IP: `dig +short yourdomain.com`.
2. If using Cloudflare, temporarily set the DNS record to 'DNS only' (grey cloud) during renewal — the orange-cloud proxy can break HTTP-01 challenges.
3. Confirm port 80 is open and reaches Traefik, not something else: `curl -I http://yourdomain.com/.well-known/acme-challenge/test` from an external host.
4. Check for a second reverse proxy or firewall rule (ufw, cloud provider security group) blocking inbound 80.
5. Check Traefik's logs in Coolify's dashboard for the specific ACME error — `unauthorized` usually means the challenge file wasn't reachable from Let's Encrypt's servers, not a local issue.
Got a different error? Paste it here for a free diagnosis.