brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

πŸš€ Why I ditched my reverse proxy for Tailscale and containers on Unraid

Tailscale

For years the standard way to reach a self-hosted service from outside has been a reverse proxy. If you are running an Unraid server, you likely know the drill: setting up Nginx Proxy Manager (NPM) or Traefik, configuring port forwarding (80/443) on your router, managing SSL certificates via Let’s Encrypt, and pointing your Cloudflare DNS entries to your home IP. This works well, but it opens a door from the public internet into your home network.

Recently I changed my approach. With Tailscale and my Unraid 7 Docker containers I now have a private mesh network that makes a public-facing proxy server almost redundant. Here is why I like it better.

Convenience against exposure

My Unraid 7 server hosts a lot of services, from Home Assistant for my smart home to the full “Arr” suite (Sonarr, Radarr, Prowlarr) and specialized tools like Immich for photo management.

Traditionally, to access these on the go, I used my example.com domain via Nginx Proxy Manager. Every port you open on your router, even a standard one like 443, is a target. Bots and malicious actors are constantly scanning the IPv4 space for open ports, looking for vulnerabilities in the software behind them. Even with tools like CrowdSec or a Cloudflare WAF, the risk of a zero-day vulnerability in a containerized app remains.

With a background in IT and social work, I have come to think the best security is the kind that shrinks the attack surface to almost nothing.

Tailscale, a mesh VPN

Tailscale is a zero-config VPN based on the WireGuard protocol. Unlike traditional VPNs that require a central server and complex handshake configurations, Tailscale creates a “mesh” where every device (your Unraid server, your phone and your laptop) connects directly to the others.

On Unraid you can run Tailscale as a Docker container or use the plugin, and your server becomes a node on your private Tailnet. It gets more useful when you go beyond the host and look at containers.

How I connected every container to Tailscale

I realized I did not have to put only the Unraid host on Tailscale: I could give each container its own Tailscale identity. I do that in two ways:

  1. The sidecar method: use a dedicated Tailscale container as a “network stack” for other containers. By setting the network mode of a container (like Jellyfin) to container:tailscale, that container effectively “lives” inside the Tailscale tunnel.
  2. Tailscale Serve and Funnel: Tailscale lets you take a local service (e.g., something running on port 8096) and “serve” it over your Tailnet.

For instance, during my recent configuration of Jellyfin, I had set a custom host port of 8095 in the Unraid advanced settings. However, Tailscale allowed me to bypass that host-level complexity. By using tailscale serve, I can map the internal container port directly to a clean Tailscale URL. I no longer have to remember port numbers, I just use names that resolve.

Why this is safer than a proxy server

1. No port forwarding

With Tailscale I have no ports open on my Ubiquiti Dream Router (UDM). The connection is outbound-only to the Tailscale coordination server, which then facilitates a peer-to-peer encrypted link. If someone scans my public IP today, they find nothing: no open 80, no open 443.

2. Built-in identity management

A proxy server usually requires you to set up Authelia or Authentik if you want Multi-Factor Authentication (MFA) for your apps. Tailscale has this built in. To access my containers, I must be logged into my Tailscale account, which is secured by my primary Identity Provider (OIDC/SAML) with hardware-key MFA. That is enterprise-grade security at a home-lab price, which is free.

3. No public DNS records

When using a reverse proxy, you often have public DNS records pointing to your home. Even with proxied IPs that is a trail. With my Tailnet, my services use internal “MagicDNS” names like jellyfin.tailnet-name.ts.net. These addresses are only resolvable by my devices. To the rest of the internet my services do not exist.

4. Performance

Since Tailscale uses WireGuard, the overhead is small. My 12th Gen Intel Core i5-1235U handles the encrypted traffic easily, whether I stream high-bitrate 4K through Jellyfin or sync thousands of photos to Immich, and the connection is stable and faster than OpenVPN.

What changed in daily use

My time is limited, and I do not want to spend it on SSL certificate renewals or Nginx configuration errors.

Before, if I wanted to check my P1monitor (running on a Raspberry Pi 4) to see my solar production, or manage my Beszel dashboard while away from my home in Leiden, I had to ensure my VPN was toggled on or my proxy headers were perfectly configured.

Now my phone has Tailscale always on and behaves as if it sits on my home Wi-Fi. The “Connection Refused” errors I got when NPM mishandled an SSL certificate are gone, and since Tailscale handles HTTPS with its own certificates, I no longer manage Certbot or Let’s Encrypt for internal services.

Is the proxy server dead?

Not entirely. For my public sites, like luchtlens.nl, a reverse proxy is still necessary. WordPress needs to be accessible to the world so clients can find me. For the back end of my life (my financial records in Bytestash, my Home Assistant automation and my media library) the proxy server has been retired.

By moving my Unraid containers behind Tailscale, my attack surface is much smaller and access is easier for me and my family.

A tip for Unraid users

If you encounter a “Connection Refused” error when first setting this up, remember: check your internal container ports! When a container shares a network stack with Tailscale, the “Host Port” mapping in Unraid’s UI is ignored. You must point Tailscale to the port the application is actually listening on inside the container (e.g., 8096 for Jellyfin, even if your Unraid UI says 8095).

Conclusion

If you run Unraid 7 and have not tried Tailscale yet, it is the biggest security improvement I have made to my setup. It is easy to use, and I no longer worry about an open port being exploited.

Link