The Homelab Bench is reader-supported. As an Amazon Associate we earn from qualifying purchases; this article contains affiliate links.
By the end of this guide you will have encrypted remote access to your whole Proxmox homelab, including every VM, container and LAN device, without exposing the Proxmox web UI to the internet. We cover two routes: Tailscale (no router ports at all, works behind CGNAT) and self-hosted WireGuard (no third party, one UDP port forwarded). Pick one and follow it start to finish.
Current as of November 2026: Proxmox VE 9.2, Debian 13 (Trixie) container templates.
Prefer to watch? Here is the full walkthrough on video:
Tailscale vs WireGuard: Pick Your Path First
The two tools sit at different levels of the same stack, so it is worth knowing what you are choosing before you touch a terminal.
WireGuard is a modern VPN protocol built into the Linux kernel. It is fast, lean and entirely self-hosted, but you configure every peer by hand: you generate key pairs, write a config file for the server and for every client, and forward a UDP port on your router. Adding a new device means editing config on both ends. It suits people who want zero outside dependency and are comfortable with a little Linux networking.
Tailscale is built on WireGuard. It uses the WireGuard protocol for its encrypted tunnels and adds a control plane on top: log in with an existing account, automatic key distribution, NAT traversal, an admin console and MagicDNS hostnames. Your traffic travels directly between your devices wherever possible; Tailscale’s servers coordinate keys and connections rather than carrying your data. Because Tailscale handles NAT traversal itself, it works even if your ISP puts you behind CGNAT, where plain WireGuard cannot accept incoming connections at all without a VPS in the middle.
For most homelabs, Tailscale is the quickest route to reliable remote access, and the only easy one behind CGNAT. Plain WireGuard is the choice when you want no third-party service involved and you can forward a port. This guide covers Path A: Tailscale first and in the most depth, then Path B: WireGuard in an LXC.
Orienting Yourself in Proxmox Before You Start
If you are new to Proxmox, here is the layout so the steps below make sense. Log in at https://<your-proxmox-ip>:8006. On the left is the resource tree: Datacenter at the top, your node (usually pve) under it, and your VMs and LXC containers under the node. Clicking anything in the tree changes the panel on the right.
- Shell: in the top-right toolbar when you select the node. It opens a root terminal on the Proxmox host. For a container, the equivalent is its Console tab.
- Create CT: the blue button in the very top bar. It starts the wizard for a new LXC container.
- Resources: a tab on each container. This is where you pass the TUN device through to the container in Path A.
- Options: another container tab, where you set Start at boot.
- System → Network: under the node. It shows your bridge (usually
vmbr0) and its CIDR, which tells you your LAN subnet.
If you have never made a container before, Creating Your First VM and LXC Container in Proxmox walks through the wizard in detail.
Path A: Tailscale on Proxmox (Recommended)
The cleanest setup is a small, dedicated, unprivileged LXC container running Tailscale as a subnet router. That one container advertises your whole LAN subnet to your Tailscale network (your “tailnet”), so you can reach Proxmox, Home Assistant, your NAS and everything else on the LAN without installing Tailscale on each of them. Running it in its own unprivileged container, rather than on the Proxmox host itself, keeps it isolated from the hypervisor.

Step 1: Create a Tailscale Account
Go to tailscale.com and sign up with a Google, GitHub, Microsoft or Apple account. The free Personal plan allows up to six users with unlimited personal devices, which is plenty for a homelab (it is for non-commercial use). Then install the Tailscale app on the laptop and phone you will use to connect from outside. Clients exist for Windows, macOS, Linux, iOS and Android.
Step 2: Create a Dedicated LXC Container
In the Proxmox web UI, click Create CT and work through the wizard:
- General: Hostname
tailscale, a strong root password, and leave Unprivileged container ticked (the default). - Template: Debian 13 standard. If it is not listed, download it first from your node’s local storage → CT Templates → Templates.
- Disks: 4 GB is plenty.
- CPU: 1 core.
- Memory: 512 MB.
- Network: bridge
vmbr0, with a static IPv4 address such as192.168.1.50/24and your router as the gateway. A fixed address makes the container easy to find when you need to troubleshoot it.

