BLACK FRIDAY 2026 LIVE: RackNerd 4GB VPS $47.98/yr (Lifetime) · ElevenLabs 55% Off · Hostinger 73% Off · Amazon Local AI Hardware View Verified Deals →
Medium · HTTPS & Caddy

How to Fix Caddy ACME HTTP-01 TLS Certificate Failure

TL;DR Fix

Port 80 is blocked by UFW/firewall, occupied by Apache/Nginx, or Cloudflare orange-cloud proxy conflicts with HTTP-01 challenge. Check port 80 listeners before launching Caddy on a fresh VPS.

Exact Error Signature

obtaining certificate: HTTP 400 urn:ietf:params:acme:error:unauthorized

Copy-Paste Fix Commands

sudo ss -tulpn | grep -E ':80|:443'
sudo ufw allow 80/tcp && sudo ufw allow 443/tcp
# If behind Cloudflare, set SSL/TLS mode to Full (Strict) or use DNS-01 / cloudflared.

Preventing Recurrence

Check port 80 listeners before launching Caddy on a fresh VPS.

More Production Error Fixes