Nginx Proxy Manager on Raspberry Pi 5: Proper URLs and SSL for Your Homelab
You’ve got Docker running. Portainer’s giving you visibility. Pi-hole’s cleaning up your network. And you’re reaching everything by typing IP addresses and port numbers into a browser like it’s 2003: http://192.168.1.100:8080/admin for Pi-hole, https://192.168.1.100:9443 for Portainer, and another number for every service you add.
The short version of the fix: on a Pi 5 running a 64-bit OS with Docker, Nginx Proxy Manager (NPM) is one Compose file publishing ports 80, 443 and 81. Run docker compose up -d, open http://YOUR-PI-IP:81, and create your admin account in the setup wizard (current releases have no default login). Then point names like pihole.home.arpa at the Pi in Pi-hole’s local DNS, add a proxy host for each service, and attach a Let’s Encrypt or self-signed certificate. The rest of this guide is each of those steps done properly, plus the Pi-specific traps and the errors people actually hit.
Reverse proxies are also infrastructure 101. Every web application in every enterprise sits behind one, and when something “isn’t accessible” the proxy config is one of the first things you check. The concepts here are the same ones behind Kubernetes ingress controllers, AWS Application Load Balancers and Azure Application Gateway.
Career Value: Reverse proxy configuration is a fundamental skill for every infrastructure role. Understanding host headers, upstream servers, SSL termination, and request routing maps directly to enterprise technologies: F5 load balancers, HAProxy, AWS ALB/NLB, Azure Application Gateway, Kubernetes Ingress/Gateway API, and CDN configurations. Infrastructure Engineers and SREs who understand traffic routing command £55-80k. Platform Engineers who can troubleshoot ingress issues in Kubernetes are among the most sought-after roles in the market at £65-90k+.

