Once your home lab grows past a handful of services, you hit the same wall everyone does. You’ve got Proxmox on :8006, Open WebUI on :3000, Grafana on :3001, Home Assistant on :8123, and you’re juggling a sticky note full of IP addresses and port numbers. Plus every one of them throws a big scary “Not Secure” warning in your browser.
A reverse proxy fixes both problems. Instead of http://192.168.1.50:3000, you type https://ai.lab.example.com and get a clean URL with a real, trusted SSL certificate. In this guide I’ll show you how to set up Nginx Proxy Manager with Docker, get free SSL certificates from Let’s Encrypt, and even grab a wildcard certificate so you never have to think about certs again.
What Is a Reverse Proxy (and Why Your Home Lab Needs One)?
A reverse proxy sits in front of your services and routes traffic based on the hostname you request. All of your traffic comes in on ports 80 and 443, and the proxy forwards it to the right container or VM behind the scenes.
Here’s what you get out of it:
- Clean URLs like
grafana.lab.example.cominstead of IPs and ports. - HTTPS everywhere with certificates that renew automatically.
- One place to manage access. Add access lists, basic auth, or block exploits from a single dashboard.
- Fewer open ports. If you ever expose something publicly, you only open 443, not a dozen random ports.
I spent years writing raw Nginx config files by hand for this, and they work great, until you fat-finger a semicolon at 11 PM. Nginx Proxy Manager (NPM) gives you the same Nginx engine under the hood with a simple web UI on top. It’s the easiest reverse proxy for home lab beginners, and it’s still what I recommend to most people starting out.
Lab Environment and Software Versions
| Component | Version / Spec |
|---|---|
| Host OS | Ubuntu Server 24.04 LTS |
| Docker Engine | 27.x with Compose v2 |
| Nginx Proxy Manager | jc21/nginx-proxy-manager:latest (2.13.x) |
| Proxy host IP | 192.168.1.60 |
| Domain | lab.example.com (DNS hosted on Cloudflare) |
| Example backend | Open WebUI at 192.168.1.50:3000 |
If you followed last week’s post on running a local LLM with Ollama and Open WebUI, that’s the service we’ll put behind the proxy as our example. Any web app works the same way though.
Prerequisites
Before you start, make sure you’ve got:
- A Linux box or VM with Docker installed. New to Docker? Start with my Docker home lab guide.
- A domain name you own. A cheap
.comor.devis fine. You need it for real Let’s Encrypt certificates. - Ports 80 and 443 free on the host. If something else is using them (like an old Apache install), stop it first.
- Local DNS you control. Pi-hole, AdGuard Home, or your router. I’ll show the Pi-hole approach below, and my Pi-hole setup guide covers the install.
Step 1: Deploy Nginx Proxy Manager with Docker Compose
Create a folder for the stack:
mkdir -p ~/stacks/npm && cd ~/stacks/npm
Then create docker-compose.yml:
services:
npm:
image: jc21/nginx-proxy-manager:latest # Pin a version once you're happy with it
container_name: nginx-proxy-manager
restart: unless-stopped
ports:
- "80:80" # HTTP, needed for redirects and HTTP-01 cert challenges
- "443:443" # HTTPS, where all your proxied traffic lands
- "81:81" # Admin web UI, keep this LAN only
environment:
TZ: "America/Chicago" # So log timestamps make sense
volumes:
- ./data:/data # Proxy hosts, users, and settings
- ./letsencrypt:/etc/letsencrypt # Your SSL certificates, back this up!
Start it:
docker compose up -d
docker compose logs -f # Watch for errors on first boot, Ctrl+C to exit
Step 2: Log In to the Admin Dashboard
Open http://192.168.1.60:81 in your browser.
Depending on the version you pulled, you’ll either be asked to create your admin account on first launch, or you’ll log in with the long-standing defaults (admin@example.com / changeme) and be forced to change them immediately. Either way, use a strong, unique password here. This dashboard controls the front door to your whole lab.
Step 3: Point Your Local DNS at the Proxy
For clean hostnames to work on your LAN, they need to resolve to the proxy’s IP, not the backend’s. This is the step people skip and then wonder why nothing works.
The easiest approach is a wildcard DNS record, so every *.lab.example.com name points at Nginx Proxy Manager. In Pi-hole, you can drop a dnsmasq config file in place:
# Send every *.lab.example.com lookup to the proxy at 192.168.1.60
echo "address=/lab.example.com/192.168.1.60" | \
sudo tee /etc/dnsmasq.d/99-lab-wildcard.conf
# Pi-hole v6 needs this setting turned on to read dnsmasq.d files
sudo pihole-FTL --config misc.etc_dnsmasq_d true
# Restart DNS so the change takes effect
sudo systemctl restart pihole-FTL
Test it from any machine on your network:
nslookup ai.lab.example.com
# Should return 192.168.1.60
Now every new service is just a proxy host away. No more DNS edits.
Step 4: Get a Free Wildcard SSL Certificate with Let’s Encrypt
Here’s the trick that makes this setup so nice for home labs. Normally Let’s Encrypt validates your domain by connecting to your server over port 80. That means opening ports to the internet, which we don’t want for internal services.
Instead, we’ll use a DNS challenge. Let’s Encrypt checks a TXT record in your public DNS, so nothing in your lab has to be exposed. And because it’s DNS based, we can get a wildcard certificate covering every subdomain at once.
I’m using Cloudflare here since it’s free and NPM supports it out of the box.
Create a Cloudflare API Token
- In the Cloudflare dashboard, go to My Profile > API Tokens > Create Token.
- Pick the Edit zone DNS template.
- Under Zone Resources, select only your domain (scope it tight).
- Create the token and copy it. You only see it once.
Request the Certificate in Nginx Proxy Manager
- Go to SSL Certificates > Add SSL Certificate > Let’s Encrypt.
- Domain names:
*.lab.example.comandlab.example.com. - Toggle Use a DNS Challenge and choose Cloudflare.
- In the credentials box, paste the line below with your own token.
- Set Propagation Seconds to
120to give DNS time to update. - Agree to the terms and hit Save.
# Cloudflare API token scoped to Zone:DNS:Edit for your domain only
dns_cloudflare_api_token=Xy7_aBcD1234efGH5678ijKL90mnOPqrSTuv
After a minute or two you’ll see a shiny new wildcard cert in the list. NPM will automatically renew it before it expires, so this is truly set and forget.
Step 5: Create Your First Proxy Host
Now for the fun part. Let’s put Open WebUI behind a proper HTTPS URL.
Go to Hosts > Proxy Hosts > Add Proxy Host and fill in the Details tab:
| Field | Value |
|---|---|
| Domain Names | ai.lab.example.com |
| Scheme | http |
| Forward Hostname / IP | 192.168.1.50 |
| Forward Port | 3000 |
| Block Common Exploits | On |
| Websockets Support | On (Open WebUI needs it for streaming responses) |
Then on the SSL tab:
- SSL Certificate: pick your
*.lab.example.comwildcard. - Force SSL: On, so plain HTTP redirects to HTTPS.
- HTTP/2 Support: On.
- HSTS Enabled: On, once you’ve confirmed everything works.
Save it, then browse to https://ai.lab.example.com. You should get the padlock and no warnings. Repeat for every service in your lab: Grafana, Proxmox, Home Assistant, Nextcloud, whatever you’re running.
One gotcha with Proxmox: its web UI listens on HTTPS, so set the Scheme to https and the Forward Port to 8006, and turn on Websockets or the console won’t load.
Step 6: Lock Down Nginx Proxy Manager
A few hardening steps I’d do on day one:
- Keep port 81 off the internet. Never port-forward it. If you want to be strict, change the mapping to
"127.0.0.1:81:81"and reach it through an SSH tunnel. - Use Access Lists. Under Access Lists, create one that only allows your LAN subnet (for example
192.168.1.0/24) and attach it to admin-type services like Proxmox. - Back up the
dataandletsencryptfolders. That’s your entire config. I cover backup options in my home lab backup strategies guide. - Don’t expose internal services publicly just because you can. For remote access, a VPN is still the safer move.
Nginx Proxy Manager vs Traefik vs Caddy
You’ll see these three come up a lot, so here’s the quick version:
| Reverse proxy | Best for | Config style |
|---|---|---|
| Nginx Proxy Manager | Beginners who want a GUI | Web UI |
| Traefik | Docker heavy labs, auto-discovery via labels | Labels and YAML |
| Caddy | Minimalists who like a tiny config file | Caddyfile |
Just depends on how you like to work. If you’re mostly clicking around and adding services by hand, NPM is hard to beat. If you’re spinning up containers constantly and want them to register themselves, Traefik is worth learning down the road.
Troubleshooting Common Issues
- 502 Bad Gateway. NPM can’t reach the backend. Double-check the forward IP and port, and make sure the service is listening on the LAN interface, not just localhost.
- Certificate request fails. Usually a bad API token scope or propagation time that’s too short. Bump it to 180 seconds and try again.
- Page loads but buttons or live updates don’t work. Turn on Websockets Support for that proxy host.
- Hostname doesn’t resolve. Your client isn’t using Pi-hole for DNS. Run
nslookupand see which server answers.
Wrapping Up
With Nginx Proxy Manager in place, your home lab instantly feels more polished. Every service gets a real hostname and a trusted SSL certificate, and adding the next one takes about 30 seconds.
Feel free to tweak the domain layout and access lists to fit your own lab. Once you get used to typing clean URLs, you’ll never go back to IPs and port numbers.