Convert from PhAze's Plex Plugin to needo's Plex docker


Recommended Posts

Just wanted to write up what I did last night/this morning that appears to have converted Plex from a Plug-in to a Container.  I’ve been watching the Docker stuff on here, read some things, and felt pretty confused and not ready to attempt this but decided to give it a whirl anyway.  Thanks for all the hard work that others have done to made it possible for me to point and click to create my first container.

 

Note:  Before you proceed you should probably make a copy/backup of your Plex Library.  I would also go ahead and shut stop your Plex Plug-in as well.

 

[glow=red,2,300]Original Setup:[/glow]

  • unRAID version 6b10a
  • SSD App drive via SNAP formatted XFS and mounted at /mnt/disk/Apps
  • PhAzE's Plex Server Plugin

First, I don’t have screen shots of before I started Docker, but I just clicked on the Docker tab in unRaid.  I chose a location on my non-array App-drive, randomly decided on 4gb as the default image size, and added a template Repository.

 

[glow=red,2,300]Starting Docker:[/glow]

 

  • Click on Docker Tab of Unraid
  • Add  https://github.com/gfjardim/docker-containers/tree/templates  (Thanks gfjardim) in the Template repository at the bottom of the page and click save.
  • Determine the location you want to put the docker.img. I chose /mnt/disk/Apps/Docker/docker.img
  • I chose to set the default image at 4GB
  • Hit Start.

[glow=red,2,300]Creating Plex Container:[/glow]

 

Click on the Add Container Button and if you added the template repository, you can pull down the template selection and select Plex Media Server under needo.

 

 

 

KQwh3cy.png

 

 

Then

PNyhNL8.png

 

 

Here is my trial and error part.  With PhAzE’s plex plug-in my config path was /mnt/disk/apps/plex.  Under the plex container this won't work because the expected directory tree is different. Basically just one missing directory called “Application Support” needs to be inserted directly under Library and then move your "Plex Media Server" directory into that.

 

One additional Note:  Please make note of Upper/Lower Case, since this is a LINUX system

 

So you need to modify your actual directory structure so that /path/to/plex/Library/Plex Media Server/ is now: /path/to/plex/Library/Application Support/Plex Media Server/ 

 

 

As an example:

My original directory tree to Plex Media Server was as follows

/mnt/disk/Apps/plex/Library/Plex Media Server/

 

I modified it by adding a new directory and moving "Plex Media Server" into it.

/mnt/disk/Apps/plex/Library/Application Support/Plex Media Server/

 

 

Once you make that change in your directory structure you can use:

/path/to/plex for the containers config "Host Path" and all should work.

 

I made a copy of my Library directory called tempLibrary so I’m actually testing/using a path like this:  /mnt/disk/Apps/plex/tempLibrary/Library/Application Support/Plex Media Server.  I had to add the second Library directory because ‘Library’ is hard coded in the setup.  So my /config points to /mnt/disk/Apps/plex/tempLibrary.  I hope that makes sense.

 

 

[update 10/1/14@9:15pm EST]

One additional thing I had to do was change the owner of my Library from nobody:users to unraid-plex:users.  i did this by logging into unRAID, going to /mnt/disk/Apps/ and issuing the command chown -R unraid-plex:users plex.  the container seems to run as unraid-plex.  Without this change the container seg faults.

 

 

 

Don't click Apply Yet

At this point I clicked apply and after downloading/installing I was able to see my existing library but unfortunately I wasn't able to play any movies because there’s no mounted drives for the docker.  I started searching the forums and found the following thread that clued me in to my problem.

http://lime-technology.com/forum/index.php?topic=34350.msg319555#msg319555

 

 

For this to work seemless (again this was trial and error for me)  I created one container volume called /mnt and the host path is /mnt/. I did this instead of using /data in the above thread.  What this does for me is allow all my existing library paths to work because they are already defined as /mnt/user/path/to/media.  Obviously you would need to adjust this to fit your needs.

 

If you do this up front during the creation I believe everything will go nice and smooth.  I’ve not tested this as a single install since I was changing things on the fly.

 

Note: don’t forget the / in front of your container volume   I did this the first time and it made my container not show up in the webgui.

Here shows the mount setup as it is right now for me.

 

 

qmkH1nV.png

 

 

Now as long as you have your Plex Plugin stopped,  your new container should be visible at the same url:port as the old.  If the plug-in is running you’ll just see it.

 

