Going from Synology Plex App -> Docker image

Server Version#: 4.75.0
Player Version#:N/A

Since setting up my Synology and installing and running the Plex Server, I’ve been wondering if I should switch to running the Plex server as a Docker container. Well, recently I tried and have failed. When I stop Synology’s Plex Server app and start the Docker container I configured I see only that I’m unable to connect to any of my media libraries on PMSrunning in a Docker image. I’m not sure what I’m doing wrong.

Also, I don’t understand all the ports in the attached Docker configuration. Seems excessive to me.

I’m also confused about the volume mapping. On my Synology, I have /volume1/Media where I have Music, Pictures, and Videos as subfolders. I also have a @eaDir folder which is some sort of Synology thing. How am I supposed to map these via a Docker Volume so that the Plex Media Server in the Docker container will consume this properly? I have /volume1/Media mapped to /data/Media in the PMS Docker container but it doesn’t seem happy. Every library comes up as “unable to connect to ‘myserver’ securely”. AFAICT I have security set to preferred.

How do debug? What logs are there to pursue? How to move forward?

Thanks in advance.

you didn’t attach a docker config. You should go the faq thread and use that config with those instructions. Should be simple. although i did have a few issues… but eventually sorted it out.

Sorry, didn’t see a way to attach a file. Guess I’ll just include it below.

A question or two:

  • What’s with all the ports? To my knowledge, I don’t use 1900, 3005, 32410, 32412, 32413, 32414, 32469, 5353, 8324. Should I just remove them?
  • Does this Docker container update itself? I thought I saw that somewhere.
