Advertising correct local IP (running within Docker)

Hi all,

 

I'm attempting to run Plex within Docker. For the most part it works fine, except for one problem.

 

Say my host computer is running on 1.2.3.4.

 

When running within Docker, https://plex.tv/pms/servers.xmladvertises the Docker-local IP, 172.x.x.x.

 

If I use a web browser and go to http://1.2.3.4:32400/web, it works fine. It also works fine with remote access. But Android and iOS clients can't autodetect it on the network.  I can't seem to manually add the IP address either.

 

Is there any way to have https://plex.tv/pms/servers.xmladvertise 1.2.3.4?

Hi all,

I'm attempting to run Plex within Docker. For the most part it works fine, except for one problem.

Say my host computer is running on 1.2.3.4.

When running within Docker, https://plex.tv/pms/servers.xmladvertises the Docker-local IP, 172.x.x.x.

If I use a web browser and go to http://1.2.3.4:32400/web, it works fine. It also works fine with remote access. But Android and iOS clients can't autodetect it on the network.  I can't seem to manually add the IP address either.

Is there any way to have https://plex.tv/pms/servers.xmladvertise 1.2.3.4?

Perhaps --net="host" would work?  Did you figure it out?

I'm now using --net=host, which works. I'd just prefer not to.

I’m resurrecting this post because it’s a top result on Google.

If you don’t want to use --net=host you can tell the other computers on your network how to connect to the 172 address space by adding a “static route” in your router’s settings. You’d want to add a “next hop” rule for “172.16.0.0/12” to point to the address of your docker host. This is obviously problematic if you have more than one docker host, but you can probably split up the networks and add multiple rules at that point.