Local DNS & Reverse Proxies Explained (Nginx Proxy Manager)

Stop typing IP addresses and port numbers. Map clean names like jellyfin.home.arpa to your services with Pi-hole DNS and Nginx Proxy Manager.

Stop Typing IP Addresses and Ports

Remembering that Jellyfin lives at 192.168.1.50:8096, Immich at 192.168.1.50:2283, and qBittorrent at 192.168.1.50:8080 gets old fast — especially when you try to explain it to anyone else in your house. Checking our default port lookup helps while building your stack, but nobody wants to memorize port numbers just to open their photo library.

The clean fix is pairing two lightweight tools:

  1. A local DNS server (like Pi-hole or AdGuard Home) that turns a friendly name like jellyfin.home.arpa into your server’s IP (192.168.1.50).
  2. A reverse proxy (like Nginx Proxy Manager) listening on port 80 (HTTP) and 443 (HTTPS) that reads the requested hostname and silently forwards the traffic to the right internal port (8096, 2283, 8080).

Together, they turn raw IP:port bookmarks into clean URLs — without opening a single port on your router.

How a Request Flows Inside Your Home Network

When you type http://jellyfin.home.arpa into your browser, four fast steps happen in a couple of milliseconds:

  1. Your laptop asks your router’s configured DNS server (Pi-hole) for the IP address of jellyfin.home.arpa.
  2. Pi-hole checks its Local DNS Records and replies: 192.168.1.50.
  3. Your browser connects to 192.168.1.50 on standard port 80 (or 443), carrying the HTTP Host: jellyfin.home.arpa header.
  4. Nginx Proxy Manager reads that Host header, matches it against your Proxy Host rules, and forwards the traffic internally to 192.168.1.50:8096.

Your browser never sees :8096. Even better, if you later move Jellyfin to another port or another server, you update one line in Nginx Proxy Manager and every bookmark in the house keeps working.

Step 1: Deploy Nginx Proxy Manager with Docker Compose

If you already have Docker installed (see our Docker installation guide), create a dedicated folder so its SQLite database and SSL certificates stay neatly isolated:

Terminal window
mkdir -p ~/npm/data ~/npm/letsencrypt
cd ~/npm
nano docker-compose.yml

Paste this production-ready docker-compose.yml:

services:
npm:
image: jc21/nginx-proxy-manager:latest
container_name: nginx-proxy-manager
restart: unless-stopped
ports:
- "80:80" # Standard HTTP traffic
- "443:443" # Standard HTTPS traffic
- "81:81" # NPM admin web interface
environment:
# Optional: disable IPv6 if your LAN/Docker does not use IPv6
DISABLE_IPV6: "true"
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt

What each piece does:

  • ports (80, 443, 81): ports 80 and 443 are what browsers use automatically when you omit a port number. Port 81 is the admin panel where you add your rules.
  • ./data:/data: stores your Proxy Host list, user credentials, and Nginx configuration files.
  • ./letsencrypt:/etc/letsencrypt: stores TLS certificates if you enable HTTPS later.

Start the container:

Terminal window
docker compose up -d

Open http://192.168.1.50:81 in your browser (replace with your server’s IP). On a fresh install, Nginx Proxy Manager creates a setup screen or default admin login (check the container output with docker compose logs npm if the current image prints initial credentials or prompts you to register the first admin user directly). Immediately set a strong password using our password generator.

Note

Running CasaOS or Apache on the same server? CasaOS uses port 80 by default for its web dashboard. Either change CasaOS’s port in its Settings menu (for example to 8088) and proxy it via NPM, or move NPM’s host ports to another machine. Two services can never bind to host port 80 at the same time.

Step 2: Point Clean Names in Pi-hole Local DNS

Now your reverse proxy is listening on 192.168.1.50, you need your network to resolve *.home.arpa names to that IP.