On the last page, untick Start after created if it is ticked, then click Finish. You will add the TUN device before the first boot.
Step 3: Give the Container Access to /dev/net/tun
Tailscale creates a virtual network interface, which needs the kernel’s TUN device. Unprivileged containers do not get /dev/net/tun by default, so you pass it through explicitly. There are two ways.
Option A: the Proxmox GUI (Proxmox VE 8.2 and later). Select the new container in the resource tree, open Resources, then click Add → Device Passthrough.

In Device Path, enter /dev/net/tun, leave the other fields at their defaults, and click Add.

Option B: the config file (any version). In the Proxmox host Shell (not inside the container), edit the container’s config, replacing 100 with your container ID:
nano /etc/pve/lxc/100.conf
Add these two lines at the bottom:
lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
Save and exit with Ctrl+X, then Y, then Enter. Use one option or the other, not both. If the container was already running, shut it down and start it again for the change to apply.
Shortcut: the community Proxmox VE Helper-Scripts include a Tailscale add-on that you run from the host Shell. It asks which existing container to use, adds the TUN access and installs Tailscale. Afterwards you reboot the container and run tailscale up inside it. If you use it, skip ahead to Step 5.
Step 4: Start the Container and Install Tailscale
Select the container and click Start (or run pct start 100 in the host Shell). Open the container’s Console, log in as root, and run:
apt update && apt install -y curl
Then install Tailscale with the official script. It detects Debian, adds Tailscale’s package repository and signing key, installs the package and starts the tailscaled service:
curl -fsSL https://tailscale.com/install.sh | sh
Step 5: Enable IP Forwarding
To forward traffic from your tailnet onto the rest of the LAN, the container must have IP forwarding turned on. Inside the container, run:
echo 'net.ipv4.ip_forward = 1' | tee -a /etc/sysctl.d/99-tailscale.conf
echo 'net.ipv6.conf.all.forwarding = 1' | tee -a /etc/sysctl.d/99-tailscale.conf
sysctl -p /etc/sysctl.d/99-tailscale.conf
Both settings are printed back when they take effect, and the file makes them stick across reboots.
Step 6: Bring Up Tailscale and Advertise Your Subnet
First find your LAN subnet. On the Proxmox node, open System → Network and look at the CIDR column for vmbr0. An address like 192.168.1.10/24 means your subnet is 192.168.1.0/24.

Back in the container console, log in and advertise that subnet in one command (swap in your own subnet):
tailscale up --advertise-routes=192.168.1.0/24 --accept-dns=false
--accept-dns=false stops Tailscale from changing the container’s own DNS settings, which is the safer choice on a server. Tailscale prints a login URL. Open it in your browser and sign in with the same account as Step 1 to add the container to your tailnet.
Step 7: Approve the Subnet Route in the Admin Console
Advertised routes do nothing until you approve them. This is a deliberate safety check. Open the Machines page of the Tailscale admin console. Your container shows a Subnets badge. Open its … menu and choose Edit route settings (on newer consoles you can also click the machine and find the Subnets section). Tick your subnet, for example 192.168.1.0/24, and click Save.
Step 8: Use the Routes on Your Laptop and Phone
The Windows, macOS, iOS and Android apps pick up approved subnet routes automatically. Linux clients only see Tailscale addresses by default, so on a Linux laptop run:
sudo tailscale set --accept-routes
One catch: if the network you are visiting uses the same range as your home LAN (192.168.1.0/24 is very common on hotel and café Wi-Fi), addresses can clash. If you are setting up a LAN from scratch, a less common range such as 192.168.47.0/24 avoids the problem.
Step 9: Disable Key Expiry for the Container
By default, each device’s key expires after 180 days and the device has to log in again. On a headless subnet router that means remote access quietly stops while you are away. In the admin console, open the container’s … menu and choose Disable key expiry. Only do this for servers you trust. Leave expiry on for laptops and phones, so a lost device eventually drops off your tailnet.
Step 10: Check MagicDNS
MagicDNS gives every device that runs Tailscale a short name, so you can ssh root@tailscale instead of remembering a 100.x.y.z address. It is on by default for newer tailnets; check the DNS page of the admin console and enable it if needed. Note that it only names Tailscale devices. Things behind the subnet router, such as the Proxmox web UI, are still reached by their normal LAN IP unless you also install Tailscale on them or point the tailnet at your own DNS server.
Step 11: Start the Container at Boot
Select the Tailscale container, open Options, double-click Start at boot and set it to Yes. New containers do not start at boot by default, so without this a host reboot leaves you locked out until you are home again.

