No Local Access in Docker Container

Server Version#: Version 1.18.2.2058

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”?

Settings/Network/LAN Networks perhaps?

I already have this in there

10.0.0.1/24,172.18.0.0/16

Try it with a spelled out subnet mask, like: 10.0.0.0/255.255.255.0

And guess 10.0.0.1 was a typo?

Also remember to restart PMS afterwards

hmmm, tried that. Everything still shows the docker 172.18.x.x IP, including logs.

Of note is that I am also using Xteve in docker and that is referenced in the logs properly as 10.0.0.189:34400

Hmm, and sadly not a docker person, so was grasping for a straw here :frowning:

Sorry, and do hope some docker persons will pass by this thread though, since clueless here

cant really pinpoint what the issue might be. the container resolves both via 10.0.0.189:32400 and via reverse proxy without issue.

wonder if the ADVERTISE_IP environment variable as http://10.0.0.189:32400 has anything to do with it?

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.

1 Like

ok so I have the following:

ADVERTISE_IP=http://10.0.0.189:32400,https://plex.domainname.com
LAN Networks as 10.0.0.0/255.255.255.0,172.18.0.0/255.255.0.0
Custom Server Access URL as https://plex.domainname.com

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.

ok great, i will give that a try!

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.

this looks promising!

Connection protocol=“http” address=“172.18.0.4” port=“32400” uri=“http://172.18.0.4:32400” local=“1”/
Connection protocol=“http” address=“10.0.0.189” port=“32400” uri=“http://10.0.0.189:32400” local=“1”/>

1 Like

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.

Connection protocol=“http” address=“172.18.0.4” port=“32400” uri=“http://172.18.0.4:32400” local=“1”/
Connection protocol=“http” address=“10.0.0.189” port=“32400” uri=“http://10.0.0.189:32400” local=“1”/
Connection protocol=“https” address=“plex.domainname.net” port=“32400” uri=“https://plex.domainname.net:32400” local=“0”/
Connection protocol=“http” address=“x.x.x.x” port=“32400” uri=“http://x.x.x.x:32400” local=“0”/

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).

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