Up-to-date Plex docker install help needed


Recommended Posts

I apologize if this is posted elsewhere.  If it is, I couldn't find it.  I have searched quite a bit here, and on the Plex forums looking for current install guidance.  Unfortunately, everything I have found is based on older versions of Plex and Unraid, and I can’t be certain what carries forward to the newer versions.  I am brand new to Unraid. My server is only a week old, and I am still transferring data to the server. So far the file server part is working great so I don't want to screw up anything while adding apps.

 

To start, I have Plex installed and it seems to be functioning correctly.  Still, I would like some confirmation that my config choices are correct.  I also have a couple of questions about things I do not understand.

 

I actually installed Plex twice using the Plexinc Official Repo.  During the install I was required to provide two Host Paths in order to complete the installation.  The paths are “Host Path 2: Container Path: /transcode” and “Host Path 3: Container Path: /data”. As I’ll explain below, my initial setup, although apparently functional, did not seem to be correct so I removed the app, and installed it again with different settings.

 

For the first install I interpreted the two path options as transcode folder location and appdata location.  As such, entered /mnt/disk3/transcode for transcode, and /mnt/cache/appdata/Plex for the data location. After the install was complete I fired up plex.  I could see the server, but I could not any local shares to the library.  I googled how to add media to plex unraid, and found a video that advised adding a path to the media shares. I did this, and I was able to add folders to my test library. Upon actually playing a video, transcode folders were created in Disk3/transcode as expected.  However, I discovered that no data was stored in /cache/appdata/plex. Instead, the installer had created a /appdata/PlexMediaServer folder, which was where information was being stored. This discrepancy got me wondering what I might have done wrong. So I did some more searching.

 

I found a Sept. 2017 post on the plex forum that gave me a little more direction regarding the two required host paths.  It indicated /transcode for the first host path, and /mnt/user for the second. With these settings I was able to access the media and access the local shares to add media to plex.  However, these settings still leave me with a few questions.

 

I cannot figure out where the /transcode is located on the disk.  I cannot find the folder using krusader. I have seen several posts from 2015/16 that advised using RAM for transcoding, but one of the later posts I read said that this is no longer supported.  If /transcode is not in RAM, then where is the folder located?

 

I’d like to know because I prefer to not use the SSD cache pool for plex transcoding.  Sure it is fast, but it is also needless wear on the SSDs. I would prefer to use one of the storage pool hard drives over the cache pool.

 

I've considered adding a dedicated scratch drive so I don’t have to use the SSDs or the Parity disk.  For purely temp data like on the fly transcoding, this seems perfectly acceptable. Any concerns with this idea?

 

The second question is likely because of my unfamiliarity with unraid and docker file structures.  There is probably a perfectly good explanation, but like I said I am a newbie.  When I go to /mnt in krusader the folder is empty. This alone confuses me because when I open any drive using the folder icons next to the drives on the Main tab, the path at the top of the page says /mnt/disk#.  As if this wasn’t confusing enough, when editing the host path in the plex docker configuration, and I select /mnt there is a full selection of disk options plus a user folder that contains all of the shares.  Why doesn’t the /mnt folder look the same in krusader? Are the dockers using a different file system?

 

Thanks for any assistance.

 

Link to comment
1 hour ago, jkBuckethead said:

Are the dockers using a different file system?

Yes. Think of a docker like a miniature VM, it's pretty much a whole OS all to itself. The only paths that are available inside the docker are ones that you specify in the container mapping. Host = unraid side maps to Container = docker side. So if you have /mnt/user mapped to /media in Krusader, then all your user shares will show up in /media in Krusader. The individual disks are /mnt/diskX and /mnt/cache, so if you don't have them mapped, they won't show inside Krusader.

 

If you don't have a good understanding of the difference between user shares and disks, I wouldn't try to work with disks individually, just focus on user shares.

 

 

 

 

Link to comment
On 9/30/2018 at 7:02 PM, jkBuckethead said:

I cannot figure out where the /transcode is located on the disk.  I cannot find the folder using krusader. I have seen several posts from 2015/16 that advised using RAM for transcoding, but one of the later posts I read said that this is no longer supported.  If /transcode is not in RAM, then where is the folder located? 

 