I have not disabled the plug-in or rebooted with auto start with docker yet so I may have to update this in the future.

 

 

[update 10/8/2014 @ 11:24PM ET]

I have since rebooted my server, and had one issue...  Back when I was making my directory on my non array disk, I had created a share in SNAP called Apps.  Apps absolute path was /mnt/disk/Apps.  When initially setting this up, I created via SSH /mnt/disk/Docker.  Apparently this created a mount point / temporary directory that after a reboot was gone.  The very cool thing about docker is the fact that I only had to recreate the folder/image again (this time under Apps share) and select MY template and recreated the container.  Took only a couple minutes and I was back up and running.

Link to comment

Thank you so much for this write up! I'm waiting for at least RC to be released and then will be doing the same thing.  You saved me hours.

 

Thanks again!!

 

 

No problem.  I hope this helps someone at least!  I just added a little blurb at the bottom, I have since rebooted now and ran into a wrinkle but not one most are likely to hit. It was a silly mistake.

Link to comment

This is really good.  I think documenting the issue with the Library path will help a lot of people.  And the /mnt:/mnt suggestion.

 

Unless you are really low on space though, I'd go with an image size of 10GB.  I've used somewhere around 5GB of my 10GB image (hard to tell exactly, see http://lime-technology.com/forum/index.php?topic=35252.msg328087)

 

Also, I'd recomend adding a /transcode container volume and using it for your transcoder temp directory as described here:

  http://lime-technology.com/forum/index.php?topic=35584.msg331811#msg331811

 

Link to comment
  • 2 months later...

I have installed PMS in docker. The Plex web UI loads fine, but when I am adding library sections, I can't see any folders at a level beyond /mnt/

 

So basically I can see the folders boot, disk1, disk2, cache etc but when I click on user say in order to navigate to the underlying "Music" share, the right side just remains blank!

 

Log from docker as below

 

Command:
root@localhost:# /usr/bin/docker logs --tail=350 PlexMediaServer
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
6 3000 /config/Library/Application Support
unlimited
Error: Unable to set up server: bind: Address already in use
*** Shutting down runit daemon (PID 103)...
*** Killing all processes...
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/firstrun.sh...
chown: invalid user: 'messagebus:messagebus'
/etc/my_init.d/firstrun.sh: line 5: dbus-uuidgen: command not found
/etc/my_init.d/firstrun.sh: line 6: dbus-daemon: command not found
/etc/my_init.d/firstrun.sh: line 9: avahi-daemon: command not found
Version not specified.
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 18
6 3000 /config/Library/Application Support

Link to comment

I have installed PMS in docker. The Plex web UI loads fine, but when I am adding library sections, I can't see any folders at a level beyond /mnt/

 

So basically I can see the folders boot, disk1, disk2, cache etc but when I click on user say in order to navigate to the underlying "Music" share, the right side just remains blank!

What do you have for Volume Mappings?
Link to comment

thanks for the guide. I tried this with my current setup and for some reason I can't change anything. I get my movies to show but nothing really "works." For example, if i edit my movies library, I can't select the language, its just blank. Anyone think this could be due to my Plex Plugin not on the right version compared to the docker release? Been trying to get this to work but am failing miserably haha.

 

My Phaze version is 1.5.4 and Plex is 0.9.11.6.800-831ffad (PlexPass)

Link to comment

its not, which is why i assumed that wasn't the case, I just have no answers as to why it wont work at all.

 

Basically what happens is this:

 

Install (over the plugin) - > Appears working fine, however my agents are just missing. And outside of that, a few other things are gone too, which makes it so i cant scrape or do anything like that, so its obviously crashed out

 

My template:

/config - /mnt/cache/apps/Plex/

/transcode - /mnt/cache/apps/Plex/tmp/

/mnt - /mnt/

 

I also have moved all my media to the extra folder like the guide says. I have also tried giving nobody and also unraid-plex access to no avail.

 

When i try doing a separate clean install, I have gotten it to work longer but I run into it stopping from working once it reboots. Then it just wont start.

 

So for docker, I am 2 for 4:

CP and SAB work fine

SickRage and Plex dont.

Link to comment
  • 3 weeks later...

I wanted to make a note to everyone and might want to put a sticky about this, but this failed for me every time and then i noticed something EXTREMELY weird.

 

my folder path was (from phaze):

\mnt\cache\apps\Plex\library\Plex Media Server

 

I changed it to:

\mnt\cache\apps\Plex\Library\Application Support\Plex Media Server

 

In docker it would show my stuff but nothing really worked properly... I checked the folder and I had (some how, still unsure how) had a folder called library and Library. So the docker app was using Library and it was messing up (despite the files being in both locations. So I stopped Plex, deleted the Library folder and renamed the library folder to Library. this fixed it for me completely. If you don't do the last step when you restart Plex it will just recreate a new folder called Library.

 

I suppose it might also be fine if you rename it to Library before you create it as well! I don't know if this is everyone else's issues, but this fixed it 100% for me.

 

Also, I forgot to mention, I did the following as well as a safety measure because initially I was also having permission issues:

 

cd /mnt/cache/apps/
chown -R 999:users Plex
chmod -R 777 Plex

Link to comment

I wanted to make a note to everyone and might want to put a sticky about this, but this failed for me every time and then i noticed something EXTREMELY weird.

 

my folder path was (from phaze):

\mnt\cache\apps\Plex\library\Plex Media Server

 

I changed it to:

\mnt\cache\apps\Plex\library\Application Support\Plex Media Server

lse's issues, but this fixed it 100% for me.

 

 

I do have that in the original post, the "Application Support" is highlighted in red.  Glad you got it working.

Link to comment

I do have that in the original post, the "Application Support" is highlighted in red.  Glad you got it working.

 

Sorry, I modified my post, it wasn't the Application Support part, it was the capital L in library.

 

 

 

Here is my trial and error part.  With PhAzE’s plex plug-in my config path was /mnt/disk/apps/plex.  Under the plex container this won't work because the expected directory tree is different. Basically just one missing directory called “Application Support” needs to be inserted directly under Library and then move your "Plex Media Server" directory into that.

 

 

One additional Note:  Please make not of Upper/Lower Case, since this is a LINUX system

 

 

So you need to modify your actual directory structure so that /path/to/plex/Library/Plex Media Server/ is now: /path/to/plex/Library/Application Support/Plex Media Server/

 

 

I modified the first post to include the highlighted line.

Link to comment
  • 1 month later...

Hi,

 

I have an issue where my Agents tab in Plex (Server Server Settings>Agents) is empty, no agents to select.

 

In an effort to resolve this I went into the docker page in unraid and clicked the "updated" link and forced Plex to update.

 

Now I have an issue where when i try and load the plex WebUI i get "This webpage is not available" Magically the WebUI is back.

 

Is there normally some kind of latency associated with changing Docker settings and them translating to actual interactions? It took over 10 minutes for the WebUI to come back, that's after two Docker restarts.

 

The initial issue of no Agents still stands.

Link to comment

You need to add volumes to the Docker in the GUI

 

For example I added:

 

Container Volume:                    Host Path:

/tunes                                      /mnt/user/Music (or whatever the path to your media shares are)

/tv                                            /mnt/user/Series

/flicks                                      /mnt/user/Movies

 

Then in Plex you use the /tunes mount to access the shared folder Music, /tv to access the shared Series share, etc, etc.  You're basically setting up a shortcut that allows your Docker to access a path on the host machine that it otherwise can't see or access.

Link to comment

 

In an effort to resolve this I went into the docker page in unraid and clicked the "updated" link and forced Plex to update.

 

Now I have an issue where when i try and load the plex WebUI i get "This webpage is not available" Magically the WebUI is back.

 

 

The Plex updater takes AGES - what you saw is normal.  I think it took a good 10 minutes to run the update and do whatever it was doing with the library.

Link to comment

Hi,

 

I have an issue where my Agents tab in Plex (Server Server Settings>Agents) is empty, no agents to select.

 

In an effort to resolve this I went into the docker page in unraid and clicked the "updated" link and forced Plex to update.

 

Now I have an issue where when i try and load the plex WebUI i get "This webpage is not available" Magically the WebUI is back.

 

Is there normally some kind of latency associated with changing Docker settings and them translating to actual interactions? It took over 10 minutes for the WebUI to come back, that's after two Docker restarts.

 

The initial issue of no Agents still stands.

 

make sure all your capital letters are in place (see my post above). This was the exact issue I had and it was because switching from Phaze the word Library was different.

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.