In Pi-hole (v5 or v6):

  1. Open the Pi-hole admin panel (http://PIHOLE-IP/admin).
  2. Go to Local DNS → DNS Records.
  3. Add an entry for each service pointing to your Nginx Proxy Manager server IP:
Domain IP Address Final Service Port (handled by NPM)
jellyfin.home.arpa 192.168.1.50 8096
immich.home.arpa 192.168.1.50 2283
nextcloud.home.arpa 192.168.1.50 8080
npm.home.arpa 192.168.1.50 81

Verify DNS resolution from your desktop terminal before touching the proxy:

Terminal window
nslookup jellyfin.home.arpa
# Expected: Server: <pihole-ip> / Address: 192.168.1.50

Why .home.arpa? Unlike .local (which belongs to mDNS/Avahi and causes lookup delays on macOS and Linux) or .dev (owned by Google and forced to HTTPS via HSTS), .home.arpa is officially reserved for home networks and never conflicts with public DNS.

Step 3: Create Your Proxy Hosts in Nginx Proxy Manager

Open http://192.168.1.50:81, go to Hosts → Proxy Hosts → Add Proxy Host, and fill in the Details tab:

  • Domain Names: jellyfin.home.arpa (press Enter to turn it into a chip)
  • Scheme: http (traffic between NPM and your container on the same machine is local)
  • Forward Hostname / IP: 192.168.1.50 (your server’s LAN IP — not 127.0.0.1)
  • Forward Port: 8096
  • Block Common Exploits: enabled
  • Websockets Support: enabled (essential for Jellyfin, Immich, Home Assistant, Vaultwarden, and Portainer)

Click Save, then test http://jellyfin.home.arpa in your browser. It loads cleanly with no :8096 in the address bar.

Optional: Real HTTPS Without Opening Any Router Ports (DNS-01)

Modern browsers increasingly warn on plain http:// pages, and apps like Vaultwarden refuse to work over unencrypted HTTP because Web Crypto APIs require a secure HTTPS context.

You do not have to open ports 80 or 443 on your router to get valid Let’s Encrypt certificates:

  1. Register a cheap domain (around $8–$12/year, e.g. on Cloudflare Registrar) and manage its DNS on Cloudflare (free tier).
  2. In Cloudflare DNS, create an A record for *.home.yourdomain.com pointing to your private LAN IP (192.168.1.50) with the orange proxy cloud turned OFF (DNS only). Public users cannot reach 192.168.1.50 anyway, but Let’s Encrypt only needs to verify domain ownership via a TXT record.
  3. In Nginx Proxy Manager’s SSL tab on a Proxy Host, choose Request a new SSL Certificate, toggle Use a DNS Challenge, select Cloudflare, and paste a scoped Cloudflare API token (Zone:DNS:Edit).
  4. Enable Force SSL and HTTP/2 Support.

Within 30 seconds you have a green padlock on https://vault.home.yourdomain.com that only resolves inside your house or over Tailscale.

Troubleshooting Common Reverse Proxy Errors

  • Bind for 0.0.0.0:80 failed: port is already allocated: another service is listening on port 80 or 443. Check what owns it with sudo ss -tulpn | grep -E ':80|:443'. If it’s casaos-gateway, apache2, or host nginx, stop/disable the conflicting web server or change its port first.
  • 502 Bad Gateway on a running app: almost always caused by setting Forward Hostname / IP to 127.0.0.1 or localhost, or typing the wrong container port. Use the server’s real LAN IP (192.168.1.50) or attach NPM and your target app to a shared external Docker network and forward to the container name (e.g. jellyfin on port 8096).
  • Immich, Home Assistant, or Jellyfin loads partially then disconnects: you forgot Websockets Support on the Proxy Host’s Details tab. Edit the host, toggle Websockets ON, and save.
  • Nextcloud / large file uploads fail with 413 Request Entity Too Large: open the Proxy Host → Advanced tab and add client_max_body_size 0; to lift Nginx’s default upload cap.
  • Works on PC, fails on Android phone: Android’s Private DNS setting bypasses Pi-hole’s Local DNS records when set to an external provider. Switch Private DNS to Off/Automatic when on home Wi-Fi, or configure Tailscale’s DNS tab to point to Pi-hole.

Summary Checklist

  1. Deploy Nginx Proxy Manager on ports 80:80, 443:443, 81:81 (~70 MB RAM).
  2. Map *.home.arpa domains to your server’s LAN IP in Pi-hole Local DNS.
  3. Add a Proxy Host per service with Websockets Support enabled.
  4. Keep router ports 80 and 443 closed — pair with Tailscale for safe remote access.

Frequently Asked Questions

Do I need to buy a public domain name for local DNS?

No. For home-network-only access, the IETF reserves .home.arpa specifically for residential LANs (RFC 8375). It never collides with real internet domains, costs nothing, and works cleanly with Pi-hole or AdGuard Home. You only need a real domain if you want valid Let's Encrypt HTTPS certificates via DNS-01.

Do I have to open ports 80 and 443 on my router?

No — if your reverse proxy is only for your LAN and Tailscale devices, leave every router port closed. You can even get real Let's Encrypt SSL certificates inside your private network using a DNS-01 challenge with Cloudflare without exposing a single port to the internet.

Why do I get 502 Bad Gateway when pointing Nginx Proxy Manager to localhost?

Inside a Docker container, localhost (127.0.0.1) refers to the Nginx Proxy Manager container itself, not your host machine. Always point Proxy Hosts at your server's LAN IP (like 192.168.1.50) or the target container's name on a shared Docker network.

Does a reverse proxy add noticeable latency or RAM overhead?

Virtually none. Nginx Proxy Manager idles at roughly 60–90 MB of RAM and under 1% CPU on an old desktop, adding less than 1 millisecond to local page loads.

Portrait of Guillermo

Written by Guillermo

IT Student & Home Server Enthusiast

Building private clouds to break free from Big Tech. I document everything I learn about home servers and self-hosting on MyHomeServerGuide.

More about the author