Technical Anshu
Tutorials Blog
🛡️ Security First

Keep the Nginx Proxy Manager Admin Panel Off the Public Internet

Ports 80 and 443 are your shop window. Port 81 is the office where the keys, the safe combination and the alarm code live. Treating them the same is the most common NPM mistake there is.

✍️ Technical Anshu🐳 Docker⏱️ 10 minute hardening
🎥 Watch the full video — the complete Nginx Proxy Manager install shown step by step

The NPM admin panel can create hosts, read every internal address you own, and change where your domains point. In the wrong hands it is not one compromised app — it is all of them at once. This page explains why port 81 must never be reachable from the public internet, why the first-login step makes timing critical, and three honest ways to reach the panel safely when you need it.

Router forwarding — the safe pattern (illustrative)
Forward to NPM server: WAN 80 -> 80 YES (public) WAN 443 -> 443 YES (public) WAN 81 -> 81 NO — never
✔ Admin panel reachable from LAN and VPN only
✘ Admin panel found by any scanner on earth
Two forwards are the whole public surface. The third line is the mistake this page exists to prevent.
1

Why port 81 is different from 80 and 443

Public ports serve your finished services to visitors — that is their job, and they are built for strangers. The admin panel is a management tool built for you, protected by a single password. Internet scanners sweep the entire IPv4 space continuously, and an exposed login page collects password attempts around the clock. NPM's login is decent, but no password-only door deserves that exposure when keeping it private costs nothing. Rule of the whole series: publish services, never publish management.

2

The first-login race makes it urgent

Remember the account setup from the install guide. Older builds shipped with a well-known default login that every public guide prints; newer builds removed it and make the first visitor the administrator. Either design has the same moral: between 'container started' and 'my strong password set', your panel is claimable by whoever reaches it first. If port 81 is already forwarded to the internet during those minutes, you are racing the scanners. Set the admin account up immediately, from your own LAN, before any router forwarding exists.

3

Option one — LAN only (enough for most people)

The simplest pattern: in your router, forward only ports 80 and 443 to the NPM server. Port 81 stays un-forwarded, so the panel answers only inside your home or office network. Most people administer NPM from the same desk the server sits near, and for them this is the complete solution — zero extra tools, zero extra risk. If you ever find yourself 'temporarily' forwarding 81 to fix something from outside, treat that as what it is: opening the safe to the street. Use one of the next two options instead.

4

Option two — bind the panel to localhost, visit by tunnel

You can order Docker to publish the panel only on the server itself by changing the compose line to '127.0.0.1:81:81'. The panel then answers nowhere except the server's own loopback — not even the LAN. To use it from your laptop, open an SSH tunnel: ssh -L 8181:127.0.0.1:81 user@yourserver, then browse to http://localhost:8181. Your traffic rides inside the encrypted SSH connection, and to the internet the panel simply does not exist. This is the professional pattern for rented VPS servers, where there is no trusted LAN at all.

5

Option three — reach it through a VPN

If you regularly manage things from outside, put the server and your phone or laptop on the same private mesh VPN — tools like Tailscale or WireGuard. The panel then answers on the server's private VPN address from anywhere in the world, while remaining invisible to the public internet. This is the most comfortable option for a small office: no forwarded management ports, nothing to tunnel by hand, and the VPN login becomes a second lock in front of the NPM password. Whichever option you chose, finish with the same two habits: a unique strong password on the NPM admin account, and a real email address on it so certificate warnings reach you.

🔴 The one-line audit: from your phone with Wi-Fi off, try opening your public IP on port 81. If the NPM login appears, you have work to do today. If nothing answers, your setup is correct.

🎥 Watch the Complete Video

The install in the video gets NPM running; this page keeps it yours. Watch the video for the build, then run the phone test in the red box above.

▶️ Watch Full Video
❓ Common Questions (FAQ)

I already forwarded port 81 for a week. Am I compromised?

Not automatically — but change the NPM admin password now, remove the forward, and check the proxy host list for anything you did not create. Treat an exposed management panel as a reason to verify, not to panic.

Does binding 127.0.0.1 break certificates or proxying?

No. Ports 80 and 443 keep working exactly as before; only the admin panel's reach changes. Your sites never depended on port 81 being public — only your convenience did.

Can I just move the admin panel to a secret port number?

Security by obscurity only. Scanners check thousands of ports, and NPM is easy to fingerprint on any of them. A hidden port slows nobody down; a private port stops everybody. Bind or VPN it instead.

This guide is based on the Technical Anshu Nginx Proxy Manager video • Stuck on any step? Ask in the video comments — you will get an answer there 🙏