NOTE:  I understand this is more detail than you need as it involves things you have already done and have working.  I am including this detail in case it is useful for others in the future.

 

I don't use the Plexinc Plex docker as I prefer LSIO dockers whenever possible.  However, I understand LSIO consulted with Plex to help Plex setup their docker so, there are likely many similarities.

 

I think most of your confusion stems from the fact that you may not fully understand docker volume mappings which are used to map docker container paths to host paths.

 

I see jonathanm answered your question about why things appear differently in Krusader.  Again, the disconnect has to do with the way you may have mapped things on the container side (docker) vs. the host side (unRAID file system).

 

You will be better off focusing on dealing with user shares rather than disk shares and never, ever confuse the two in Krusader, MC, etc. Moving files between disk and user shares could (and often does) result in data loss.  Always work disk to disk or user to user share and do not mix the two.

 

FYI - I, and many others, have Plex set to transcode in RAM.  Yes, Plex once stated officially that they would no longer support RAM transcodes, but, I don't know if they ever really followed through on that as it works fine.

 

Here are the steps for mapping a container path to a host path for transcoding purposes and then specifying the container path in the Plex server transcoder settings.

 

/tmp is RAM on the unRAID server.  It is not part of the unRAID user shares/disk shares file system.

 

In my case I have /transcode mapped to /tmp

 

Edit Plex docker settings and do the following:

 

1 - Edit the appropriate host path variable (or add a new one) for your transcode mapping.

 

2 - Enter the desired container path name, edit the configuration and enter a host path of /tmp if you want to transcode to RAM.  This is a docker volume mapping where you are associating a container path (/transcode) with a host path (a physical location in the unRAID file system), which in this case, happens to be a location that exists only in RAM and is not part of the unRAID user/disk shares.

 

image.thumb.png.e43162c18d47999b6e3ba1ca1caf0b88.png

 

3 - Click Save button in Edit Configuration.

 

4 - Click Apply button in Docker Edit screen.

 

5. Open Plex docker WebUI

 

6. Click on Settings

 

7. Select Server Settings

 

8. Select Transcoder

 

9. Enter the name of the container path you specified in step two as the Transcoder temporary directory

 

image.thumb.png.9087f1de99353d06a92d5e92c1e0ae6b.png

 

This tells Plex to transcode videos to the /tmp directory on the host which is in RAM.  This could also be done to a directory on your cache drive by specifying the Host Path as something like /mnt/user/cache/plex/transcode in step two.  The important thing is that in Plex transcode settings you specify the name of the Container path variable as the Transcoder location.

 

10. Click Save Changes button

 

Now lets look at mapping media locations on the unRAID server to Plex Libraries.

 

The concept is the same, you map a container path that exists only within the docker config to a physical host path in the unRAID filesystem.

 

Here are my media mappings in Plex:

 

image.thumb.png.23a7f783641bc5d87c0eaf2fc6627980.png

 

In the case of movies, the docker container path is /movies which is mapped to the physical share path of /mnt/user/Movies (the Movies share in unRAID)

 

Open the Plex UI and go to the Libraries section and add a Movies Library.  When adding the folder, select the name of the docker container path you created for Movies (/movies) and click add.  This tells Plex to look for movie media in the physical host path mapped to /movies which is /mnt/user/Movies

 

Repeat for other media container/hosts paths you may have.

 

image.png.a2a1c85fd57207b3986bac16de909c26.png

 

Note that in the above screenshot of host path configuration, I also have a /config mapping which specifies where the Plex docker config files will be physically located.  In my case that is /mnt/user/appdata/Plex which is on the cache drive. 

 

The recommendation is to specify /mnt/cache/appdata/Plex instead if you want docker config files stored in appdata on cache.  I have never had the issues others have had with using the user mapping as apposed to cache so I have never bothered to change Plex and other dockers mapped this way.

 

If I browse my cache drive, I find all the Plex docker/config files being stored in the appdata/Plex folder.

 

Once you wrap your head around how docker volume mapping works, it is really quite easy to configure dockers properly

 

Edited by Hoopster
  • Like 2
  • Thanks 1
Link to comment
  • 1 year later...

@Hoopster I found this older thread and as you stated it was helpful even now in validating my Plex docker config.

 

