kelinger / OmniStream

Deployment and management tools for an entire streaming platform that can reside on a server (local, remote, hosted, VPS) with media files stored on cloud services like Google Drive or Dropbox.
MIT License
30 stars 8 forks source link

Plex not secure with Traefik #55

Closed christeasdale closed 1 year ago

christeasdale commented 1 year ago

This seems to still be an issue with Traefik Plex not Secure Media being played back on all clients does not show as secure in Plex. Certain clients will fail playback with this. In Gooby with Nginx this wasn't an issue. Are others seeing this issue? Are there any solutions?

kelinger commented 1 year ago

Are you connecting to Plex via the Traefik proxy or did you open up a port and connect to Plex directly?

Unless you've changed from the defaults, the Plex server should be setup with remote access looking like this:

image

The public IP is your host server's IP address and 443 tells it to route through Traefik. I connect to my Plex server this way using https://plex.mydomain.com (no need to specify the port since 443 is implied by https).

Now, the top part will often say "unreachable" but that's because Plex doesn't know that Traefik exists. But that's OK.

You'll also want to configure the "customer server access URL" on the network tab of settings (towards the bottom). Again, if setup using the defaults, this would just be https://plex.mydomain.com.

Since all access to and from Plex is going through https, it is indeed secure.

christeasdale commented 1 year ago

Setup with all the defaults exactly as you mention above:

Default

Modifying plex yaml to open a port for Plex and not connecting through traefik:

Open Port

I think indeed it is technically secure but Plex/Plex servers don't think so. So configured with Traefik if you change inside Plex settings from Secure Connection : preferred to required nothing will work and you can't connect to Plex server. Also some Plex clients will sometimes fail playback (Namely Android TV, FireTV) if the connection isn't secure. Interestingly this was not an issue with NGINX in Gooby.

thunderstorm654 commented 1 year ago

Setup with all the defaults exactly as you mention above:

Default

Modifying plex yaml to open a port for Plex and not connecting through traefik:

Open Port

I think indeed it is technically secure but Plex/Plex servers don't think so. So configured with Traefik if you change inside Plex settings from Secure Connection : preferred to required nothing will work and you can't connect to Plex server. Also some Plex clients will fail playback (Namely Android TV, FireTV) if the connection isn't secure. Interestingly this was not an issue with NGINX in Gooby.

I'm seeing the same behaviour as you with the red arrows and remote access error (expected) though I hadn't noticed any issues with client playback since getting it all working (I did have a painful migration from Gooby), so to be honest hadn't questioned it.

christeasdale commented 1 year ago

One of my family members uses ubiquiti equipment and they would get playback fail on FireTV when I was running Gooby but adding port to "customer server access URL" from https://plex.mydomain.com to https://plex.mydomain.com:443 fixed it on Gooby and plex had green arrows and he had no more problems. Now problems are back with OmniStream and adding 443 doesn't help with traefik. Don't change Plex setting to require secure connections on remote sever you will lose access and have to ssh tunnel into your sever to access it again. Maybe there is a way to change traefix to fix this ... I am no expert.

christeasdale commented 1 year ago

This post seems to be a possible solution? Seems connection from Plex docker to Traefik might be the issue? I am noob on Traefik can someone guide me here and I will do the work to test this? thanks

Simmy-Simalia commented 1 year ago

Has anyone remedied this error? I've tried a few things but to no avail.

kelinger commented 1 year ago

There really isn't any issue here. https to Traefik = secure. Traefik to Plex is happening on the same server and is literally two areas of memory communicating with each other (whether encrypted or unencrypted). Plex may not "think" it is secure because it sees this data exchange and not the exchange between the true client (Plex's app or Infuse or a web browser) and Plex.