[Support] Linuxserver.io - Plex Media Server


Recommended Posts

Hi,

 

I just followed this guide "How to Setup and Configure a Reverse Proxy on unRAID with LetsEncrypt & NGINX" (linked below).

When he did this and set his "Network Type" to "Custom : proxynet" it still showed "Port Mappings (App to Host)"

When I switch to "Custom : proxynet" on my linuxserver Plex docker the port mappings disappear.

 

How I can get to my Plex server via https://plex.mydomain.com which goes over the internet, through a reverse proxy, doing SSL, etc... but now it seems impossible to to get to Plex locally.

How can I do this?  Why did those "Port Mappings" dissappear on this Plex docker?

 

 

Link to comment
Hi,
 
I just followed this guide "How to Setup and Configure a Reverse Proxy on unRAID with LetsEncrypt & NGINX" (linked below).
When he did this and set his "Network Type" to "Custom : proxynet" it still showed "Port Mappings (App to Host)"
When I switch to "Custom : proxynet" on my linuxserver Plex docker the port mappings disappear.
 
How I can get to my Plex server via https://plex.mydomain.com which goes over the internet, through a reverse proxy, doing SSL, etc... but now it seems impossible to to get to Plex locally.
How can I do this?  Why did those "Port Mappings" dissappear on this Plex docker?
 
 
Have you setup let's encrypt? Are you setting up Plex to use the proxy?

If the answer to those questions are yes. How are you trying to access Plex?



Sent from my SM-N960U using Tapatalk

Link to comment
2 hours ago, ijuarez said:

Have you setup let's encrypt? Are you setting up Plex to use the proxy?

If the answer to those questions are yes. How are you trying to access Plex?
 

Let's Encrypt is setup.  I didn't do any configuration on the Plex side other than switching my network.

I have it set up exactly how the video described.... Ok my router/firewall I have WAN port 80 and 443 mapped to 180 and 1443 on my unRAID server.

I have letsencrypt running on proxynet network using ports 180 and 1443.

Then I have config files for nginx which pass plex.* subdomain onto plex:32400

 

