Guide for installing Plex in Docker?

Currently reading
Guide for installing Plex in Docker?

114
8
NAS
DS918+
Operating system
Windows
I really want to get better with Docker, and I've tried following a few guides online for installing Plex as a Docker-container on my DS918+, but I can't get it running.
The Docker-Plex log always ends up with "critical: libusb_init failed" and I can't access any webui. I've got a normal Plex-package installed at the same time so I am not sure if that can interfere with the Docker-ports (however, I've tried changing them but can't still access any UI).
So, is there a "docker install on synology nas"-guide for dummies available perhaps?
I really want to figure this out (and understand what I'm doing, which many guides silenty ignores and just shows what to do without explaining why).
Help is appreciated!
 

Rusty

Moderator
NAS Support
2,246
672
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
I really want to get better with Docker, and I've tried following a few guides online for installing Plex as a Docker-container on my DS918+, but I can't get it running.
The Docker-Plex log always ends up with "critical: libusb_init failed" and I can't access any webui. I've got a normal Plex-package installed at the same time so I am not sure if that can interfere with the Docker-ports (however, I've tried changing them but can't still access any UI).
So, is there a "docker install on synology nas"-guide for dummies available perhaps?
I really want to figure this out (and understand what I'm doing, which many guides silenty ignores and just shows what to do without explaining why).
Help is appreciated!
What repo are you using?

Have you tried linuxserver one? Docker Hub
 
114
8
NAS
DS918+
Operating system
Windows
Yep tried linuxserver and the plexinc one.
 

Rusty

Moderator
NAS Support
2,246
672
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
Yep tried linuxserver and the plexinc one.
Can you go into a bit more detail where the problem started with linuxserver one? What method did you use ( run, compose, portainer, synology ui?)
 
990
333
NAS
DS418play, DS213j, DSM 7.0.1-14401
Here is one with images and using Synology UI from Marius
His folder mappings leave a lot to be desired, and they don't adhere to the Plex model. Storing your video content under the system shared folder Docker isn't desirable. But... it's a place to start as long as you follow along with the github site's recs.
 
True that. In reality you would more likely head for a layout where docker/plex/config is mapped into /config and docker/plex/transcode is mapped into /transcode. Usualy media files are located in other shares - just map them by category with individual volume mappings into /mnt/{category}. It will give you less trouble If you one day decide to move the category to a different volume or folder structure, as you can change the source of each volume mapping individualy. Mounting external storage into /mnt is a recommende convention. Though, feel free to ignore the convention, if you feel another folder layout inside the container does match your needs in a better way.
 
Last edited:
990
333
NAS
DS418play, DS213j, DSM 7.0.1-14401
I would also set the media mappings to read-only. I don't want Plex deleting/modifying my media.

Personally, I would include transcode within the media shared folder (or create a shared folder specifically for transcoded media), as it is where transcoded (aka "optimized") files are stored.
 

Rusty

Moderator
NAS Support
2,246
672
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
True that. In reality you would more likely head for a layout where docker/plex/config is mapped into /config and docker/plex/transcode is mapped into /transcode. Usualy media files are located in other shares - just map them by category with individual volume mappings into /mnt/{category}. It will give you less trouble If you one day decide to move the category to a different volume or folder structure, as you can change the source of each volume mapping individualy. Mounting external storage into /mnt is a recommende convention. Though, feel free to ignore the convention, if you feel another folder layout inside the container does match your needs in a better way.
Agree, just pointed out the link considering that it has the "hard" part done, step by step with images. Tweaking destinations is always something that can be done later on, but yes, I agree that the destinations are a bit off.
 
114
8
NAS
DS918+
Operating system
Windows
I should make another try with Marius guide later today. Stuff that I usually miss in guides are explanations for settings guides tells me to do. All these port-configurations, what do they do and why are they all needed (Plex uses alot of ports, do I need to bother about security-issues for example)..
 
990
333
NAS
DS418play, DS213j, DSM 7.0.1-14401
Plex uses alot of ports, do I need to bother about security-issues for example)..
Unfortunately, Marius didn't screenshot his port settings, so there is no way of knowing what was used when the article was published. Here is where the Plex page can be helpful...

Docker Hub

Maybe this is not the package for you to learn Docker. The plex.tv site has a Synology x64 package for your NAS. It is dirt simple. Unless you are trying to do this on DSM 7 Preview, I would use the native (non-Docker) package.
 

Rusty

Moderator
NAS Support
2,246
672
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
I should make another try with Marius guide later today. Stuff that I usually miss in guides are explanations for settings guides tells me to do. All these port-configurations, what do they do and why are they all needed (Plex uses alot of ports, do I need to bother about security-issues for example)..
Map the same ports numbers that you see on the right hand side and put the same ones on the left hand side, don’t leave any number on Auto.
 
114
8
NAS
DS918+
Operating system
Windows
I can't change the ports since parts of the Maurius-guide tells me to activate " Use the same network as Docker Host " and this seems to prevent port-changing?
 
Either you use "Use the same network as Docker Host" (which litteraly makes the container bind all its ports directly to the hosts network adapter) or use a bridged network and publish container ports to host ports.
 
990
333
NAS
DS418play, DS213j, DSM 7.0.1-14401
That's right... here's a better illustration... start at 2:14
 
114
8
NAS
DS918+
Operating system
Windows
Started from scratch now, got it running, but it can't see my movie-folders. I've mapped it in Docker-settings and I can see it in Plex UI when adding a new folder, but it doesn't see any files/folders below that folder so my bet it's permission-related? I've got a "docker" user and got that PGID/PUID and set those values in the env-variables, and granted the user access to my movies but that doesn't seem to help..?
 
Last edited:
I always make sure the PUID/PGID I use is the owner (!) of the folders that I map into containers.

Inside the container, nothing of the host's user<->group relation is known. If you add the user docker to the user group, your DS will know about this, but the container will not.

I am afraid the same is true for ACL related permissions. If you grant permissions using the UI, again this is something your DS is aware of, but the container is not.

Does that make sense?
 
114
8
NAS
DS918+
Operating system
Windows
I tried setting the PUID/PGID to either my local admin user or my own docker-user but it doesn't seem to make a difference.
 
when I say owner, I litteraly mean the owner of the folder.

Open up a shell via ssh and execute `stat /volume1/yourshare`. The uid and gid of the output must allign with what you set for PUID/PGID or you can mess around with the unix permissions - which I don't recommend - and do a `chmod 775 -R /volume1/yourshare` to at least allow user of "other groups" to access the folder.
 
Last edited:
114
8
NAS
DS918+
Operating system
Windows
PUID/PGID says 0 for my movie-folder with the stat-command. I tried setting this as env-variables (or deleting them) but still, can't see the contents of the folder in Plex Docker.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Similar threads

Trending threads

Top