How automatic HTTPS with Let’s Encrypt works
How self-hosted apps get free HTTPS certificates: the ACME protocol, HTTP-01 vs DNS-01, rate limits, shorter certificate lifetimes, and what can go wrong.
Free, automatic HTTPS is one of the reasons self-hosting became practical. A decade ago a certificate cost money and a renewal was a calendar reminder; today a server asks Let’s Encrypt for a certificate, proves it controls the domain, and renews on its own. This post explains what actually happens, so that when it fails you know where to look.
The pieces
- A certificate authority (CA): Let’s Encrypt is a free, non-profit CA trusted by every major browser. ZeroSSL and Google Trust Services offer free ACME certificates too.
- The ACME protocol: the standard (RFC 8555) a client uses to ask a CA for a certificate and answer its challenges.
- An ACME client: certbot, acme.sh, or a server with ACME built in, such as Caddy or Traefik.
- A challenge: the proof that you control the name you are asking for.
The three challenge types
HTTP-01. The CA gives your client a token; the client makes it available at http://<your-domain>/.well-known/acme-challenge/<token>; the CA fetches it over the internet on port 80. Simple and the most common, but it needs port 80 reachable from outside and it cannot issue wildcard certificates.
TLS-ALPN-01. The same idea over port 443: the client answers a special TLS handshake. Useful when port 80 is blocked but 443 is open. Also no wildcards.
DNS-01. The client publishes a TXT record under _acme-challenge.<your-domain>. It works without any open port and is the only way to get a wildcard certificate such as *.example.com — but the client needs API credentials for your DNS provider, which is a powerful secret to leave on a server.
What a renewal cycle looks like
Let’s Encrypt certificates are short-lived on purpose. As of 10 November 2026 the default certificate lasts 90 days, and Let’s Encrypt has published a schedule to shorten it: the default profile moves to 64 days on 10 February 2027 and to 45 days on 16 February 2028. A good client renews well before expiry — around two-thirds of the way through is typical — so a failed attempt has days or weeks to succeed on retry.
One more change catches people out: Let’s Encrypt stopped sending expiry reminder emails on 4 June 2025. If your renewals break silently, nobody will warn you. Monitoring certificate expiry yourself — Uptime Kuma can do it — is now part of the job.
Rate limits
Let’s Encrypt limits how fast you can ask. Among the limits listed on its documentation as of 10 November 2026: 50 new certificates per registered domain every 7 days, 5 certificates for the exact same set of names every 7 days, and 5 failed validations per name per hour. The last one is the one self-hosters hit: a misconfigured DNS record plus a client that retries quickly locks you out for a while. Fix the cause, then wait.
Why it fails
- The DNS record does not point at the server yet, or still points at the old one. Check with dig +short app.example.com from outside.
- Port 80 or 443 is closed — at the provider’s firewall, the server’s firewall, or the home router.
- The server is behind CGNAT, so no inbound connection can reach it at all.
- Another process owns port 80 (an old Apache or nginx), so the challenge request never reaches the ACME client.
- A CDN or proxy in front answers the challenge instead of your server.
# from your laptop, not the server
dig +short app.example.com
curl -I http://app.example.com/.well-known/acme-challenge/testThe second command should reach your server (a 404 is fine). A timeout means the request never arrived.
Names a public CA cannot validate
Let’s Encrypt can only issue for names it can check from the public internet. A name that exists only on your home network — nas.lan, something.local, or a bare internal hostname — cannot pass HTTP-01 or TLS-ALPN-01, and is not eligible for a public certificate at all. For those, the usual options are:
- Use a real domain you own for internal services too, and validate with DNS-01, so the certificate is public but the service is only reachable on your network.
- Run a private certificate authority (step-ca, or a tool such as mkcert for development) and install its root certificate on your own devices.
- Accept a self-signed certificate for an admin page that only you open, and check its fingerprint the first time.
Whichever you pick, avoid turning off certificate checks in apps that talk to each other. That habit outlives the test setup it was meant for.
How Keenrig handles it
Keenrig’s gateway is Caddy, and Caddy’s automatic HTTPS does the work: when you install an app on a domain, Caddy requests a certificate for that exact name from Let’s Encrypt using HTTP-01 or TLS-ALPN-01, and renews it on its own schedule. Nothing to install, no cron job. Before you even add a domain, the admin panel works on the server’s IP address; over HTTPS that address uses a self-signed certificate, so the browser shows a warning once.
With a *.keenrig.app name from Keenrig Cloud (free on any plan once paired), the cloud creates the DNS record for you; the certificate is still issued per name, by your server. A paired server behind CGNAT gets a tunnel for its admin panel only — installed apps still need their own certificate issued directly, which needs ports 80 and 443 reachable.
Limits
- No wildcard certificates. Keenrig issues one certificate per hostname and never asks for your DNS provider’s credentials.
- Your server must be reachable on ports 80 and 443 for certificates to be issued on it. Behind CGNAT, use the tunnel or move to a VPS.
- Keenrig does not alert you about expiring certificates yet; external monitoring is still worth setting up.
The quickest way to watch all of this happen is to point a domain at your server and install the Caddy static site app from the catalog: within a minute or so the page loads over HTTPS with a valid certificate.