Running Plex inside docker behind a reverse proxy.
Plex is accessible remotely via https://plex.domainname.com. The issue is that LAN devices never show as nearby/local connection, they only show as remote and seems likely because the private IP is showing the docker container IP 172.18.x.x and not the host IP 10.0.x.x.
I have port forwarding on the home gateway to hostIP:32400 and it does not appear I can set up a static route mapping the docker IP to host IP…how can I resolve this so LAN devices appear as “nearby” vs “remote”?
Hi @bigverm23 - I run an identical setup with PMS dockerized. To get that PMS to show up as nearby you need to include the host IP/port as a custom server access URL. If you are using Docker compose set the ADVERTISE_IP to what you want that field to be for whenever the container gets updated. You can use multiple addresses, so http://10.0.0.189:32400,https://plex.domainname.com given your previous responses.
Like @dane22 mentioned your 10.0.0.1/24 subnet also looks incorrect, should be 10.0.0.0/24 assuming your LAN is 10.0.0.1-10.0.0.254.
Whatever you set as the ADVERTISE_IP via Docker will set the Custom Server Access URL in the settings when you recreate the container, ie. docker-compose up -d. Ultimately you need both the LAN and proxy addresses in that settings, the environment variable is a helpful way to set it when using Docker.
You also don’t need the Docker LAN as a LAN network either, just 10.0.0.0/24 is enough. Reason being that you probably don’t have any clients playing from that network.
I assume you are using a custom certificate along with your URL. This would explain why the (incomplete list of) URLs you posted above aren’t using https and I assume that there is another entry for your custom URL that you chose to exclude from posting here.
If you set a value in Custom server access URLs, then it is your responsibility to ensure that this URL resolves to the correct IP addresses each situation. If this resolves to your WAN IP address only, then clients on your LAN will preferentially connect to that because it’s an https URL. You need to make sure it resolves to your LAN IP address inside your LAN and to your WAN IP address outside of it.
That’s pretty much exactly what I thought the full list was going to be. Check to see what plex.domainname.net resolves to on the LAN and make sure it resolves to 10.0.0.189 if it doesn’t already (while still resolving to x.x.x.x everywhere outside of your LAN).