type or past{
   "CapAdd" : null,
   "CapDrop" : null,
   "cmd" : "",
   "cpu_priority" : 50,
   "enable_publish_all_ports" : false,
   "enable_restart_policy" : true,
   "enabled" : false,
   "entrypoint_default" : "/init",
   "env_variables" : [
      {
         "key" : "PATH",
         "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      },
      {
         "key" : "HOME",
         "value" : "/root"
      },
      {
         "key" : "LANGUAGE",
         "value" : "en_US.UTF-8"
      },
      {
         "key" : "LANG",
         "value" : "en_US.UTF-8"
      },
      {
         "key" : "TERM",
         "value" : "xterm"
      },
      {
         "key" : "NVIDIA_DRIVER_CAPABILITIES",
         "value" : "compute,video,utility"
      },
      {
         "key" : "DEBIAN_FRONTEND",
         "value" : "noninteractive"
      },
      {
         "key" : "PLEX_DOWNLOAD",
         "value" : "https://downloads.plex.tv/plex-media-server-new"
      },
      {
         "key" : "PLEX_ARCH",
         "value" : "amd64"
      },
      {
         "key" : "PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR",
         "value" : "/config/Library/Application Support"
      },
      {
         "key" : "PLEX_MEDIA_SERVER_HOME",
         "value" : "/usr/lib/plexmediaserver"
      },
      {
         "key" : "PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS",
         "value" : "6"
      },
      {
         "key" : "PLEX_MEDIA_SERVER_USER",
         "value" : "abc"
      },
      {
         "key" : "PLEX_MEDIA_SERVER_INFO_VENDOR",
         "value" : "Docker"
      },
      {
         "key" : "PLEX_MEDIA_SERVER_INFO_DEVICE",
         "value" : "Docker Container (LinuxServer.io)"
      },
      {
         "key" : "VERSION",
         "value" : "latest"
      },
      {
         "key" : "TZ",
         "value" : "America/Los_Angeles"
      },
      {
         "key" : "PGID",
         "value" : "1000"
      },
      {
         "key" : "PUID",
         "value" : "1000"
      }
   ],
   "exporting" : false,
   "id" : "2990458a9439409b",
   "image" : "linuxserver/plex:latest",
   "is_ddsm" : false,
   "is_package" : false,
   "links" : [],
   "memory_limit" : 0,
   "name" : "plex",
   "network" : [
      {
         "driver" : "bridge",
         "name" : "bridge"
      }
   ],
   "network_mode" : "bridge",
   "port_bindings" : [
      {
         "container_port" : 1900,
         "host_port" : 0,
         "type" : "udp"
      },
      {
         "container_port" : 3005,
         "host_port" : 0,
         "type" : "tcp"
      },
      {
         "container_port" : 32400,
         "host_port" : 0,
         "type" : "tcp"
      },
      {
         "container_port" : 32410,
         "host_port" : 0,
         "type" : "udp"
      },
      {
         "container_port" : 32412,
         "host_port" : 0,
         "type" : "udp"
      },
      {
         "container_port" : 32413,
         "host_port" : 0,
         "type" : "udp"
      },
      {
         "container_port" : 32414,
         "host_port" : 0,
         "type" : "udp"
      },
      {
         "container_port" : 32469,
         "host_port" : 0,
         "type" : "tcp"
      },
      {
         "container_port" : 5353,
         "host_port" : 0,
         "type" : "udp"
      },
      {
         "container_port" : 8324,
         "host_port" : 0,
         "type" : "tcp"
      }
   ],
   "privileged" : false,
   "shortcut" : {
      "enable_shortcut" : false,
      "enable_status_page" : false,
      "enable_web_page" : false,
      "web_page_url" : ""
   },
   "use_host_network" : false,
   "volume_bindings" : [
      {
         "host_volume_file" : "/Media",
         "mount_point" : "/data/Media",
         "type" : "rw"
      },
      {
         "host_volume_file" : "/System/Config/plex",
         "mount_point" : "/config",
         "type" : "rw"
      }
   ]
}
e code here

if you are just using the docker package in the synology there is no auto updating. you can set up watch tower or others for that if you want. See this link and use that for the easiest approach.

Thanks but what about my problem of the Docker image not working correctly? And what about unused ports?

Or is you pointing me to Chuck’s Synology FAQ #28 you saying to me “Set it up this way. Read Chuck’s FAQ!”. If so I have questions. Perhaps Chuck will chime in. He’s a good guy and has helped me out in the past. Hi Chuck!

Getting HW transcoding would probably be a plus. My understanding is the only way you can really get that is to use a Docker image. That was not my initial reason for wanting to switch to Docker but it’d be a plus for sure. I believe my Synology NAS (1019+) has HW transcoding. Not sure if the Synology Plex App uses that or if I have to go to Docker.

My first question would be: If all I need is the UID/GID of the “plex” user, couldn’t I as easily get that from /etc/passwd? I know Synology and Chuck don’t like when you use regular Linux stuff on Synology but I’m not sure that setting up a scheduled task would yield different results.

Secondly, I’m not sure what Tone Mapping is but heck, give me that too!

My PlexMediaServer share is under /volume1 so that’s cool. I’m not using any /volume2.

Third, using a scheduled task to create a Docker container seems odd. Why wouldn’t you use the Docker CLI that Synology already offers (that is unless there’s an option you can do here that you can not do with Synology’s Docker CLI like perhaps --device? Still could you not simply do the docker run after sshing into the Synology and perhaps doing sudo?) Also, I see no port statements at all in that docker run…

Forth, I’m trying to use linuxserver/plex not plexinc/pms-docker. If you think that plexinc/pms-docker is much better I’ll switch.

A few errors I’ve seen in that fact that seem to be simple missteps that I point out here:

  • The docker run command says --network=host, but in Synology’s Docker GUI there is no “host” network that I can see
  • Simple typo - “Envirohttps://forums.plex.tv/t/important-information-about-plex-for-smart-tvs-after-september-30-2021/746506nment variable: PLEX_GID and/or PGID = value we obtained above” seems like a URL got injected into that text in the FAQ.
  • Instructions seem adamant about setting network to host and not bridged nor NAT, yet the screenshot in C shows the Network set to bridge?!? My Synology Docker GUI shows only bridge for Network unless I hit the Add button when it offers me docker_default, nextcloud_defult, or proxynet. There is no host to be found.
  • Didn’t see any volume mapping of my Media in either of those Docker configurations.

There were a lot of questions there that maybe someone will address later or maybe I will some other day but the short is, the faq is meant to set up a easy replacement of the Plex package used in Synology. So you can run the docker and turn it off and then run the package and everything will work the same. The script is specific to make sure it acts the same as the package center Plex. So it’s on the host network and has all the same settings as the package center Plex. So I believe it looks at the same config file (and other stuff) to run. Which is why if you just set it up using the docker app it won’t be the same. It’ll be a fresh install of a Plex server and won’t use your already created Plex server from the package center, including it’s settings. I know you asked many more questions but that’s all I got in me responding from my phone.

Edit: just remembered your script question. You input it in the scheduled task area but don’t make it active. It only needs to run to set up the container, not as a scheduled task. If you want to update the container you can just delete it in docker then go and run the script again.

That’s what I thought and I’m excited by the prospect. But I’m also worried about if I slip up with a little bit of a docker config I might corrupt what the Plex package sees so I want to ensure that it’s correct first. In particular, I want to make sure I get PUID and PGUID correct otherwise that will probably corrupt things. Since the part about getting the id seemed odd to me I was hesitant to move forward with this.

Well, I’ll be! Turns out that the user PlexMediaServer != plex! and my PlexMediaServer IDs are similar to that Chuck mentions in the FAQ. I should have just done the scheduled task and checked last time. Interesting. OK so that’s addressed.

The only other two real issues are creating a docker container using the Task Manager… If that’s required the I would think I would need to be doing this over and over again as the Plex Docker images updates.

That and can I use linuxserver/plex instead of plexinc/pms-docker.

I’m sure Chuck will eventually chime in. He’s probably busy though.

Thanks for your help!

You can leave the task in the schedule and just don’t have it active so all you have to do is right click and run it (after you delete the docker image and container in docker). But yes updating is manual but updating in docker package is also manual. If you want chuck to chime in you should @ him. But the directions are pretty clear and simple. Only problem I ran into was that I needed to delete spaces out of the script he provided and I changed the time zone to New York. Obviously as it states in the faq don’t run that package center Plex and the docker at the same time. But it’s super easy and should lead to corruption if you follow the directions.

Right, @ChuckPa

I’d still like to know if using linuxserver/plex as a Docker image would work. I think so. Most of my docker images are from linuxserver.

The difference between creating a Docker image using the Task Scheduler and say creating the Docker image at the command line is that the former requires a human to go in and right-click where as the latter allows one to script and thus automate the process.

I would think that technically you could put:

docker container stop plex
docker container rm plex
docker image rm plex
docker pull linuxserver/plex
docker run...

in the scheduled task. I’m just more of a “do it at the cmd line” kinda guy I guess. I guess I could put all that in a script outside of the Task Scheduler hence my curiosity as to if I have to execute this through the Task Scheduler.

I’m a command-line guy too… :smiling_imp:

So much that I have a little script for it on my Linux box. (easily adaptable)

[chuck@lizum docker.2003]$ cat dockerplex
sudo docker stop plex
sudo docker rm plex

# Remove old image if exists
Image="$(sudo docker images | grep -i plex | awk '{print $3}')"

if [ "$Image" != "" ]; then

  sudo docker stop plex
  sudo docker stop plex
  sudo docker rm plex
  sudo docker rmi -f $Image
fi


sudo docker run \
-d \
--name plex \
--network=host \
-e PLEX_CLAIM="claim-2rZSB3JW2t56cJngN9kt" \
-e TZ="EST" \
-e LANG="en_US.UTF-8" \
-e PLEX_UID=1000 \
-e PLEX_GID=1000 \
-e PUID=1000 \
-e PGID=1000 \
-h dockerplex \
-v /sata/dockerplex:/config \
-v /sata/dockerplex/tmp:/tmp \
-v /sata/dockerplex/transcode:/transcode \
-v /vie:/data \
--device=/dev/dri:/dev/dri \
plexinc/pms-docker:plexpass

docker start plex
docker update --restart=unless-stopped plex

On Synology, you can make this a Scheduled Task which runs natively as root with no schedule (run on demand).

After adjusting the UID/GID to match that of PlexMediaServer and changing where /config is (as I show in the how-to), you’ll be all set.

PS: I don’t see why Linuxserver won’t work. I think that’s where the “good PMS image” is :wink:

Did you see this ?

Thanks, @ChuckPa but that didn’t work.

Looking over that new link which appears to be more DSM 7 oriented (which is good cause I’m on DSM 7), I still have a few questions/concerns. Specifically,

  1. I don’t have a “host” network. The only option under Network Name is bridge. Do I need to set this to host? And if so how do I do it?
  2. Ports! Your instructions did nothing with ports but there are a bunch in the downloaded Docker image already set including the crucial 32400. Should I remove all those other ones I mentioned above or just don’t worry about it? (BTW, there’s an oddity in that if I go to the ports page and click apply, even without changing anything, it highlights the first port under Local Port which used to say “Auto”, blanks that out and says this field is required! If I set it to the corresponding number it seems to like that line but then complains about the next line. I ended up setting all of the Local Ports to their corresponding Container Ports).
  3. I added PUID, PGID (set to the same as PLEX_UID, PLEX_GID) as well as a TZ variable. All my other containers have them.
  4. The instructions on that link do not show any volume mapping of the actual media yet your docker run script says -v /vie:/data. Is that mounting your actual media? For me, that would be a volume mount of /volume1/Media → /data right?

Here are my settings in plex.syno.json:

{
   "CapAdd" : null,
   "CapDrop" : null,
   "cmd" : "",
   "cpu_priority" : 50,
   "enable_publish_all_ports" : false,
   "enable_restart_policy" : false,
   "enabled" : false,
   "entrypoint_default" : "/init",
   "env_variables" : [
      {
         "key" : "PLEX_UID",
         "value" : "297536"
      },
      {
         "key" : "PLEX_GID",
         "value" : "297536"
      },
      {
         "key" : "PUID",
         "value" : "297536"
      },
      {
         "key" : "PGID",
         "value" : "297536"
      },
      {
         "key" : "TZ",
         "value" : "America/Los_Angeles"
      },
      {
         "key" : "PATH",
         "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      },
      {
         "key" : "TERM",
         "value" : "xterm"
      },
      {
         "key" : "LANG",
         "value" : "C.UTF-8"
      },
      {
         "key" : "LC_ALL",
         "value" : "C.UTF-8"
      },
      {
         "key" : "CHANGE_CONFIG_DIR_OWNERSHIP",
         "value" : "true"
      },
      {
         "key" : "HOME",
         "value" : "/config"
      }
   ],
   "exporting" : false,
   "id" : "812dd8eb10379e1def3eb52e28dc251a3285b4a306b35897f7b901739e037030",
   "image" : "plexinc/pms-docker:latest",
   "is_ddsm" : false,
   "is_package" : false,
   "links" : [],
   "memory_limit" : 0,
   "name" : "plex",
   "network" : [
      {
         "driver" : "bridge",
         "name" : "bridge"
      }
   ],
   "network_mode" : "bridge",
   "port_bindings" : [
      {
         "container_port" : 1900,
         "host_port" : 1900,
         "type" : "udp"
      },
      {
         "container_port" : 32400,
         "host_port" : 32400,
         "type" : "tcp"
      },
      {
         "container_port" : 32410,
         "host_port" : 32410,
         "type" : "udp"
      },
      {
         "container_port" : 32412,
         "host_port" : 32412,
         "type" : "udp"
      },
      {
         "container_port" : 32413,
         "host_port" : 32413,
         "type" : "udp"
      },
      {
         "container_port" : 32414,
         "host_port" : 32414,
         "type" : "udp"
      },
      {
         "container_port" : 32469,
         "host_port" : 32469,
         "type" : "tcp"
      },
      {
         "container_port" : 8324,
         "host_port" : 8324,
         "type" : "tcp"
      }
   ],
   "privileged" : false,
   "shortcut" : {
      "enable_shortcut" : false,
      "enable_status_page" : false,
      "enable_web_page" : false,
      "web_page_url" : ""
   },
   "use_host_network" : false,
   "volume_bindings" : [
      {
         "host_volume_file" : "/Media",
         "mount_point" : "/data",
         "type" : "rw"
      },
      {
         "host_volume_file" : "/PlexMediaServer/AppData/tmp",
         "mount_point" : "/transcode",
         "type" : "rw"
      },
      {
         "host_volume_file" : "/PlexMediaServer/AppData",
         "mount_point" : "/config/Library/Application Support",
         "type" : "rw"
      },
      {
         "host_volume_file" : "/System/Config/plex",
         "mount_point" : "/config",
         "type" : "rw"
      }
   ]
}

Start docker container and it basically just says my Plex Server is not available.

:frowning_face:

May i see your docker run command ? Syno JSON has errors:
You also set ‘bridge’ (which is NAT) rather than ‘host’ network. The server is on a different subnet as a result of this and won’t be found.

This should be FALSE. We overlay and match UID/GID.

         "key" : "CHANGE_CONFIG_DIR_OWNERSHIP",
         "value" : "true"

If you copy the docker run example I provided in the How-To, adjusting only those few values you need, it works.

Values which might need changing:

  1. Where PMS is installed? /volume1 ? /volume2 /volumeX ?
  2. ADD additional /volume3 /volume4 etc as needed.
sudo docker run \
-d \
--name plex \
--network=host \
-e TZ="EST" \
-e LANG="en_US.UTF-8" \
-e PLEX_UID=297536 \
-e PLEX_GID=297536 \
-h dockerplex \
-v /volume1/PlexMediaServer/AppData:"/config/Library/Application Support" \
-v /volume1/PlexMediaServer/AppData/tmp:/tmp \
-v /volume1/PlexMediaServer/AppData/tmp:/transcode \
-v /volume1:/volume1 \
-v /volume2:/volume2 \
--device=/dev/dri:/dev/dri \
plexinc/pms-docker:plexpass

Didn’t have a docker run. According to your link entitled DSM 7 + Packaging 2.0 + Docker – The How-To showed screenshots of using the Docker GUI on Synology. I was trying to do it that way. And as I stated in that GUI I could not set network to host. My thoughts were to get it running from the Synology Docker GUI and then go to using a docker run statement so I could add on the addition --device=/dev/dri:/dev/dri to get hardware transcoding (BTW is there any way to see the improvement with hardware transcoding? My system’s not that loaded yet but I figured it’d be good to have hardware transcoding working).

OK going with your docker run - I changed TZ, changed -h, removed -v for volume2 since I don’t use that, added a -v for /volume1/Media:/data. While the server comes up, and library metadata displays well, any attempts to actually play anything result in “Playback Error: Please check that the file exists and the necessary drive is mounted”. I was hoping that the volume mount for /data would do the trick. But it didn’t help.

Also, when doing this docker run initially it complained that I didn’t have that version and downloaded it. I used pms-docker:latest whereas you use pms-docker:plexpass. What’s the difference? Should I use plexpass or latest?

I know I’m close.

Here’s my docker run

#!/bin/bash
sudo docker run \
-d \
--name plex \
--network=host \
-e TZ="America/Los_Angeles" \
-e LANG="en_US.UTF-8" \
-e PLEX_UID=297536 \
-e PLEX_GID=297536 \
-h Jupiter \
-v /volume1/PlexMediaServer/AppData:"/config/Library/Application Support" \
-v /volume1/PlexMediaServer/AppData/tmp:/tmp \
-v /volume1/PlexMediaServer/AppData/tmp:/transcode \
-v /volume1:/volume1 \
-v /volume1/Media:/data \
--device=/dev/dri:/dev/dri \
plexinc/pms-docker:plexpass
here

I see where the confusion occurred. I apologize for not being clear.

On those hosts where you don’t have hardware transcoding or don’t want to overlay an existing installation, You can use the GUI.

The GUI doesn’t allow adding any hardware paths (–device).
Command line mode doesn’t allow us to edit it.

These two are what force us to declare the hardware when the container is created.

ssh/putty into the syno.

  1. Get the ID of PlexMediaServer
id PlexMediaServer
  1. Confirm those values match your values (yours might be different)

  2. sudo bash

  3. docker exec -it plex /bin/bash
    – we’re now inside the running container at the command line

  4. Make certain we can see all the directories

ls -la /volume1
ls -la "/config/Library/Application Support/Plex Media Server"
  1. The above files in /config... should show as owned by PlexMediaServer.

  2. You should see your Preferences.xml

  3. if you type: cat "/config/Library/Application Support/Plex Media Server/Preferences.xml"

  4. You will be able to see your personal ID info in the preferences file as well as some of your other server preference settings.

  5. When done looking around , exit will get you out of where you are.

IF you don’t see your server data

  1. Control Panel - Shared Folder - Check where ‘PlexMediaServer’ is created.
  2. I suspect we’ve found an error in my instructions.

According to https://www.bhphotovideo.com/c/product/1458403-REG/synology_5_bay_nas_diskstation.html it says my DS1019+ does indeed support hardware transcoding.

Jupiter:id PlexMediaServer
uid=297536(PlexMediaServer) gid=297536(PlexMediaServer) groups=297536(PlexMediaServer),937(videodriver)
Jupiter:

Same as yours.

root@dockerplex:/# ls -la /volume1
total 482904
drwxr-xr-x 1 root   root        1132 Feb  5 23:05  .
drwxr-xr-x 1 root   root         422 Feb 19 18:09  ..
-rw------- 1 root   root    29327652 Aug  3  2021  @.NET.core.gz
drwx------ 1 root   root          72 Nov  3 06:41  @GuestImage
-rw------- 1 root   root    27192654 Jul 25  2021  @Kestrel.core.gz
-rw------- 1 root   root     3013006 Aug 25 01:14 '@Plex Media Scan.core.gz'
-rw------- 1 root   root   258597085 Oct 13 00:57 '@Plex Media Serv.core.gz'
...
root@dockerplex:/# ls -la "/config/Library/Application Support/Plex Media Server" 
total 4
d--------- 1 1000 1000  180 Feb 19 19:09  .
d--------- 1 1000 1000  678 Feb 19 18:22  ..
drwx------ 1 plex plex  408 Feb 19 18:23  Cache
d--------- 1 1000 1000  212 Jan 31 07:55  Codecs
drwx------ 1 plex plex 2016 Feb 19 18:06 'Crash Reports'
drwx------ 1 plex plex    0 Jul 23  2020  Diagnostics
drwx------ 1 plex plex 3182 Feb 19 19:09  Logs
drwx------ 1 plex plex   18 Jul 23  2020  Media
d--------- 1 1000 1000   54 Jul 23  2020  Metadata
d--------- 1 1000 1000  100 Jul 22  2020 'Plug-in Support'
drwx------ 1 plex plex   30 Jul 22  2020  Plug-ins
-rwx------ 1 plex plex 1875 Feb 19 18:22  Preferences.xml
root@dockerplex:/# 

Is the fact that I have things like Codes, Metadata and “Plug-in Support” owned by user 1000.1000 a problem? Should I

sudo chmod -R PlexeMediaServer "/config/Library/Application Support/Plex Media Server"

The error may also be on my side where, when creating the docker container in the Synology Docker GUI, I was struggling with the port stuff and by accident clicked apply before saving the changes for PLEX_UID and PLEX_GID. Seems Synology had this helpful toggle of “Run container after applying changes” and when I noticed that I said “Ugh!” since the container started with no UID/GID set it used mine (1000.1000) and changed the perms on the database. I killed the container quickly but not before this damage. Then I figured out that my database files were owned by 1000.1000 and changed that to PlexMediaServer.PlexMediaServer and my server came back up under the Synology package. Looks like there may be further permissions errors, hence should I just do that chown?

How did those UID/GID’s get all messed up?
The ACLs are broken.

Did you hand copy from somewhere?

On Synology, DSM 6 usually uses 1026:100 or 1027:100 for Plex.
On desktop Linux, I would expect values more like what you show.

While you’re still in there,

cd /volume1/PlexMediaServer/AppData
ls -la
Jupiter:docker exec -it plex bash
root@dockerplex:/# cd /volume1/PlexMediaServer/AppData/
root@dockerplex:/volume1/PlexMediaServer/AppData# ls -la
total 0
d--------- 1 1000 1000   640 Feb 19 19:22  .
d--------- 1 root root   626 Sep  9 11:52  ..
-rwx------ 1 plex plex     0 Feb  8 10:39 'Bitte legen Sie hier keine Mediendateien ab.'
-rwx------ 1 plex plex     0 Feb  8 10:39 'Please do not place any media files here.'
d--------- 1 1000 1000   218 Feb 19 19:23 'Plex Media Server'
-rwx------ 1 plex plex     0 Feb  8 10:39 'Por favor, no coloque ningún archivo multimedia aquí.'
-rwx------ 1 plex plex     0 Feb  8 10:39 'Veuillez ne placer aucun fichier multimédia ici.'
drwx------ 1 plex plex 16316 Feb 19 19:24  tmp
-rwx------ 1 plex plex     0 Feb  8 10:39  ここにメディアファイルを置かないでください。
-rwx------ 1 plex plex     0 Feb  8 10:39  请不要在此处放置任何媒体文件。
root@dockerplex:/volume1/PlexMediaServer/AppData# 

When I was having problems creating the docker container using the Synology GUI I accidentally said apply config changes and then noticed there was a toggle that said something like “run container when you apply these changes”. I had not gone back to add the PLEX_UID and PLEX_GID env vars and when the docker container went off running. I went to stop the container as soon as I could and I didn’t think it’d be changing ownerships of things but apparently, it did.

After stopping that container and trying to start the PMS package from Synology again I was not able to get it to come back up. Thinking I was hosed I went looking for how to recover my apparently corrupted database. That’s when I noticed some of my database had 1000.1000 as owner.group, chown them back to PlexMediaServer and my server came back up. But perhaps there is more damage of owner.group getting set to 1000.1000, hence should I just chown it back to PlexMediaServer.PlexMediaServer recursively?

Thanks, that explains it.

We can undo the damage.

  1. Exit the container
  2. Make certain Plex (docker or native) are stopped
  3. reset all the ownership, ignoring ACLs ( be extra careful here… no mistakes )
sudo bash
cd /volume1/PlexMediaServer
chown -R  PlexMediaServer:PlexMediaServer  /volume1/PlexMediaServer
ls -la /volume1/PlexMediaServer/AppData
  1. The above command might take some time to run. Depends on how much metadata you already have in there.

  2. When completed, please confirm normal Plex works.

Oh I got data there!

Haven’t have any problems with the normal Synology based Plex server.

Jupiter:cd /volume1/PlexMediaServer/
Jupiter:sudo chown -R PlexMediaServer.PlexMediaServer /volume1/PlexMediaServer/
Jupiter:ls -la /volume1/PlexMediaServer/AppData/
total 0
drwxrwxrwx+ 1 PlexMediaServer PlexMediaServer   640 Feb 19 19:39  ./
drwxrwxrwx+ 1 PlexMediaServer PlexMediaServer   626 Sep  9 11:52  ../
-rwxrwxrwx+ 1 PlexMediaServer PlexMediaServer     0 Feb  8 10:39 'Bitte legen Sie hier keine Mediendateien ab.'*
-rwxrwxrwx+ 1 PlexMediaServer PlexMediaServer     0 Feb  8 10:39 'Please do not place any media files here.'*
drwxrwxrwx+ 1 PlexMediaServer PlexMediaServer   180 Feb 19 19:25 'Plex Media Server'/
-rwxrwxrwx+ 1 PlexMediaServer PlexMediaServer     0 Feb  8 10:39 'Por favor, no coloque ningún archivo multimedia aquí.'*
drwxrwxrwx+ 1 PlexMediaServer PlexMediaServer 16236 Feb 19 19:39  tmp/
-rwxrwxrwx+ 1 PlexMediaServer PlexMediaServer     0 Feb  8 10:39 'Veuillez ne placer aucun fichier multimédia ici.'*
-rwxrwxrwx+ 1 PlexMediaServer PlexMediaServer     0 Feb  8 10:39  ここにメディアファイルを置かないでください。*
-rwxrwxrwx+ 1 PlexMediaServer PlexMediaServer     0 Feb  8 10:39  请不要在此处放置任何媒体文件。*
Jupiter:

Started Synology Plex Media Server. It works.

Stoped PMS. Started Docker image. Still get Playback Error under Docker but not under Synology PMS app.

Glad it works. We fixed that part. your core server data is again intact and viable.

It’s also nice to see the ACLs were restored by DSM as the ownership changed back to what it should be.

what error please? can you grab the debug logs ?