How to set up Plex on a reverse proxy

I’m using the Plex docker container. I’d like to host Plex on port 443, but I already have a web server listening on that port. So I think this means I’d have to host plex behind a reverse proxy. Everything I’ve googled shows many many variations to configuring NGINX for this. Right now this is what I’m hoping for:

public PC -> Direct connect on port 443 -> My router 443 -> NGINX reverse proxy 443 -> Plex server on port 32400 (unencrypted)

Reason I think it should be unencrypted between the proxy & plex is that the reverse proxy already takes care of SSL, and it doesn’t make sense to waste doing both together.

I prefer a subpath domain, like https://domain.com/plex, but I am willing to do https://plex.domain.com if that’s easier.

Can anyone share some advice on how to do this? The reason I want to do this is because I like to access Plex from networks where the only outgoing ports allowed are 80 and 443. This means I can’t access my server using the normal set up, which requires port 32400 to be allowed out of the firewall.

Plex has a pretty complicated system for running SSL on their own terms, and I think that clients assume that they can talk directly to Plex on port 32400. I think it’d be difficult to work around Plex and try and force things through port 443.

See How to setup nginx as a reverse proxy for plex? for a working example :wink: Though, this is a subdomain solution. Context path related rules will likely be more complicacted. You have to live with a broken remote access display, as it uses ip instead of the domainname to perform it’s availability check.

What is remote access display?

Here’s an nginx letsencrypt reverse proxy docker image we maintain: https://hub.docker.com/r/linuxserver/letsencrypt/

It comes with preset proxy confs that are very easy to enable. It includes confs for both the subdomain and subfolder method for plex

Here’s the subdomain version for reference:

I was refering to the “Remote Access” indicator , it will allways say “Not available outside your network”.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.