Access Plex Remotely With WireGuard VPN

Published 2026-10-16 · PlexBeam

Plex's built-in remote access works by opening port 32400 to the internet — anyone who discovers your public IP and port can reach your Plex server's login page. A VPN provides a more secure alternative: your Plex server stays invisible to the internet, and only devices connected to your VPN can reach it. WireGuard is the best VPN protocol for this — it is fast, lightweight, and simple to configure compared to OpenVPN or IPsec.

Why Use a VPN Instead of Port Forwarding

Standard Plex remote access with port forwarding works but has drawbacks:

  • Exposure: Port 32400 is publicly accessible. Automated scanners constantly probe for open Plex servers. While Plex requires authentication, any exposed service is an attack surface.
  • Double NAT / CGNAT: If your ISP uses carrier-grade NAT, port forwarding is impossible. A VPN works regardless of NAT configuration because the connection initiates outbound.
  • ISP restrictions: Some ISPs block or throttle common server ports. A VPN tunnel bypasses these restrictions entirely.

With a VPN, port 32400 never touches the public internet. Your Plex server listens only on its local IP. VPN clients connect to the VPN server (which uses a single, different port), and once connected, they can access Plex as if they were on the local network.

Architecture Options

Option A: WireGuard on the Plex Server Itself

Simplest setup. The Plex server also runs the WireGuard server. Good for single-server setups where the Plex machine is always on.

Option B: WireGuard on the Router

Many routers (OPNsense, pfSense, Ubiquiti, OpenWrt, Mikrotik) support WireGuard natively. The VPN terminates at the router, and VPN clients get access to the entire LAN — including Plex, NAS, and other services. Best for multi-service home networks.

Option C: WireGuard on a Dedicated VPN Box

A Raspberry Pi or small VM running WireGuard. The VPN box sits on the LAN and routes VPN clients to local services. Good when you do not want to modify the Plex server or router.

Setting Up WireGuard on the Plex Server (Linux)

Install WireGuard

apt install wireguard

Generate server keys:

wg genkey | tee /etc/wireguard/server_private.key | wg pubkey > /etc/wireguard/server_public.key

chmod 600 /etc/wireguard/server_private.key

Server Configuration

Create /etc/wireguard/wg0.conf:

[Interface]

Address = 10.100.0.1/24

ListenPort = 51820

PrivateKey = (contents of server_private.key)

PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

Replace eth0 with your server's actual network interface name (check with ip addr).

Add a Client Peer

Generate client keys on the client device (or on the server for convenience):

wg genkey | tee client_private.key | wg pubkey > client_public.key

Add the client to the server config:

[Peer]

PublicKey = (contents of client_public.key)

AllowedIPs = 10.100.0.2/32

Start WireGuard

systemctl enable --now wg-quick@wg0

Port Forward on Your Router

Forward UDP port 51820 from your router to the Plex server's local IP. This is the only port you expose — and it is WireGuard's encrypted tunnel, not Plex itself.

Client Configuration

Install the WireGuard app on your client device (available for iOS, Android, Windows, macOS, Linux). Create a new tunnel with this configuration:

[Interface]

Address = 10.100.0.2/24

PrivateKey = (contents of client_private.key)

DNS = 1.1.1.1

[Peer]

PublicKey = (contents of server_public.key)

Endpoint = your-public-ip:51820

AllowedIPs = 10.100.0.0/24, 192.168.1.0/24

PersistentKeepalive = 25

The AllowedIPs line is important: it routes traffic for the VPN subnet (10.100.0.0/24) and your home LAN (192.168.1.0/24, adjust to match your network) through the tunnel. All other traffic goes through the client's normal internet connection — this is split tunneling.

Split Tunneling for Plex

By default, you probably do not want ALL your internet traffic going through the VPN — just the traffic destined for your home network. The AllowedIPs setting controls this:

  • Split tunnel (recommended): AllowedIPs = 10.100.0.0/24, 192.168.1.0/24 — only Plex and home network traffic uses the VPN. Web browsing, streaming services, and other traffic use the client's normal connection.
  • Full tunnel: AllowedIPs = 0.0.0.0/0 — ALL traffic routes through the VPN. Your client appears to be at home for everything. This uses more of your home upload bandwidth but provides complete privacy.

Accessing Plex Through the VPN

Once the WireGuard tunnel is active on your client device:

  1. Open the Plex app or navigate to http://10.100.0.1:32400/web (or your server's LAN IP if using the LAN route).
  2. Plex sees the connection as local — no remote access needed, no transcoding limits, no bandwidth caps. You get the same quality as if you were home.

Important: in Plex, you can add the WireGuard subnet to the "LAN Networks" list under Settings > Network. Add 10.100.0.0/24. This tells Plex to treat VPN clients as local, applying local streaming quality settings instead of remote limits.

Dynamic DNS

If your home IP address changes (most residential ISPs assign dynamic IPs), the WireGuard Endpoint in your client config will break when the IP changes.

Fix this with dynamic DNS (DDNS). Services like DuckDNS (free), No-IP, or Cloudflare DNS can automatically update a hostname to point to your current public IP. Then use the hostname as the Endpoint instead of an IP address:

Endpoint = myplex.duckdns.org:51820

Using Tailscale Instead (Zero-Config Option)

If the manual WireGuard setup feels complex, Tailscale is a managed WireGuard-based mesh VPN that handles key exchange, NAT traversal, and configuration automatically. Install Tailscale on your Plex server and client devices, sign in, and they can reach each other — no port forwarding, no config files.

Tailscale is free for personal use (up to 100 devices). The trade-off: you rely on Tailscale's coordination servers for key exchange (the actual data transfer is still peer-to-peer and encrypted). For full self-hosting, use Headscale — an open-source Tailscale control server.

Performance Considerations

WireGuard adds minimal overhead — typically less than 5% bandwidth loss and under 1 ms of latency on modern hardware. For Plex streaming, this is imperceptible.

The bottleneck is your home internet upload speed, not WireGuard itself. If your upload is 50 Mbps, you can stream a 4K remux (80-100 Mbps) only if the VPN client's download speed is fast enough to handle it — which it usually is on broadband or 5G. The limiting factor remains your home upload.

← Back to Blog
More from LuxuriousComputers: LuxuriousComputers · Computer Repair · Remote Fix · Phone Repair · HVAC · Plex Support