Self-Hosting · Security

What to Expose and What to Never Expose: The Self-Hosting Exposure Hierarchy

Most self-hosting security advice collapses into “don’t open ports,” which is true and useless. The workable version is a hierarchy: every service you run belongs on one of four rungs — safe to publish, publish through a tunnel with authentication in front, reachable only over your VPN, or never reachable from outside your LAN at all. This guide assigns the common services to their rungs and explains the reasoning, so you can place new ones yourself.

Published Nov 20, 2026

The four rungs

Rung 1 — Public, by design. Almost nothing a home user runs belongs here. A public website you maintain, a game server for friends, maybe a Matrix or Mastodon instance you joined a federation with on purpose. The test: the service was built to face strangers, you keep it patched, and a compromise would be embarrassing rather than catastrophic.

Rung 2 — Published, but through a gate. Services you and your household use from outside — Jellyfin for travel, Immich for photo backup from your phone — published through a tunnel or reverse proxy with a real authentication layer in front (the service’s own login at minimum; SSO or the tunnel provider’s access controls on top where you can). Everything on this rung must be software you update promptly, because its login page is visible to the internet’s scanners within hours of appearing.

Rung 3 — VPN-only. The default for everything else you need remotely: admin interfaces you check from your phone, Home Assistant, your NAS file access, dashboards, monitoring. A WireGuard-based VPN (Tailscale is the easy on-ramp; our remote access comparison covers the options) makes these reachable from anywhere while invisible to everyone else. If a service has no strong login of its own, it lives here or lower — never higher.

Rung 4 — LAN-only, never exposed. The rung that matters most, listed next.

Never expose these

Your hypervisor and NAS management planes. Proxmox, TrueNAS, DSM, UGOS, and router/firewall admin pages are keys to everything else on the network. There is no home scenario where they need a public login page; reach them over your VPN. Our security basics guide starts from this rule for a reason.

The Docker socket and container management. Portainer, Dockge, and the Docker API are root-equivalent on the host. LAN or VPN only, and Portainer’s own login is not a reason to promote it a rung.

Databases. Postgres, MariaDB, Redis, and friends have no business on a public port, ever — their authentication was designed for application servers on trusted networks. If an app needs the database, they should share a Docker network, not a port mapping.

Network infrastructure: DNS resolvers (an open resolver gets abused for amplification attacks), SMB/NFS shares, IPMI/iDRAC and other out-of-band management (historically a security disaster area), camera RTSP streams, and printer interfaces. Cameras in particular: view them through Frigate or Home Assistant over the VPN, never through the camera vendor’s port-forwarding feature.

How things end up on the wrong rung

Almost never by a decision. It happens by accumulation: a port forwarded “temporarily” for a test, a UPnP checkbox a NAS enabled during setup (this is how many of the QNAP ransomware victims were reached — the NAS exposed itself), a router feature that punches holes automatically. Two habits keep the ladder accurate. First, turn UPnP off on the router and make every opening a deliberate, listed act. Second, keep a written inventory — the same document from our documentation guide — with a line for every published service, its rung, and how it is reached. Audit it twice a year: scan your own public IP’s open ports, and reconcile what you find against the list. Anything you find that isn’t on the list is the finding.

Placing a new service: the three questions

Who needs it from outside — named people, or the public? Does it have a maintained login you trust, and is it updated promptly? What is the worst case if its login falls — one app’s data, or a path into the host? Named people plus a weak blast radius can earn rung 2 through a tunnel. Everything else defaults to the VPN, and management planes don’t get to argue. When in doubt, start a rung lower than you think; promoting a service later is a five-minute change, and the reverse lesson tends to arrive as an incident.

Official documentation and references

Frequently asked questions

Is a reverse proxy enough protection for a login page?

A reverse proxy adds TLS and a single place to log and rate-limit, but it does not make the application behind it stronger — a vulnerable app is still vulnerable through the proxy. For household services, put authentication with real teeth in front (the tunnel provider’s access control or an SSO layer like the ones in our Authentik vs Authelia guide), keep the app updated, or drop the service to VPN-only access.

Is Tailscale safe enough for admin interfaces?

Yes — that is its design case. Admin planes reached through a WireGuard-based mesh are not visible to internet scanners at all, and access is tied to your account and devices. Protect the account itself with a passkey or strong MFA, since it becomes a key to your network, and review the device list occasionally.

My NAS wants to enable UPnP and a cloud link. Should I?

No to UPnP — it lets devices open internet-facing holes without asking you, and it is the mechanism behind several NAS ransomware waves. The vendor cloud link is optional: it can be convenient for sharing, but you can achieve the same reach through your own VPN or tunnel with the exposure under your control. Convenience features that change your exposure should always be opt-in decisions, not setup-wizard defaults.

How do I check what I currently have exposed?

From outside your network (a phone on cellular, or a free port-scan service), scan your public IP for listening ports and compare the list with what you intended to publish. Also check the router’s port-forwarding and UPnP tables directly — the router is the ground truth for what is open. Anything unexpected gets closed first and investigated second.

Related guides