Everything seems to work when I access it through internet (https://plex.whatever.com) but I can no longer access it using http://<ip of unraid>:32400

 

Curious why port mappings disappear on Plex when switching to proxynet but other dockers like Nextcloud or even the letsencrypt still list them.

Link to comment
Let's Encrypt is setup.  I didn't do any configuration on the Plex side other than switching my network.
I have it set up exactly how the video described.... Ok my router/firewall I have WAN port 80 and 443 mapped to 180 and 1443 on my unRAID server.
I have letsencrypt running on proxynet network using ports 180 and 1443.
Then I have config files for nginx which pass plex.* subdomain onto plex:32400
 
Everything seems to work when I access it through internet (https://plex.whatever.com) but I can no longer access it using http://:32400
 
Curious why port mappings disappear on Plex when switching to proxynet but other dockers like Nextcloud or even the letsencrypt still list them.
They would disappear because you created a custom network that's using the proxy to connect to your Dockers. You should be able to access it using the https://plex.xxxxx.com from with in your home. I believe spaceinvader tells you that on the network settings of Plex to change it from the default to listen on the https://plex.blahblah.com


You should still be able to click on the docker and close webui and it should open.


Sent from my SM-N960U using Tapatalk

Link to comment
16 hours ago, ijuarez said:

They would disappear because you created a custom network that's using the proxy to connect to your Dockers. You should be able to access it using the https://plex.xxxxx.com from with in your home. I believe spaceinvader tells you that on the network settings of Plex to change it from the default to listen on the https://plex.blahblah.com


You should still be able to click on the docker and close webui and it should open.


Sent from my SM-N960U using Tapatalk
 

No, the webui doesn't work for Plex but it does for Nextcloud.

The act of switching Nextcloud to "Custom : proxynet" does not affect my ability to connect locally.

The act of switching Plex to "Custom : proxynet" DOES affect my ability.  In the screenshot you see there are no Port Mappings listed for Plex but they still exist for letsencrypt, Collabora, and nextcloud.

 

I'm saying there is something different about this Plex template.

Is it possible to edit this template somewhere?

 

I looked at all of these and noticed that Plex doesn't have any Publish->Port section while the other templates do.  Perhaps this is the issue?  Could this be added?  I have to believe this is what is currently preventing me from connecting directly via local network and having to traverse the internet.

 

https://github.com/linuxserver/docker-templates/blob/master/linuxserver.io/letsencrypt.xml

https://github.com/linuxserver/docker-templates/blob/master/linuxserver.io/nextcloud.xml

https://github.com/linuxserver/docker-templates/blob/master/linuxserver.io/plex.xml

 

unraid_dockers.jpg

Link to comment
22 minutes ago, eric.frederich said:

No, the webui doesn't work for Plex but it does for Nextcloud.

The act of switching Nextcloud to "Custom : proxynet" does not affect my ability to connect locally.

The act of switching Plex to "Custom : proxynet" DOES affect my ability.  In the screenshot you see there are no Port Mappings listed for Plex but they still exist for letsencrypt, Collabora, and nextcloud.

 

I'm saying there is something different about this Plex template.

Is it possible to edit this template somewhere?

 

I looked at all of these and noticed that Plex doesn't have any Publish->Port section while the other templates do.  Perhaps this is the issue?  Could this be added?  I have to believe this is what is currently preventing me from connecting directly via local network and having to traverse the internet.

 

https://github.com/linuxserver/docker-templates/blob/master/linuxserver.io/letsencrypt.xml

https://github.com/linuxserver/docker-templates/blob/master/linuxserver.io/nextcloud.xml

https://github.com/linuxserver/docker-templates/blob/master/linuxserver.io/plex.xml

 

unraid_dockers.jpg

The reason there are no ports in the template is that we advise to run it in host mode. If you somehow change that, you need to figure out which ports to add. In this case it isn't hard for the webui. The other ports is mentioned somewhere in this thread, it might even be in the Readme on github. If not, check the which ports the official plex container recommends. 

 

You should set up dns resolver (pfsense) so that you can use the domain name inside your network. 

Link to comment
4 minutes ago, saarg said:

The reason there are no ports in the template is that we advise to run it in host mode. If you somehow change that, you need to figure out which ports to add. In this case it isn't hard for the webui. The other ports is mentioned somewhere in this thread, it might even be in the Readme on github. If not, check the which ports the official plex container recommends. 

 

You should set up dns resolver (pfsense) so that you can use the domain name inside your network. 

When I have the network for Plex set to "Host" I see these mappings listed.

 

10.9.81.99:1900/UDP  <-->  10.9.81.99:1900
10.9.81.99:32400/TCP <-->  10.9.81.99:32400
10.9.81.99:32400/UDP <-->  10.9.81.99:32400
10.9.81.99:32469/TCP <-->  10.9.81.99:32469
10.9.81.99:32469/UDP <-->  10.9.81.99:32469
10.9.81.99:5353/UDP  <-->  10.9.81.99:5353

 

No clue where this list is comming from?  Perhaps something within the Dockerfiles somewhere.

I manually set "-p 32400:32400" in the "Extra Parameters" and I was able to connect locally.

 

I have Unify/Ubiquiti equipment.  How would I make it so that I could use that domain name inside my network?

From outsite my network, that domain name points to my public IP address and I have my USG map port 80 and 443 to my unraid server port 180 and 1443 (because unRAID already uses 80 and 443).  This then hits the reverse proxy and goes to the correct Docker.

From inside my network if I had plex.mydomain.com resolve to 10.9.81.99 then what would be doing the translation from 80 and 443 to 180 and 1443?

 

I understand that you advise to run in host mode, but isn't that accomplished by defaulting to host mode?

 

Link to comment

I guess another option is to leave it in host mode and not on proxynet.

In that case, instead of using Docker to resolve each other by DNS I could hard code the IP of the unRAID server in the proxy_pass on this line:

https://github.com/linuxserver/reverse-proxy-confs/blob/master/plex.subdomain.conf.sample#L33

 

I am still interested in anything I can do locally via DNS on my USG gateway.  I'm fairly new to networking.

 

Also, if I did want to edit those template files what is the supported way to do that?  Would I copy the xml and call it custom-plex.xml and make my changes there?

 

Link to comment
11 minutes ago, eric.frederich said:

Also, if I did want to edit those template files what is the supported way to do that?  Would I copy the xml and call it custom-plex.xml and make my changes there?

Any time you make any settings on the Add Container page, that whole form is saved on flash as an XML file, which is "your template", named for the container. Your template can be reused at any time by simply selecting it from the User Templates in the Select Template dropdown at the top of the Add Container page. Your template is also reused by the Previous Apps feature on the Apps page.

Link to comment
On 3/19/2019 at 11:23 AM, trurl said:

You are missing the mapping for /audio, and obviously the /config mapping isn't the same, but as long as you copy all the /config from needo to L.io seems like it should find your plex library and go with it.

 

Did you copy the contents of /mnt/cache/Apps/Docker/apps/plexmediaserver/ to /mnt/user/appdata/plex_lio ?

 

Did you check to make sure they had the exact same folder structure and contents?

 

Yeah, I copied the entire contents of the former into the latter. (I also added the missing map, thank you)

 

Am I just expecting the wrong outcome? Will it not just start the server as if it were the old one? Or am I forced to remove my old server and start a new one? (I'm hoping the old contents will still populate if that is the case, like custom covers, sorting and whatnot)

 

EDIT: I'm also just paranoid of hitting that "Remove server" button making this irreversible, haha.

 

This is what I get after copying all the contents of the old build into the new...

 

274623220_Screenshot2019-03-2519_01_35.thumb.png.7db3c7615188bed5e96a82a8e14eea67.png

Edited by owtlaw333
Link to comment
15 hours ago, eric.frederich said:

When I have the network for Plex set to "Host" I see these mappings listed.

 

10.9.81.99:1900/UDP  <-->  10.9.81.99:1900
10.9.81.99:32400/TCP <-->  10.9.81.99:32400
10.9.81.99:32400/UDP <-->  10.9.81.99:32400
10.9.81.99:32469/TCP <-->  10.9.81.99:32469
10.9.81.99:32469/UDP <-->  10.9.81.99:32469
10.9.81.99:5353/UDP  <-->  10.9.81.99:5353

 

No clue where this list is comming from?  Perhaps something within the Dockerfiles somewhere.

I manually set "-p 32400:32400" in the "Extra Parameters" and I was able to connect locally.

 

I have Unify/Ubiquiti equipment.  How would I make it so that I could use that domain name inside my network?

From outsite my network, that domain name points to my public IP address and I have my USG map port 80 and 443 to my unraid server port 180 and 1443 (because unRAID already uses 80 and 443).  This then hits the reverse proxy and goes to the correct Docker.

From inside my network if I had plex.mydomain.com resolve to 10.9.81.99 then what would be doing the translation from 80 and 443 to 180 and 1443?

 

I understand that you advise to run in host mode, but isn't that accomplished by defaulting to host mode?

 

If you want to use the proxy with a custom domain you will need to setup DNS resolver as Saarg mention or hair pinning.  I am not sure how that is done on Unifi but im sure someone has done it before. I use pfsense for a firewall, cisco 3750 for switching, and Unifi AP with controller using the proxy and it works well.

Link to comment

Hey I updated to 1.15.2.793 and now Im trying to roll back to 1.14.1.5488 due to the server hanging once a day. I put 1.14.1.5488-cc260c476-ls9 in the version field but it doesnt roll back. Even tried just 1.14.1.5488 and the server still says 1.15.2.793. Im running Unraid Version: 6.6.7. This always worked in the past, anything change that Im unaware of?

Link to comment
3 hours ago, owtlaw333 said:

I did... I straight coped all the contents, folder for folder, file for file. Even overwrote any file that was already there. Same results.

I know you said you copied it but sometimes people make a mistake and wind up copying the source folder into the destination folder instead of the contents of the source folder so I wanted you to confirm that not only had you copied it but that you had checked the results of the copy.

 

If that all looks OK then the next thing I would suggest is just try to get this plex docker running with new appdata to see if you can at least access the plex server.

Link to comment
46 minutes ago, trurl said:

I know you said you copied it but sometimes people make a mistake and wind up copying the source folder into the destination folder instead of the contents of the source folder so I wanted you to confirm that not only had you copied it but that you had checked the results of the copy.

 

If that all looks OK then the next thing I would suggest is just try to get this plex docker running with new appdata to see if you can at least access the plex server.

Do you know if I hit that "Remove server" that I can bring it back later without much issue? (assuming this doesn't go as planned) I'm just unsure of what "remove" really means in this context. And I don't think I can go any further without doing so.

Link to comment
6 hours ago, owtlaw333 said:

Do you know if I hit that "Remove server" that I can bring it back later without much issue? (assuming this doesn't go as planned) I'm just unsure of what "remove" really means in this context. And I don't think I can go any further without doing so.

What happens if you click on that "Allow insecure connection"?

Link to comment
On 3/26/2019 at 10:01 AM, ijuarez said:

If you want to use the proxy with a custom domain you will need to setup DNS resolver as Saarg mention or hair pinning.  I am not sure how that is done on Unifi but im sure someone has done it before. I use pfsense for a firewall, cisco 3750 for switching, and Unifi AP with controller using the proxy and it works well.

This is how I understand how it works for me currently from the internet:

plex.mydomain.com has a CNAME record which points to mydomain.duckdns.org which points to my public (mostly static) IP.

 

Then, without getting into specifics of pfsense vs. Unifi, could you explain what it means to "setup DNS resolver".

What should my local DNS resolver resolve plex.mydomain.com to?

 

As I understand it while plex is running on the proxynet Docker network it is not accessible at all locally.  I do not understand how DNS would solve the fact that it's inaccessible even by IP address.

Link to comment
57 minutes ago, eric.frederich said:

This is how I understand how it works for me currently from the internet:

plex.mydomain.com has a CNAME record which points to mydomain.duckdns.org which points to my public (mostly static) IP.

 

Then, without getting into specifics of pfsense vs. Unifi, could you explain what it means to "setup DNS resolver".

What should my local DNS resolver resolve plex.mydomain.com to?

 

As I understand it while plex is running on the proxynet Docker network it is not accessible at all locally.  I do not understand how DNS would solve the fact that it's inaccessible even by IP address.

When you created the proxynet you told docker to create a network (subnet) it created an internal subnet, usually a 172.18.XXX.XX or whatever. At that point everything that is using that proxynet network became inaccessible because your physical network has no clue on how to talk to that network because its internal.  However, since LE is on the proxynet and so are the dockers they can talk to each other.  Putting the dns resolver to the side, you should be able to use a smart phone plugin your domain and it pulls up plex, correct? If so from a pc on your home network have you tried to pull plex by the domain address not by ip:port?

Link to comment
2 hours ago, ijuarez said:

When you created the proxynet you told docker to create a network (subnet) it created an internal subnet, usually a 172.18.XXX.XX or whatever. At that point everything that is using that proxynet network became inaccessible because your physical network has no clue on how to talk to that network because its internal.  However, since LE is on the proxynet and so are the dockers they can talk to each other.  Putting the dns resolver to the side, you should be able to use a smart phone plugin your domain and it pulls up plex, correct? If so from a pc on your home network have you tried to pull plex by the domain address not by ip:port?

Yes, everything you said is understood and correct.

On my home network I am able to use plex by the domain address.  Same from my phone.  It works.

 

What I was asking though, is how to make it possible to access it by ip:port while at home and not have this traffic traverse the public internet.

I would like to use my domain when I'm away and my ip while at home.

 

I believe this can be solved 2 different ways.

  • Let plex run on proxynet and either
    • modify template to publish the ports
    • modify the Extra Parameters to include port mappings like -v 32400:32400
  • Let plex run on host and
    • Hard code Unraid IP address in proxy config:
      i.e. change "proxy_pass http://$upstream_plex:32400;" to "proxy_pass http://10.10.1.99:32400;"

I thought the best way to fix this would be to have the linuxserver guys change their template so that it would play nice with the LetsEncrypt container/configurations which are also owned by them.

Link to comment
40 minutes ago, eric.frederich said:

Yes, everything you said is understood and correct.

On my home network I am able to use plex by the domain address.  Same from my phone.  It works.

 

What I was asking though, is how to make it possible to access it by ip:port while at home and not have this traffic traverse the public internet.

I would like to use my domain when I'm away and my ip while at home.

 

I believe this can be solved 2 different ways.

  • Let plex run on proxynet and either
    • modify template to publish the ports
    • modify the Extra Parameters to include port mappings like -v 32400:32400
  • Let plex run on host and
    • Hard code Unraid IP address in proxy config:
      i.e. change "proxy_pass http://$upstream_plex:32400;" to "proxy_pass http://10.10.1.99:32400;"

I thought the best way to fix this would be to have the linuxserver guys change their template so that it would play nice with the LetsEncrypt container/configurations which are also owned by them.

Nothing need to be done to the template. 

The traffic doesn't go through internet if you can use the domain name to get to plex on your home network. Then you have managed to set up dns resolver somehow. 

When running plex on the custom docker bridge you need to add ports to get it to work on your local network through IP. If you add 32400 you should be able to go to unraid-IP:port/web. 

Link to comment
15 minutes ago, saarg said:

Nothing need to be done to the template. 

The traffic doesn't go through internet if you can use the domain name to get to plex on your home network. Then you have managed to set up dns resolver somehow. 

When running plex on the custom docker bridge you need to add ports to get it to work on your local network through IP. If you add 32400 you should be able to go to unraid-IP:port/web. 

I am adding this as another option on how I did it.

 

You can request LSIO to modify the template but I think it will introduce more confusion for noobs.

TL;DR version

In order to achieve this you will need to have the plex docker access two networks Proxy (which is already a member of) and host.

 

Long version
I have all of my dockers on the proxy and can be reached via the web. In my setup I have multiple vlans for different purposes. I configure my unraid
server to various vlans because i have multiple nics. In my setup br0 corresponds to eth0 and so on. My issue was that 2 dockers are on the proxynet and
the 3rd docker was on a different network. So the proxy dockers could not talk to the third. Bang my head for a few days read a lot about dockers
Poof! a docker container can be a part of multiple networks via the docker network command.

example in my case br0 default (unraid) br1 (network 1) where 3rd docker was located
on the CLI of unraid ran this

docket network connect br1 *name of docker*

What that did was join that second network and it grabbed an ip for from the DHCP pool.

to find that ip you can look at your router/dhcp server or run docker network inspect "name of container"

The only issue is that when the docker is restarted it will loose that attachment to that other network, I'm sure there's a way
to make it stick but i haven't bothered.

Link to comment
On 3/26/2019 at 8:09 AM, Wavey said:

Hey I updated to 1.15.2.793 and now Im trying to roll back to 1.14.1.5488 due to the server hanging once a day. I put 1.14.1.5488-cc260c476-ls9 in the version field but it doesnt roll back. Even tried just 1.14.1.5488 and the server still says 1.15.2.793. Im running Unraid Version: 6.6.7. This always worked in the past, anything change that Im unaware of?

I am having this EXACT same problem.

Trying to rollback because I sometimes can't leave the Plex home screen. (I can still play everything if I click it directly and search still works, but plex will never leave the home screen). The TAG/Version method has worked before, but it won't roll back this time. I'm also running Unraid Version 6.6.7. The official Plex docker rolls back like normal using the same TAG method, so I wonder if there might be a hangup with this build in particular?

 

Does anyone have any suggestions?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.