← All guides

Reverse proxy for the home lab: clean names, one HTTPS front door

Networking · 9 min read

Wall-mounted network cabinet with a glowing switch and bundled cables running down to small servers on a desk
One front door: every service arrives through a single point.

A few services in, a home lab turns into a list of addresses nobody can remember: one dashboard on port 8096, another on 8123, a third on 9000, each reached by raw IP address and each answering over plain HTTP with a browser warning if it answers securely at all. A reverse proxy fixes the shape of the problem. One machine, or one container, becomes the front door. It owns a name for every service, terminates HTTPS, and passes each request to the right backend. Everything else in this guide is about doing that in the right order, because the most common mistake happens before any software is installed: exposing services to the internet that only ever needed to work inside the house.

Safety note: a reverse proxy concentrates access; it does not make a weak service strong. Any service you publish still needs its own login, its own updates, and a password worth the name. Treat the steps below as transport security, not as a substitute for securing the services behind the door.

Decide first: LAN-only, or public on purpose?

Most comparison guides start with software. Start with reach instead. There are three sensible postures for a home lab service, and the proxy configuration is different for each:

PostureWho can reach itCertificateRouter change
LAN-onlyDevices on the home networkInternal: Caddy issues from its own local CA for local namesNone
LAN + VPNHome network, plus your devices over a VPN tunnelSame internal setup as LAN-onlyNone beyond the VPN itself
PublicAnyone on the internetPublicly trusted, obtained automaticallyForward ports 80 and 443 to the proxy only

The default worth choosing is the first or second row. Dashboards, hypervisor pages, and admin tools almost never need to be public, remote access to them is exactly the job a VPN already does well. Reserve the public row for a service you would be comfortable defending on its own: one that other people genuinely use, kept updated, with its own strong sign-in. Decide per service, write the decision down, and let the proxy enforce it, a hostname that only resolves inside your LAN cannot be reached from outside it, no matter what the proxy would allow.

Caddy vs Nginx Proxy Manager

Both tools terminate HTTPS and obtain certificates automatically. They differ in how a change is made, and that difference decides which one a beginner will still understand at midnight:

CaddyNginx Proxy Manager
ConfigurationA short text file (the Caddyfile), one block per serviceA web UI: proxy hosts, SSL tab, access lists
HTTPSAutomatic by default when Caddy knows the hostname; HTTP is redirected to HTTPSRequested per proxy host; Force SSL option per host
Access controlRules you write yourself in the config fileBuilt-in access lists: allow or deny by IP, optional username/password layer
Admin surfaceNo web admin UI to protectAn admin UI on port 81 that must itself be protected
BackupsThe Caddyfile plus the persistent data directory holding certificatesThe /data and /etc/letsencrypt volumes

Choose Caddy when services change from the terminal anyway and a file that can be copied, diffed, and backed up sounds right. Choose Nginx Proxy Manager when a visual list of hosts and certificates is the difference between maintaining the setup and avoiding it. Either is a defensible answer; running both is not, one front door, one place to audit.

Path A: Caddy, step by step

  1. Give the proxy a fixed address. Reserve a static LAN address for the machine or container running Caddy, and create the DNS names you plan to use (for LAN-only, your router or local DNS maps names like service.home to that address).
  2. Write one site block per service. The documented minimal form is a hostname line followed by the directive:
    photos.example.com
        reverse_proxy 192.168.1.40:8096
    Replace the hostname and the backend address with your own. When Caddy knows the hostname, it serves the proxy over HTTPS automatically.
  3. For a public name, meet the public conditions first. A publicly trusted certificate requires the domain's DNS records to point at your server and ports 80 and 443 to be open to the public and directed toward Caddy. For a LAN-only name, expect the local behaviour instead: names like localhost use an auto-renewing self-signed certificate from Caddy's own CA, and a client that does not trust that root will show a security warning once, that prompt, and installing the root on your own devices, is the honest price of staying private.
  4. Test the one-liner before committing to a file. The quick-start command caddy reverse-proxy --from example.com --to localhost:9000 runs the same proxy immediately, which is a fast way to prove a backend answers before you formalise its block.
  5. Close the side doors. On each backend service, remove any direct port publishing or firewall opening so the service answers only through the proxy (or only from the proxy's address). A proxy in front of a still-open backend is decoration, not a door.

Path B: Nginx Proxy Manager, step by step

  1. Install with the admin UI bound privately. A hardened documented install keeps the admin interface on 127.0.0.1:81 rather than published to the network, and keeps both the /data and /etc/letsencrypt volumes so hosts and certificates survive container recreation.
  2. Create the administrator properly. Current versions create the admin account on a first-run screen instead of shipping a default login; use a real email address, because Nginx Proxy Manager also uses it for Let's Encrypt.
  3. Add a proxy host. Under Proxy Hosts, add the domain name, the forward hostname or IP, and the forward port of the backend. When the backend is another container, put both on one shared Docker network and forward to the container's service name and its internal port, entering localhost there produces a 502, because to Nginx Proxy Manager, localhost means itself.
  4. Request the certificate in the same flow. In the host's SSL tab, request a new Let's Encrypt certificate and enable Force SSL. Know which challenge you are using: HTTP-01 needs DNS pointing at the server and port 80 open; DNS-01, with a scoped DNS provider token, also covers wildcard names and works for names that are not publicly reachable.
  5. Use access lists deliberately. For any host that stays public but is really only for you, attach an access list that allows your own addresses and denies the rest, optionally with a username and password layer in front of the service's own login.
  6. Close the side doors, exactly as in the Caddy path: backends stop publishing their own ports.

What success looks like

Four checks, in order. First, the name works: browsing to the service's hostname loads it over HTTPS with no warning on a device that should trust the setup. Second, HTTP redirects: the plain http:// address lands on the HTTPS version, which both paths do automatically once certificates are in place. Third, the renewal story is real: the certificate's storage lives in a persistent place (Caddy's data directory, or the Nginx Proxy Manager volumes above), not in a throwaway container layer. Fourth, the check almost every tutorial skips, the bypass test: from another device, try the backend directly at its old IP:port address. It should fail to answer for any service you meant to put behind the door. If it answers, the setup is not finished, whatever the proxy screen says.

Back up the front door

The proxy is now a dependency of every service, so its configuration belongs in the same backup routine as the services themselves. For Caddy that is the Caddyfile plus the data directory; automatic HTTPS depends on that data directory being writable and persistent, and losing it forces fresh issuance for every name at once. For Nginx Proxy Manager it is the two volumes named in its install step. A one-paragraph note recording which names are LAN-only and which are public, the decision table from the start of this guide, is the third backup item, and the one future-you will thank present-you for when a name stops resolving and the question is whether it ever should have.

FAQ

Do I need a domain I own for LAN-only names? No. A private suffix resolved by your own DNS works, at the cost of trusting Caddy's local CA on your devices. Owning a real domain mainly buys publicly trusted certificates and names that also work in the public posture.

Can the proxy make an insecure service safe to publish? No. It adds HTTPS and one auditable entry point. A service with no login, or one that is months behind on updates, stays unpublished, that decision is the first table in this guide, not a proxy feature.

Why a 502 from Nginx Proxy Manager? Most often the forward host is wrong for a containerised backend: use the service name on the shared Docker network and the container's internal port, not localhost and not the host's mapped port.

Next: WireGuard for home lab remote access →