However, I will resurrect this because I have another question. As I've been getting my Plex (pass enabled) server library loaded, I've noticed an issue. My setup is basically what was mentioned above but even simpler. I map /mnt/user/Plex to /data and then organize my content within the Plex share.  I use /tmp for /transcode.

 

The problem is that my docker.img file has now ballooned to 21.5GB and Plex is the only docker I'm running. So it is all coming from there. I don't even have that many movies shoved into /mnt/user/Plex yet.

 

I found this thread because some other thread suggested that there was "probably a mount inside the docker that should be outside" so I started hunting. I don't think that is the case but maybe I'm misunderstanding just how much appdata it creates.

 

Hints and ideas?

 

Thank you!

Link to comment
6 minutes ago, pjneder said:

The problem is that my docker.img file has now ballooned to 21.5GB and Plex is the only docker I'm running. So it is all coming from there

You definitely have something mis-configured somewhere that is causing data to be stored in docker.img that should not be stored there.

 

My docker.img file was setup for 20GB and with 16 active docker containers (Plex included), it is using only 12GB of that space.

 

I intentionally create a share for each Plex media library so I can manage and control their behavior separately at the share level.  Many do as you have done and just create a parent media share and manage library content in sub-folders.

 

Post your Plex docker run command.  Maybe the problem will be apparent there.

Link to comment
19 minutes ago, pjneder said:

I found this thread because some other thread suggested that there was "probably a mount inside the docker that should be outside" so I started hunting. I don't think that is the case but maybe I'm misunderstanding just how much appdata it creates.

The size of appdata can't make your docker image grow because it is already outside docker image assuming you did it correctly. There isn't any way for part of plex appdata to be outside and part to be inside. It is either all outside or all inside.

 

7 minutes ago, Hoopster said:

Post your Plex docker run command

As explained at the very first link in the Docker FAQ:

https://forums.unraid.net/topic/57181-docker-faq/

 

Link to comment
6 minutes ago, Hoopster said:

Post your Plex docker run command.  Maybe the problem will be apparent there.

Gosh I hate to seem an idiot because I'm not....but here goes. Where is the run command found? It just isn't obvious to me screen tired eyes at the moment.

Link to comment
2 minutes ago, pjneder said:

Gosh I hate to seem an idiot because I'm not....but here goes. Where is the run command found? It just isn't obvious to me screen tired eyes at the moment.

2 minutes ago, trurl said:

The size of appdata can't make your docker image grow because it is already outside docker image assuming you did it correctly. There isn't any way for part of plex appdata to be outside and part to be inside. It is either all outside or all inside.

 

As explained at the very first link in the Docker FAQ:

https://forums.unraid.net/topic/57181-docker-faq/

 

 

 

Link to comment
11 minutes ago, Hoopster said:

Post your Plex docker run command.  Maybe the problem will be apparent there.

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='PaulsPlexServer' --net='host' -e TZ="America/Los_Angeles" -e HOST_OS="Unraid" -e 'PLEX_CLAIM'='claim-ybLt8gdqUcLu1yTDSosP' -e 'PLEX_UID'='99' -e 'PLEX_GID'='100' -e 'VERSION'='latest' -v '/tmp':'/transcode':'rw' -v '/mnt/user/Plex':'/data':'rw' -v '/mnt/user/Plex':'/data2':'rw' -v '/mnt/user/appdata/PlexMediaServer':'/config':'rw' 'plexinc/pms-docker' 

0aa1f2a0f850bdfe280d07964ba0a95f47824b5455c102aacabb6c1bed02ea88

 

 

ignore the extra mapping to /data2. Just did that to get the run command to show up.

Link to comment
3 minutes ago, pjneder said:

Gosh I hate to seem an idiot because I'm not....but here goes. Where is the run command found? It just isn't obvious to me screen tired eyes at the moment.

Sorry, I often make the mistake of assuming things are known which are not readily apparent.  @trurl has you covered.

Link to comment
7 minutes ago, pjneder said:

ignore the extra mapping to /data2. Just did that to get the run command to show up.

I hope you have removed it. It is not necessary to actually make a change to get the docker run. From that FAQ:

On 5/26/2017 at 12:03 PM, Squid said:

you can always make any change and then change it back and hit "Apply" to get the docker run command to appear

  

 

 

  • Like 1
Link to comment

You should also post your diagnostics. Maybe there is something about how you have docker itself configured.

 

Go to Tools - Diagnostics and attach the complete diagnostics zip file to your NEXT post.

 

Also, go to the Docker page, click the Container Size button at the bottom, and post a screenshot.

Link to comment
32 minutes ago, trurl said:

Did you change something? According to diagnostics your docker image has 20G allocated, and is only using 515M.

 

What do you have in Plex for transcoder directory? Screenshot please.

Change, yes and no. I have been changing some stuff with my array, by swapping in some larger disks. I cannot remember exactly when the size ballooned up but it was sometime in the past few days. I had been busy re-muxing my media library from .iso files to .mkv files and putting them in a totally new share just for use by Plex. The re-mux occurs on my PC, not unRaid. Then I decided it was a good time to add some storage (even though I wasn't really running low, but I did have some old 1T seagates drives I wanted to pull out).

 

The no part comes in that I have not touched the Docker or settings except to pull updates as they came available.

 

I also did some experimenting with playing Plex remotely to my phone & iPad. I can suspect that this would have kicked off transcoding. I had never run Plex streams remotely before, so that would also qualify as a change.

 

Then I noticed my cache used was much larger. I ran Mover but it stayed quite big. Scratching my head I started looking around and found that docker.img had grown large. 

image.thumb.png.b43717c639ade1da074339beb7b96926.pngimage.thumb.png.809ab9b97bbebc49a3a25653c528ebea.png

 

image.thumb.png.bce45ada84f773414a7dcda7c6cf908e.png

 

I will point what is likely obvious in the diags. This instance of unRaid is running on ESXi as a VM. 12GB of RAM allocated and access to all 4 vCPUs.

 

image.thumb.png.963db06dc11291c81a69053416814d12.png

 

What I do notice in my ESXi dashboard, which is new, is that ESXi thinks VMware tools are not installed, which is new. Not sure how worried I should be about that, but I will have to do some looking. I am pretty sure I had this working in the past.

 

Thanks!

Edited by pjneder
Link to comment
20 minutes ago, trurl said:

No experience with that and whether running virtual disks within virtual disks might be an issue. And virtualizing Unraid isn't supported. There is a subforum here where other virtualizing Unraid users support each other.

 

https://forums.unraid.net/forum/46-virtualizing-unraid/

OK, fair enough. It might not be supported but essentially it works. I started this project long before unRaid became the more beautiful thing it is now with KVM, Docker and more. I host my pfSense, Ubiquity controller and more on there. However, unRaid would now allow me to do all of that so I might switch over to unRaid being the native with everything else hosting as needed.

 

I expect you know the answers to these questions:

 

If the /tmp to /transcode (i.e. RAM transcode) was not passing through as expected, AND I had engaged the transcode engine, would that explain the sudden jump in the docker.img size?

 

Follow up, if I map the /transcode area to an unassigned spinning HDD (i.e. my old 1T), would that A) work B) keep the 1T spinning all of the time?

 

Thanks!!!

Link to comment
24 minutes ago, trurl said:

No experience with that and whether running virtual disks within virtual disks might be an issue.

1 hour ago, trurl said:

your docker image has 20G allocated, and is only using 515M

What evidence do you have that says

17 hours ago, pjneder said:

docker.img file has now ballooned to 21.5GB

 

It normally doesn't "balloon" in an nonvirtual Unraid, it just runs out of space.

Link to comment
2 minutes ago, trurl said:

What evidence do you have that says

 

It normally doesn't "balloon" in an nonvirtual Unraid, it just runs out of space.

Did you see the screen shots in my previous post? The cache and FS both show the consumption. Trying to figure out how to properly answer the question.

Link to comment
1 minute ago, trurl said:

Your /tmp:/transcode mapping looks correct and your Plex trancoder directory is /transcode, so that should be working. What I don't see is any evidence of this "ballooning".

Maybe ballooning is the wrong word. I was using that to describe the fact that the FS space consumed is listed as 21.5GB w.r.t. to how the Cache FS sees the image, even though the diags say it is only consuming 515MB.

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.