Verify the Connection
Inside the container, run:
tailscale status
It lists every device in your tailnet with its Tailscale IP. Then do a real test: turn off Wi-Fi on your phone so it uses mobile data, make sure the Tailscale app is connected, and browse to https://192.168.1.10:8006 (your Proxmox host’s real LAN IP). The login page should load through the tunnel.
Path B: Self-Hosted WireGuard in a Proxmox LXC
If you want no third-party service involved, run your own WireGuard server in a container. You need to forward one UDP port (51820 by default) on your router, so this path does not work behind CGNAT. To check, compare the WAN IP on your router’s status page with the address a site like whatismyip.com reports. If they differ, or the router’s WAN IP starts with 100.64 to 100.127, you are behind CGNAT and should use Tailscale. If your ISP changes your public IP from time to time, you will also need a dynamic DNS (DDNS) hostname.
Step 1: Create an Unprivileged LXC Container
Click Create CT and use the same settings as Path A Step 2, with hostname wireguard, a static IP such as 192.168.1.51/24, and 256 MB of memory. Keep Unprivileged container ticked. WireGuard lives in the Proxmox kernel, which the container shares, so it does not need a privileged container or the TUN device.
Step 2: Install the WireGuard Tools
Start the container, open its Console, and run:
apt update && apt install -y wireguard-tools iptables qrencode
wireguard-tools gives you the wg and wg-quick commands. Check that the container can create a WireGuard interface:
ip link add wg-test type wireguard && ip link del wg-test && echo OK
If that prints OK, carry on. If it fails, run modprobe wireguard in the Proxmox host Shell and try again.
Step 3: Enable IP Forwarding
echo 'net.ipv4.ip_forward = 1' > /etc/sysctl.d/99-wireguard.conf
sysctl -p /etc/sysctl.d/99-wireguard.conf
Step 4: Generate the Keys
WireGuard authenticates with key pairs. Create the server’s pair, and one for your first client (a laptop here) so you can build its config on the server:
cd /etc/wireguard
umask 077
wg genkey | tee server_private.key | wg pubkey > server_public.key
wg genkey | tee laptop_private.key | wg pubkey > laptop_public.key
umask 077 makes the new files readable by root only. Private keys never leave the device they belong to, apart from the client file you hand over in Step 7. Public keys are what each side shares with the other.
Step 5: Create the Server Config
Read the keys with cat server_private.key and cat laptop_public.key, then create the interface config:
nano /etc/wireguard/wg0.conf
[Interface]
Address = 10.10.0.1/24
ListenPort = 51820
PrivateKey = <contents of server_private.key>
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
# Laptop
PublicKey = <contents of laptop_public.key>
AllowedIPs = 10.10.0.2/32
Address is the server’s IP on the new VPN subnet, 10.10.0.0/24. AllowedIPs in the [Peer] block is the VPN address the laptop will use. The PostUp and PostDown lines add and remove firewall rules that let VPN clients reach the LAN through the container’s eth0 interface.
Step 6: Start WireGuard
systemctl enable --now wg-quick@wg0
wg show
wg show should list the wg0 interface with its public key and listening port. Also set the container to Start at boot under Options, as in Path A Step 11.
Step 7: Create the Client Config
Still on the server, create /etc/wireguard/laptop.conf:
[Interface]
Address = 10.10.0.2/24
PrivateKey = <contents of laptop_private.key>
[Peer]
PublicKey = <contents of server_public.key>
Endpoint = your-ddns-name.example.com:51820
AllowedIPs = 192.168.1.0/24, 10.10.0.0/24
PersistentKeepalive = 25
AllowedIPs makes this a split tunnel: only traffic for your home LAN and the VPN subnet goes through WireGuard, and everything else uses the local connection. Use 0.0.0.0/0 instead to send all traffic home. PersistentKeepalive = 25 sends a small packet every 25 seconds so the tunnel survives NAT on mobile networks.
Step 8: Forward UDP 51820 on Your Router
In your router’s port-forwarding page, forward UDP port 51820 to the container’s LAN IP (192.168.1.51 in this example), internal port 51820. Every router’s menus differ, but those four values are always what it asks for. Do not forward 8006 or any other port.
Step 9: Load the Config on Your Devices
For a phone, show the client config as a QR code in the container console and scan it with the WireGuard app (+ → Scan from QR code):
qrencode -t ansiutf8 < /etc/wireguard/laptop.conf
On Windows or macOS, copy the file over (for example with scp) and use Import tunnel(s) from file in the WireGuard app. On Linux, save it as /etc/wireguard/wg0.conf and run sudo wg-quick up wg0. Once the device has its config, delete the client’s private key file from the server.
For each extra device, generate a new key pair, give it the next VPN address (10.10.0.3, and so on), add a [Peer] block to the server’s wg0.conf, then reload without dropping existing connections:
wg syncconf wg0 <(wg-quick strip wg0)
Alternative: many consumer and travel routers can run a WireGuard server themselves, which saves forwarding a port to a container. If yours cannot and you are replacing it anyway, look for WireGuard server support in the spec sheet.
Check price: Amazon UK | Amazon US | Amazon IE
Security Hardening for Either Approach
- Never forward port 8006. Reach the Proxmox web UI only through the tunnel.
- Use Tailscale access controls if you share your tailnet with family. The Access controls page in the admin console decides which users and devices can reach which addresses, including your advertised subnet.
- Keep the container updated. Run
apt update && apt upgradein it now and then, which also updates Tailscale or WireGuard. - Back up the container. All of the WireGuard server state lives in
/etc/wireguard/, so a normal Proxmox backup of the container captures it. See automated VM/LXC backups with Proxmox Backup Server. - Know when the host is down. Remote access only helps if the host is up. Pair this with Proxmox email and Telegram alerts.
Remote access pairs well with a reverse proxy, which gives your services friendly names and HTTPS once you are on the network. See setting up Nginx Proxy Manager or Caddy on Proxmox. If your IoT gear lives on its own VLAN, remember to advertise or allow that subnet too; our IoT VLAN guide covers the layout.
Troubleshooting Quick Reference
| Symptom | Likely cause | Fix |
|---|---|---|
| Tailscale connects but LAN IPs don’t load | Route not approved, client not accepting routes, or forwarding off | Approve the route in the admin console; on Linux clients run sudo tailscale set --accept-routes; check sysctl net.ipv4.ip_forward returns 1 in the container |
| Remote access stopped after about six months | Device key expired on the subnet router | Re-run tailscale up in the container, then disable key expiry for it |
tailscaled fails with a TUN error |
/dev/net/tun not passed through |
Add it under Resources → Add → Device Passthrough, or add the two config lines, then restart the container |
| WireGuard connects but no LAN traffic | IP forwarding off or NAT rule missing | Check sysctl net.ipv4.ip_forward returns 1; check the rule with iptables -t nat -L POSTROUTING |
| WireGuard handshake never completes | UDP 51820 not forwarded, wrong endpoint, or CGNAT | Check the router rule and the client’s Endpoint; if you are behind CGNAT, use Tailscale |
Frequently Asked Questions
Can I run Tailscale and WireGuard on the same Proxmox host?
Yes. In separate containers they don’t interfere: Tailscale uses its own tailscale0 interface and WireGuard uses wg0. Some people use Tailscale day to day and keep a WireGuard tunnel as a backup that doesn’t depend on any outside service.
Do I need to open any ports on my router for Tailscale?
No. Tailscale makes outgoing connections and uses NAT traversal to link devices directly. When a direct path isn’t possible, it relays the already-encrypted traffic through its DERP relay servers, which cannot read it.
Can Tailscale read my traffic?
No. Traffic is WireGuard-encrypted end to end between your devices. Tailscale’s coordination servers do know which devices are in your tailnet and when they connect. If you want to avoid even that, Headscale is a self-hosted replacement for the coordination server, though it takes more setup.