At a Glance
| Item | Value on a Pi 5 |
|---|---|
| Image | jc21/nginx-proxy-manager (multi-arch: amd64 and arm64; armv7 dropped in v2.14) |
| Current release | v2.16.0 (September 2026) |
| Ports | 80 (HTTP), 443 (HTTPS), 81 (admin UI) |
| Data to keep | ./data (database, configs, logs) and ./letsencrypt (certificates) |
| First login | Setup wizard creates the admin account (no default credentials since v2.13.0) |
| Logs | ./data/logs/ on the host, e.g. proxy-host-1_error.log, letsencrypt.log |
| Default proxy timeouts | 90 seconds |
| Default max upload size | 2000 MB |
What a Reverse Proxy Actually Does
Without a reverse proxy, each service on your Pi listens on its own port and your browser connects straight to it. The browser has to know the exact address and port, and each service handles its own SSL, if it handles SSL at all.
A reverse proxy sits in front of all your services and listens on the standard web ports: 80 (HTTP) and 443 (HTTPS). When a request arrives, the proxy reads the hostname in the request (the bit you typed in the address bar) and forwards it to the right backend. The client only ever talks to the proxy.
The request flow:
- You type
https://pihole.home.arpain your browser - DNS resolves
pihole.home.arpato your Pi’s IP address - Your browser connects to port 443 on the Pi
- Nginx Proxy Manager receives the request and reads the hostname
- NPM looks up which backend handles
pihole.home.arpa - NPM forwards the request to Pi-hole’s real address and port
- Pi-hole responds to NPM, NPM responds to your browser
This is the pattern used everywhere in production. When you visit a large website you are not connecting to the application server directly. You’re hitting a proxy, a load balancer or a CDN edge node that forwards the request. Once this flow clicks, network diagrams start making sense.
Prerequisites
This guide builds on the earlier projects in the series:
- Project 1: Docker — Docker Engine and the Compose plugin installed
- Project 3: Pi-hole — optional, but used here for local DNS and the port conflict discussion
- At least one service running on your Pi that you want to proxy (Portainer, Pi-hole, anything)
For trusted Let’s Encrypt certificates you also need a domain name you control. For local-only setups without a domain, the self-signed route is covered too.
Check you’re on a 64-bit OS first
This is the Pi-specific trap. NPM’s images are built for amd64 and arm64 only: v2.14.0 stopped building for armv7/armhf. A Pi 5 is a 64-bit board, but if you flashed the 32-bit Raspberry Pi OS image, Docker pulls for the 32-bit userland and the pull fails. Docker has also said Engine v28 is the last major version to support 32-bit Raspberry Pi OS. Check before you start:
dpkg --print-architecture
docker version --format '{{.Server.Os}}/{{.Server.Arch}}'
# Representative output on a 64-bit install:
# arm64
# linux/arm64
If you see armhf or linux/arm, reflash with Raspberry Pi OS (64-bit) or Ubuntu Server for Raspberry Pi before going further. Pinning the last armv7 build (jc21/nginx-proxy-manager:2.13.7) works as a stopgap, but it gets no further updates.
The Port 80 and 443 Conflict
NPM needs ports 80 and 443 on the host for itself. Two things cannot bind to the same port on the same IP, so check what’s already listening before you start it:
sudo ss -tlnp | grep -E ':(80|81|443)\s'
No output means the ports are free. If you see docker-proxy, another container has them. If you see lighttpd, apache2 or nginx, a service installed directly on the OS has them; stop and disable it, or move it to another port.
If you followed this series’ Pi-hole guide, its web interface is already on host port 8080 and you’re fine. If you used Pi-hole’s own quick-start Compose file, note that the official Pi-hole v6 example publishes both 80:80/tcp and 443:443/tcp. Move both:
# In Pi-hole's docker-compose.yml, change:
ports:
- "80:80/tcp" # conflicts with NPM
- "443:443/tcp" # conflicts with NPM
# To:
ports:
- "8080:80/tcp" # Pi-hole web UI now on host port 8080
# 443 removed: NPM will terminate HTTPS for Pi-hole
Then recreate Pi-hole:
cd ~/services/pihole
docker compose up -d
If you skip this, docker compose up for NPM fails with one of these, depending on what holds the port:
Bind for 0.0.0.0:80 failed: port is already allocated
listen tcp4 0.0.0.0:80: bind: address already in use
Plan your ports early. Every service you publish directly needs a unique host port. Keep a simple text file listing which ports are in use on each host. In enterprise environments this is a port allocation document, and it saves hours of troubleshooting. Start the habit now.
Installing Nginx Proxy Manager
Step 1: Create the project directory
mkdir -p ~/services/nginx-proxy-manager
cd ~/services/nginx-proxy-manager
Step 2: Create the Docker Compose file
# docker-compose.yml
services:
npm:
container_name: nginx-proxy-manager
# Pin a release in production; 2.16.0 is current at the time of writing
image: jc21/nginx-proxy-manager:latest
restart: unless-stopped
ports:
- "80:80" # HTTP
- "443:443" # HTTPS
- "81:81" # admin UI (locked down later in this guide)
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
environment:
TZ: Europe/London
# Uncomment if your host has IPv6 disabled (see troubleshooting)
# DISABLE_IPV6: 'true'
healthcheck:
test: ["CMD", "/usr/bin/check-health"]
interval: 10s
timeout: 3s
Step 3: Start it
docker compose up -d
Step 4: Check it’s running and healthy
docker compose ps
curl -s http://localhost:81/api/
# Representative output once it has finished starting:
# NAME IMAGE STATUS
# nginx-proxy-manager jc21/nginx-proxy-manager:latest Up 2 minutes (healthy)
# {"status":"OK","setup":false,"version":{...}}
The compose file matches the official setup docs; the health check is the opt-in one from the advanced configuration page. On first start NPM generates its keys and creates its database, which the docs say can take a couple of minutes. "setup":false in the API response means no admin user exists yet, which is what you want before the next step.
Three ports are now in use:
- Port 80: HTTP traffic (redirected to HTTPS once SSL is configured)
- Port 443: HTTPS traffic for your proxied services
- Port 81: NPM’s own admin interface
First Login: The Setup Wizard
Open http://YOUR-PI-IP:81. On a fresh install you’ll see a Welcome! page asking you to create your admin account. Enter a real email address and a strong password; that becomes your login.
Older guides (and older versions of this one) tell you to log in with [email protected] / changeme. That default user was removed in v2.13.0 (November 2025) in favour of the wizard. If you are upgrading an install that is older than that, your existing users carry over in ./data, so the old credentials only work if you never changed them.
For automated deployments you can skip the wizard by setting INITIAL_ADMIN_EMAIL and INITIAL_ADMIN_PASSWORD in the environment. Be aware the container logs that password in plain text when it creates the user, so change it after the first login.
Treat the admin panel as critical infrastructure. Whoever controls NPM controls where every web request on your network goes. Since v2.13.6 NPM supports TOTP two-factor authentication; turn it on from your user menu in the header (Two-Factor Authentication), and restrict port 81 as shown in the security section below.
After logging in you’ll see the dashboard. The left menu has Hosts (Proxy Hosts, Redirection Hosts, Streams, 404 Hosts), Access Lists, Certificates, Users, Audit Logs and Settings. Most of your time is spent in Proxy Hosts.
Setting Up Internal DNS
Before adding proxy hosts, you need DNS entries that point your chosen hostnames at the Pi. Without them, typing pihole.home.arpa goes nowhere.
Option A: Pi-hole local DNS (recommended)
In Pi-hole v6, go to Settings > Local DNS Records and add one record per service:
pihole.home.arpa → 192.168.1.100
portainer.home.arpa → 192.168.1.100
npm.home.arpa → 192.168.1.100
Every entry points to the same IP, the Pi, because NPM routes on the hostname in the request, not the IP address. If you’d rather not add a record per service, add one A record (for example proxy.home.arpa) and make the rest CNAMEs to it under Local CNAME records on the same page; if the Pi’s IP ever changes, you edit one record.
Option B: Edit your hosts file (quick and dirty)
On each device you want to use the names from:
# Linux/Mac: /etc/hosts
# Windows: C:\Windows\System32\drivers\etc\hosts
192.168.1.100 pihole.home.arpa
192.168.1.100 portainer.home.arpa
192.168.1.100 npm.home.arpa
Option A works for every device on the network automatically. Option B only works on the devices you’ve edited.
Option C: A real domain
If you own a domain (say example.com), you can create records such as *.lab.example.com pointing at the Pi’s local IP. This is the setup you need for trusted Let’s Encrypt certificates, covered below.
Picking an internal domain: Avoid real TLDs (.com, .net) and avoid .local, which belongs to mDNS and causes odd lookups on Apple and Linux devices. The two names reserved for exactly this job are home.arpa (RFC 8375, for home networks) and .internal (reserved by ICANN for private use in 2024). Made-up suffixes like .home.lab work today, but nothing stops a made-up TLD being delegated later. Pick one and stick with it. Note that no public CA, Let’s Encrypt included, will issue certificates for these internal names; that’s what Option C is for.
Adding Your First Proxy Host
Let’s proxy Pi-hole’s admin interface. This turns http://192.168.1.100:8080/admin into http://pihole.home.arpa/admin.
- Go to Hosts > Proxy Hosts
- Click Add Proxy Host
- On the Details tab, fill in:
Domain Names: pihole.home.arpa
Scheme: http
Forward Hostname / IP: 192.168.1.100
Forward Port: 8080
Cache Assets: Off
Block Common Exploits: On
Websockets Support: Off (Pi-hole doesn't need it)
Click Save. Now open http://pihole.home.arpa/admin. You should see Pi-hole’s login page, served through the proxy on the standard HTTP port with no port number in the URL.
What just happened:
- Your browser resolved
pihole.home.arpato the Pi’s IP via Pi-hole’s local DNS - The browser connected to port 80
- NPM received the request and saw the
Host: pihole.home.arpaheader - NPM matched that header to your proxy host
- NPM forwarded the request to
http://192.168.1.100:8080 - Pi-hole responded and NPM passed the response back
This is the Host header mechanism, and it’s how one IP address can serve hundreds of websites. Understand it and you understand how shared hosting works, how CDNs route traffic, and why “just point the DNS at the server” isn’t the whole story.
You can prove it from the command line without touching DNS at all:
curl -sI -H "Host: pihole.home.arpa" http://192.168.1.100/admin/
# You should get Pi-hole's response headers back, plus
# an X-Served-By: pihole.home.arpa header added by NPM.
# Change the Host header to a name NPM doesn't know and
# you get NPM's default page instead.
Forward to the LAN IP, or use a shared Docker network
Forwarding to the Pi’s LAN IP and the service’s host port works for everything, including services that use host networking like Home Assistant. The NPM docs recommend a tidier option for containers on the same Pi: put NPM and those services on one user-defined Docker network and forward to the container name. Then the backends don’t need to publish ports to your LAN at all.
docker network create proxy
# Add to the bottom of NPM's docker-compose.yml AND each service's file
networks:
default:
external: true
name: proxy
Recreate both stacks with docker compose up -d. In NPM you now forward to pihole (the service name) on port 80, the port inside the container, not 8080 on the host. Mixing those two up is a classic source of 502 errors. Once a service is only reached through NPM you can delete its ports: mapping.
Adding More Services
Repeat the process for each service. The common ones from this series:
Portainer:
Domain: portainer.home.arpa
Scheme: https (Portainer serves HTTPS on 9443)
Forward: 192.168.1.100:9443
Websockets: On (container console needs it)
Uptime Kuma (if installed):
Domain: status.home.arpa
Scheme: http
Forward: 192.168.1.100:3001
Websockets: On (live status updates)
Home Assistant (if installed):
Domain: ha.home.arpa
Scheme: http
Forward: 192.168.1.100:8123
Websockets: On (the whole frontend runs over a websocket)
Note: HA also needs trusted_proxies set, see below
NPM itself:
Domain: npm.home.arpa
Scheme: http
Forward: 127.0.0.1:81 (see "Securing NPM" for why this one is localhost)
Websockets: Off
Portainer’s HTTPS scheme matters. Portainer serves its web interface over HTTPS on 9443. If you set the scheme to http, NPM speaks plain HTTP to an HTTPS port and you get a 400 or 502 instead of the UI. Always match the scheme to what the backend actually speaks.
When to enable Websockets: If the service has live updates (dashboards that refresh without reloading, terminal or console access, live logs), it uses websockets. If in doubt, turn it on: it does nothing for services that don’t use it, and its absence breaks the ones that do. The tell-tale sign is a page that loads and then hangs, with websocket errors in the browser console.
Home Assistant behind NPM: the 400 Bad Request fix
Home Assistant rejects proxied requests until you tell it to trust the proxy, so the first visit to ha.home.arpa returns 400: Bad Request. Its log says why:
A request from a reverse proxy was received from 172.18.0.2, but your HTTP integration is not set-up for reverse proxies
Add this to Home Assistant’s configuration.yaml, using the IP from your own log line (NPM’s container address) or its Docker subnet, then restart HA:
http:
use_x_forwarded_for: true
trusted_proxies:
- 172.18.0.0/16 # NPM's Docker network; match the IP in your log
- 127.0.0.1
If the log instead says Received X-Forwarded-For header from an untrusted proxy, the address you listed doesn’t match the one NPM is connecting from. The Home Assistant guide in this series covers the rest of that setup.
SSL Certificates
Everything is currently plain HTTP. On a trusted home LAN that’s tolerable for a day, but you want HTTPS before you log in to anything through the proxy, and certainly before any remote access.
Option 1: Let’s Encrypt via DNS challenge (if you have a domain)
Let’s Encrypt gives you free, automatically renewing certificates that every browser trusts. For a Pi that isn’t reachable from the internet, use the DNS challenge: Let’s Encrypt checks a TXT record in your domain’s DNS instead of connecting to the Pi, so nothing needs port-forwarding.
- At your DNS provider, create
*.lab.example.comas an A record pointing at the Pi’s LAN IP (or add the same names in Pi-hole, see the tip below) - In NPM, go to Certificates > Add Certificate > Let’s Encrypt via DNS
- Enter
*.lab.example.com(wildcards need the DNS challenge) - Choose your DNS provider and paste its credentials file content
- Save, and wait; propagation can take a minute or two
For Cloudflare, create an API token with Zone > DNS > Edit permission for that one zone, and the credentials content is a single line, as documented for certbot’s Cloudflare plugin:
dns_cloudflare_api_token = YOUR_SCOPED_API_TOKEN
Public DNS pointing at a private IP: Some routers and DNS resolvers have “DNS rebinding protection” that drops public answers pointing at 192.168.x.x, so the name resolves on one network and not another. The clean fix is split DNS: add the same *.lab.example.com names in Pi-hole’s local DNS so your LAN never asks the public resolver. The certificate still validates because the DNS challenge only cares about the TXT record.
Once issued, edit each proxy host, open the SSL tab, pick the certificate, and enable Force SSL (redirects HTTP to HTTPS) and HTTP/2 Support. Only enable HSTS once you’re sure every name under that domain will always have HTTPS, because browsers cache it. NPM renews Let’s Encrypt certificates automatically.
Let’s Encrypt via HTTP also exists in that menu. It needs the name to resolve publicly to your router and port 80 forwarded to the Pi. That’s fine for something you deliberately publish to the internet, and the wrong choice for a LAN-only homelab.
Option 2: Self-signed certificate (local only, no domain)
Without a domain you can make your own certificate. Browsers warn about it until you trust it, but the connection is encrypted.
Generate a self-signed wildcard certificate:
mkdir -p ~/services/nginx-proxy-manager/custom-certs
openssl req -x509 -nodes -days 365 \
-newkey rsa:2048 \
-keyout ~/services/nginx-proxy-manager/custom-certs/home-arpa.key \
-out ~/services/nginx-proxy-manager/custom-certs/home-arpa.crt \
-subj "/CN=*.home.arpa" \
-addext "subjectAltName=DNS:*.home.arpa,DNS:home.arpa"
Upload it under Certificates > Add Certificate > Custom Certificate and assign it to your proxy hosts. -nodes matters: NPM doesn’t accept key files protected with a passphrase. Modern browsers only read the Subject Alternative Name, which is why the -addext line is there.
To silence the warnings on your own devices, trust the certificate: on Debian, Ubuntu and Raspberry Pi OS copy the .crt to /usr/local/share/ca-certificates/ and run sudo update-ca-certificates; on Windows import it into Trusted Root Certification Authorities; on macOS add it to Keychain Access and mark it trusted. Firefox keeps its own store, so import it there too.
Understanding SSL Termination
When NPM handles SSL, the encrypted connection exists between your browser and NPM. NPM then talks to the backend (Pi-hole, Uptime Kuma) over plain HTTP. This is SSL termination at the proxy.
In enterprise environments this is standard: the proxy or load balancer handles TLS, and backends run on a trusted internal network. One place to manage certificates instead of dozens. Where end-to-end encryption is required (some regulated or zero-trust environments), the proxy re-encrypts to HTTPS backends, which NPM does whenever the scheme is https, as with Portainer.
Troubleshooting: The Errors People Actually Hit
Most answers live in NPM’s logs. They’re in ./data/logs/ on the host: proxy-host-N_error.log per proxy host (N is the ID in the UI), fallback_error.log for everything else, and letsencrypt.log for certificate requests.
cd ~/services/nginx-proxy-manager
docker compose logs --tail 50
tail -n 50 data/logs/proxy-host-1_error.log
tail -n 80 data/logs/letsencrypt.log
502 Bad Gateway (openresty)
NPM received your request but couldn’t get a response from the backend. Check in this order:
- Is the backend running?
docker ps. - Right port? Host port if you forward to the LAN IP; container port if you forward to a container name on a shared network.
- Right scheme?
httpsfor HTTPS backends like Portainer on 9443. - Can NPM reach it? Test from inside the NPM container, which has
curl:
docker exec nginx-proxy-manager curl -sI http://192.168.1.100:8080/admin/
# Any HTTP status line back means NPM can reach the backend.
# "Connection refused" or a timeout is your 502.
The localhost trap: Inside a container, localhost and 127.0.0.1 mean the container itself. Forward a proxy host to localhost:8080 and NPM looks for port 8080 inside its own container, finds nothing, and returns 502. Use the Pi’s LAN IP or a container name. Older guides suggest 172.17.0.1; that’s only the gateway of Docker’s default bridge, and a Compose stack gets its own network with a different gateway, so it often doesn’t work. If you want a stable name for the host, add extra_hosts: ["host.docker.internal:host-gateway"] to NPM’s service and forward to host.docker.internal. The one place localhost is right is NPM’s own admin UI on port 81, because that runs inside the NPM container.
“Internal Error” when requesting an SSL certificate
The UI message is generic; data/logs/letsencrypt.log has the real reason. The usual causes:
- HTTP challenge on a LAN-only Pi. Let’s Encrypt couldn’t connect to port 80 from the internet. Use the DNS challenge.
- DNS challenge timing out. The TXT record hadn’t propagated. Set Propagation Seconds to 120 and retry.
- API token scope. For Cloudflare, the token needs DNS Edit on the right zone, and the line must use
dns_cloudflare_api_token(not the global API key format). - DNS plugin broken after an upgrade. Big Certbot updates (v2.15.0 and v2.16.0 both carry this warning in their release notes) can break individual DNS provider plugins. Check the plugin’s issue tracker before assuming it’s your config.
- Rate limits. Repeated failed attempts trip Let’s Encrypt’s limits. Fix the cause, then wait before retrying.
Default login not working
On v2.13.0 and later there is no default login; if you see a login screen rather than the Welcome page, an admin user already exists in ./data, usually from an earlier install in the same folder. Use those credentials, or, on a brand-new setup with nothing to keep, stop the stack and start again with an empty data folder.
Container keeps restarting: “Address family not supported by protocol”
Your host has IPv6 disabled and NPM tries to listen on it. Add DISABLE_IPV6: 'true' to the environment (it’s commented out in the compose file above) and run docker compose up -d. This fix comes from the NPM advanced config docs.
“no matching manifest for linux/arm/v7” or “exec format error”
You’re on a 32-bit OS. See the 64-bit check in the prerequisites.
Websockets failing
A service loads but live features don’t: dashboards don’t update, consoles sit at “connecting”. Turn on Websockets Support for that proxy host; NPM then adds the Upgrade and Connection headers itself, so you shouldn’t need custom config for this.
ERR_TOO_MANY_REDIRECTS
Something is redirecting in a circle. The common causes:
- NPM speaks HTTP to a backend that redirects everything to HTTPS. Fix: set the scheme to
https. - Force SSL is on in NPM and the backend also forces HTTPS based on the connection it sees. Fix: let NPM do HTTPS and configure the backend to trust
X-Forwarded-Proto, which NPM sends. - Cloudflare’s proxy is in front with SSL mode Flexible, so Cloudflare talks HTTP to NPM and NPM redirects back to HTTPS. Fix: use Full (strict).
Slow pages time out
NPM’s default proxy timeouts are 90 seconds. For long-running requests (large exports, slow APIs), raise them on that proxy host only: edit it, open the gear (Advanced) tab, and add:
proxy_read_timeout 300s;
proxy_send_timeout 300s;
Large uploads fail with 413 Request Entity Too Large
NPM itself allows request bodies up to 2000 MB by default (client_max_body_size 2000m in its nginx.conf), so a 413 at a few megabytes is usually coming from the application behind it, such as PHP’s upload limits in Nextcloud, or from Cloudflare’s proxy if it sits in front (100 MB on the Free plan). Check the backend’s own limit first. If you genuinely need more than 2000 MB through NPM, add client_max_body_size 10g; in that host’s Advanced tab.
Understanding What You’ve Built
- A single entry point for all your services (ports 80 and 443)
- Name-based routing using Host headers, the mechanism behind every web hosting platform
- SSL termination, with certificates managed in one place
- Centralised access control, through NPM’s access lists and basic auth
Strip away the branding and an AWS Application Load Balancer does exactly this: listens on 80/443, inspects the Host header, routes to a target group, and terminates TLS. Azure Application Gateway and Kubernetes Ingress controllers are variations on the same pattern. You’ve built it on a Raspberry Pi 5.
Securing NPM Itself
Your reverse proxy is now the front door to every service on the Pi.
Use a strong admin password and turn on two-factor authentication. Default and weak credentials on infrastructure components are how breaches start in real organisations.
Lock down port 81 properly, and know that ufw won’t do it. A common tip is sudo ufw deny 81. It doesn’t work for Docker. The Docker documentation is explicit that published container ports are routed before ufw’s rules are applied, so the port stays open. Restrict it in the port mapping instead:
ports:
- "80:80"
- "443:443"
- "127.0.0.1:81:81" # admin UI only reachable from the Pi itself
Then reach the admin UI through NPM: the npm.home.arpa proxy host forwarding to 127.0.0.1:81 (inside the NPM container, that’s the admin UI), with an Access List that allows only your management IP or subnet. Set that proxy host up before you change the port mapping, or use an SSH tunnel (ssh -L 8081:127.0.0.1:81 user@your-pi, then browse to http://localhost:8081) to get back in.
Keep it updated, deliberately:
cd ~/services/nginx-proxy-manager
cp -a data data.bak-$(date +%F) # quick rollback copy
docker compose pull
docker compose up -d
Your proxy hosts, users and certificates live in ./data and ./letsencrypt, so they survive updates. Read the release notes first: recent releases have changed the base image and Certbot version, and pinning a version tag instead of latest means you choose when that happens.
NPM vs Raw Nginx vs Traefik vs Caddy
Nginx Proxy Manager is the right choice for this project because the web UI makes the concepts visible. You can see the proxy hosts, certificates and access lists, and click through each one while you learn what they do.
Raw Nginx is what I use in production. No web UI, just config files version-controlled in Git and deployed via Ansible. It’s more flexible, and the wrong starting point for someone still learning what a Host header is. Move to it when NPM’s UI starts feeling like a bottleneck rather than a help.
Traefik integrates with Docker and discovers services from container labels. Powerful, but it hides the routing mechanics behind labels, which is a drawback while you’re learning.
Caddy has the simplest configuration syntax and handles certificates automatically. Excellent for production, less educational about what’s happening underneath.
Cloudflare Tunnel or Tailscale solve a different problem: reaching services from outside without opening ports. They work alongside a reverse proxy rather than replacing it.
Start with NPM. Learn the concepts. They transfer to all of the above.
Cheat Sheet
| Task | Command or location |
|---|---|
| Check 64-bit OS | dpkg --print-architecture (want arm64) |
| Find what holds 80/443 | sudo ss -tlnp | grep -E ':(80|81|443)\s' |
| Start / update | docker compose pull && docker compose up -d |
| Health check | curl -s http://localhost:81/api/ (want "status":"OK") |
| Per-host error log | data/logs/proxy-host-N_error.log |
| Certificate errors | data/logs/letsencrypt.log |
| Test routing without DNS | curl -sI -H "Host: name.home.arpa" http://PI-IP/ |
| Test backend from NPM | docker exec nginx-proxy-manager curl -sI http://IP:PORT/ |
| IPv6 disabled on host | DISABLE_IPV6: 'true' |
| Restrict admin UI | "127.0.0.1:81:81" in ports (not ufw) |
The Enterprise Connection
Reverse proxy skills translate to some of the most in-demand infrastructure roles:
| NPM Concept | Enterprise Equivalent | Where You’ll Use It |
|---|---|---|
| Proxy host configuration | Virtual server / listener rules | F5, HAProxy, AWS ALB, Azure App Gateway |
| Host header routing | Host-based routing rules | Kubernetes Ingress, Cloudflare Workers, CDN configs |
| SSL termination | TLS offloading | Every load balancer and WAF in existence |
| Let’s Encrypt automation | Certificate lifecycle management | cert-manager in K8s, ACM in AWS, Key Vault in Azure |
| Upstream server config | Backend pools / target groups | AWS target groups, Azure backend pools, K8s Services |
| Websocket proxying | Protocol upgrade handling | Real-time applications, SignalR, Socket.IO |
| Port conflict resolution | Service binding and port allocation | Every multi-service deployment ever |
In interviews, you’ll be able to explain the full request flow from DNS lookup to TLS handshake to proxy routing to backend response. Most candidates can’t, and it’s exactly the understanding senior infrastructure roles need.
When a Kubernetes ingress controller isn’t routing traffic, the debugging is the same as with NPM: check the hostname mapping, check the backend is reachable from the proxy, confirm the port and protocol, check the certificate. Different tool names, same concepts.
What’s Next
You now have the infrastructure layer every later project uses. New services get a Docker Compose file, a proxy host in NPM and a DNS record in Pi-hole, and they’re reachable at a clean URL with SSL. That’s a deployment workflow that mirrors real-world operations.
From here, the series branches based on your interests:
- Project 5: Home Assistant — event-driven automation that teaches enterprise integration patterns
- Project 6: Ollama — local AI model serving on your own hardware
- Project 7: Uptime Kuma — monitoring for everything you’ve built (recommended before adding more services)
- Project 8: K3s Kubernetes — container orchestration at the next level
If you haven’t set up version control yet, seriously consider jumping to Project 10: Gitea soon. You’ve now got four services configured with Docker Compose files, environment variables, and proxy rules. That’s real configuration that you don’t want to lose to a power cut or a corrupted SD card.
A reverse proxy is one of those infrastructure components that seems optional until you understand it, then seems essential forever. Once you’ve experienced clean URLs with SSL for every service, you’ll never go back to bookmarking port numbers. And when you see the same pattern in Kubernetes, AWS, or Azure, you’ll already know exactly what’s happening underneath the abstraction.
RTFM Apparel · printed in the UK

ReadTheManual is run, written and curated by Eric Lonsdale.
Eric has over 20 years of professional experience in IT infrastructure, cloud architecture, and cybersecurity, but started with PCs long before that.
He built his first machine from parts bought off tables at the local college campus, hoping they worked. He learned on BBC Micros and Atari units in the early 90s, and has built almost every PC he’s used between 1995 and now.
From helpdesk to infrastructure architect, Eric has worked across enterprise datacentres, Azure environments, and security operations. He’s managed teams, trained engineers, and spent two decades solving the problems this site teaches you to solve.
ReadTheManual exists because Eric believes the best way to learn IT is to build things, break things, and actually read the manual. Every guide on this site runs on infrastructure he owns and maintains.
Enjoyed this guide?
New articles on Linux, homelab, cloud, and automation every 2 days. No spam, unsubscribe anytime.







