Self-Hosting · Security
HTTPS for Internal Services: Internal CAs, mkcert, step-ca, and DNS Challenges
Services you only reach at home still deserve HTTPS — logins and session cookies cross your LAN in plaintext without it — but a self-signed certificate trains everyone in the house to click through browser warnings, which is worse than no warning at all. There are four good ways to get warning-free HTTPS on internal names. They differ mainly in one step: how your devices learn to trust the certificates.
Published Nov 20, 2026
Option 1: a real domain and DNS-01 (the least machinery)
Buy a cheap domain, keep it pointed nowhere public, and issue genuine Let’s Encrypt certificates for names like nas.home.example.com using the DNS-01 challenge — the one challenge type that proves ownership by editing a DNS record, so the server never needs to be reachable from the internet. Your reverse proxy (NPM, Caddy, and Traefik all support DNS-01 through DNS-provider plugins) renews automatically, every device on earth already trusts Let’s Encrypt, and there is nothing to install on phones or laptops. Wildcards (*.home.example.com) are available through DNS-01 only. For most homes this is the answer: a few dollars a year to never think about trust stores. Note the direction of travel — Let’s Encrypt’s default lifetime falls to 64 days in February 2027 and 45 days in February 2028 — which is fine, because this route is automated end to end.
Option 2: Caddy’s built-in internal CA (the easiest private CA)
If your proxy is Caddy, it already contains a small certificate authority. Mark internal names with tls internal and Caddy issues certificates from its local CA automatically. The one-time cost is trust: run caddy trust on machines you administer (it installs the root into the system store), and manually install the root certificate on phones and other devices. Caddy’s root has a very long lifetime while the issued certificates are short-lived and auto-renewed, so after the trust step there is nothing recurring to do. This is the sweet spot for a Caddy household; see the proxy comparison for the surrounding setup.
Option 3: mkcert (a few devices, developer-style)
mkcert creates a local CA and ready-to-use certificates with one command, and mkcert -install adds its root to the local machine’s trust store. It is excellent for its designed job — development machines and a handful of devices you control — and the wrong tool beyond that: the root must be installed on every client device individually, there is no renewal automation or revocation story, and the project is mature but effectively unmaintained (current release 1.4.4). Fine for a workbench; don’t build the household on it.
Option 4: step-ca (a real home PKI)
Smallstep’s step-ca is a proper private CA you run as a service, with an ACME provisioner — meaning your servers and proxies can request and renew certificates from it with the same tooling they use for Let’s Encrypt, and policies (lifetimes, allowed names) are set in one place. It is the right answer when the count of internal services and devices grows past what manual trust installs can carry, or when you want certificates for things that are not web services at all. Two cautions: keep it current — a critical vulnerability (CVE-2026-30836) was fixed in step-ca 0.30.0, so anything older must not be deployed — and understand that you have taken on a piece of infrastructure whose own availability now matters. For most homes it is more PKI than they need; for a large homelab it is the grown-up option.
Whichever route: the habits that make it work
Use real, consistent internal names (a subdomain of a domain you own beats invented TLDs, which can collide with future public TLDs and break the DNS-01 upgrade path). Keep the internal DNS answers inside the house — our DNS architecture guide covers split DNS so nas.home.example.com resolves to a LAN address at home. And remember what HTTPS does not do: it protects the connection, not the service — the exposure hierarchy still decides what gets published, and a certificate on a service that shouldn’t be reachable is polish on a mistake.
Official documentation and references
- Let’s Encrypt challenge types — DNS-01 and when each challenge applies
- Caddy automatic HTTPS — including the internal CA and caddy trust
- step-ca documentation — running a private ACME CA
- mkcert — the local development CA tool
Frequently asked questions
Why not just use the service’s IP address with HTTP at home?
Because “at home” traffic still crosses devices you don’t fully control — a compromised IoT gadget on the same network can watch plaintext logins. HTTPS on internal names removes that class of snooping, and once set up it costs nothing. The real risk to avoid is the self-signed warning habit: clicking through warnings trains exactly the reflex attackers rely on.
Do I need to expose my server to the internet for a Let’s Encrypt certificate?
No. The DNS-01 challenge validates by DNS record, so the server can be completely unreachable from outside. Your proxy needs API access to your DNS provider to place the challenge record, and renewals then happen automatically. HTTP-01 is the challenge that needs a public port; nothing forces you to use it.
How many devices can I install a private root CA on before it becomes silly?
Roughly: a household’s worth of phones, laptops, and tablets (say, under a dozen) is an evening’s work with Caddy’s CA or mkcert. Beyond that — many users, many services, non-browser clients — step-ca’s ACME automation earns its keep, because issuance and renewal stop being manual on both sides.
What happens when the private root expires or the CA dies?
Clients start warning again for every internal service at once — annoying, not catastrophic, because the services themselves are untouched. Caddy’s root is extremely long-lived, which makes this a rare event; with step-ca, back up the CA’s keys and configuration like any other critical service, since losing them means re-issuing trust everywhere.

