A reverse proxy puts your Plex server behind a normal HTTPS address — https://plex.example.com instead of https://1-2-3-4.…plex.direct:32400 — on the standard port 443. This guide has working configurations for Caddy, nginx, Traefik, Nginx Proxy Manager and Synology, the one Plex setting that makes it work, and the Cloudflare mistake to avoid.
Why put Plex behind a reverse proxy?
- A domain you control, for apps where you type an address by hand, which keeps working if the long plex.direct address changes when your internet provider changes your IP. (Apps that take your server's addresses from Plex, as Media Center does, follow that change on their own.)
- Port 443 only. Hotel, office and school networks often block 32400 but never block HTTPS.
- One front door for Plex, Jellyfin, Overseerr and anything else you host, with automatic certificates.
If none of those matter to you, you do not need one. Plex Remote Access already gives you a secure address — see how to set up Plex Remote Access.
Set up a Plex reverse proxy in six steps
- Point a domain at your homeCreate a DNS A record, such as plex.example.com, pointing at your home's public IP address. Use dynamic DNS if that IP changes.
- Forward port 443 to the proxyIn your router, forward TCP 443 (and 80, for certificate renewal) to the machine running the reverse proxy.
- Configure the proxyUse one of the configurations below: Caddy, nginx, Traefik, Nginx Proxy Manager or Synology. Each one terminates HTTPS and forwards to Plex on port 32400.
- Tell Plex its new addressIn Plex Web, open Settings → Network, show the advanced settings, and enter https://plex.example.com:443 under Custom server access URLs. Save. This is how Plex apps learn to connect through your proxy.
- Keep secure connections set to PreferredUnder Settings → Network, leave Secure connections on Preferred so the proxy can reach Plex on the local port.
- Test from outside your homeTurn off Wi-Fi on your phone and open https://plex.example.com/web. If Plex Web loads with a padlock, the proxy works.
Plex reverse proxy with Caddy (the easiest)
Caddy obtains and renews a certificate on its own (from Let's Encrypt or ZeroSSL) and passes WebSocket connections through without extra settings. This is the whole Caddyfile:
plex.example.com {
reverse_proxy localhost:32400
}If Caddy runs on a different machine from Plex, replace localhost with the Plex server's LAN address, for example 192.168.1.20:32400.
Plex nginx reverse proxy config
Get a certificate with Certbot (sudo certbot certonly --nginx -d plex.example.com) and add this server block. The WebSocket headers and proxy_buffering off are what most broken Plex nginx configs are missing.
server {
listen 443 ssl;
http2 on;
server_name plex.example.com;
ssl_certificate /etc/letsencrypt/live/plex.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/plex.example.com/privkey.pem;
# Posters and uploads can be large.
client_max_body_size 100M;
location / {
proxy_pass http://127.0.0.1:32400;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Plex uses WebSockets for live updates.
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Stream video as it arrives instead of buffering it.
proxy_buffering off;
proxy_read_timeout 3600s;
}
}On nginx older than 1.25.1, put http2 on the listen line instead of using the separate http2 on; directive.
Plex reverse proxy with Traefik
If Plex runs in Docker next to Traefik, add labels to the Plex service. This assumes a websecure entry point on 443 and a certificate resolver named letsencrypt in your Traefik configuration:
services:
plex:
image: plexinc/pms-docker
# ...your existing volumes and environment...
labels:
- traefik.enable=true
- traefik.http.routers.plex.rule=Host(`plex.example.com`)
- traefik.http.routers.plex.entrypoints=websecure
- traefik.http.routers.plex.tls.certresolver=letsencrypt
- traefik.http.services.plex.loadbalancer.server.port=32400Plex with Nginx Proxy Manager (NPM)
- Hosts → Proxy Hosts → Add Proxy Host. Domain:
plex.example.com; schemehttp; forward hostname: the Plex server's IP; port32400. - Turn on Websockets Support and Block Common Exploits.
- On the SSL tab, request a new Let's Encrypt certificate and turn on Force SSL and HTTP/2 Support.
Plex reverse proxy on Synology
- Get a certificate for your domain in Control Panel → Security → Certificate (Let's Encrypt is built in).
- Open Control Panel → Login Portal → Advanced → Reverse Proxy and create a rule. Source: HTTPS,
plex.example.com, port 443. Destination: HTTP,localhost, port 32400. - On the rule's Custom Header tab, choose Create → WebSocket to add the upgrade headers.
- Assign the certificate to the new hostname under Security → Certificate → Settings.
Plex reverse proxy and Cloudflare: the catch
Many guides tell you to put Plex behind Cloudflare's proxy or a Cloudflare Tunnel. On an ordinary plan, don't. Cloudflare's service terms say that, unless you are an Enterprise customer, you must use its paid services — such as the Developer Platform, Images and Stream — to serve video and other large files through its CDN, and it reserves the right to limit accounts that do otherwise. A Tunnel's public hostname is served through the same network. Caching can also stall playback.
You can still use Cloudflare for DNS: set the Plex record to DNS only (the gray cloud) so viewers connect straight to your own proxy.
Your proxy is ready. Now make it easy for everyone else.
You do not need the proxy for Media Center: click Sign in with Plex in the web dashboard and it connects with the secure plex.direct addresses Plex publishes for your server, at home and away, and keeps them current. Your household never has to know an address exists:
- Email invitations instead of shared Plex logins. Family members do not need a Plex account of their own.
- QR-code sign-in on Apple TV and Android TV. They scan with their phone, and the TV signs itself in.
- Profiles for everyone, with kids profiles that show only titles with the content ratings you allow, and an optional PIN on any profile.
- Plex and Jellyfin side by side. Put Jellyfin behind the same proxy and play both from one app.
- Nothing in the middle. Video streams directly from your server to the screen, never through ours. Households play with your server's own access key, not your Plex account.
Media Center runs on Apple TV, iPhone, iPad, Android TV, Google TV and Android phones and tablets. Plex's remote-playback rules are Plex's to set, and Plex has said they extend to third-party apps during 2026; a Plex Pass on the server owner's account covers your household.
Set up Media Center for your household →The Free plan covers one household. Your household then installs the app.
Troubleshooting a Plex reverse proxy
- Plex apps still use plex.direct. Check the address under Custom server access URLs includes
https://and:443, then sign out and back in on the app. - Plex Web loads but never updates or plays. WebSocket headers are missing — add them (nginx), or turn on Websockets Support (NPM) or the WebSocket custom header (Synology).
- Video stutters only through the proxy. Turn off buffering in the proxy and make sure a CDN is not proxying the traffic.
- Certificate errors. The domain must resolve to your public IP and port 80 must reach the proxy when the certificate is issued or renewed.
- It works at home but not outside. Work through Plex remote access not working; a double NAT or CGNAT blocks a proxy the same way it blocks Plex.
Need a token for another third-party app? See how to find your X-Plex-Token. Running Jellyfin too? The same proxy works — see Jellyfin HTTPS setup.
