PMS-Docker Incorrect Value for Mount Path

I installed Plex in a Docker container on Synology 920+ (DSM7) to enable hardware transcoding. After the docker run command completed, everything seemed to work fine. When I played a video on my iPad, and looked at Dashboard-Activity, it shows (hw) next to transcode. But, when I stopped the container to Edit it to Enable Auto-Restart, it refused to save.

The problem is that on the Volume Settings Tab, the Mount Path for /config/Library/Application Support is in red and has the error "Incorrect Value. Screenshot below. I noticed it will accept /config/Library/Application but as soon as I hit the space bar, the error appears.

Is there a fix?

@cgengaro

Which instructions did you use ?

May I see your docker run configuration ?

I used your instructions except I added the PLEX_Claim line and changed the following 3 lines to match the instructions here: https://www.youtube.com/watch?v=Yzm_Cmhs6t8

-v /var/packages/PlexMediaServer/shares/PlexMediaServer/AppData:“/config/Library/Application Support”
-v /var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/tmp:/tmp
-v /var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/tmp:/transcode \

My complete Docker-Run Command is below:

sudo docker run
-d
–name plex
–network=host
-e PLEX_CLAIM=“claim-XXXXXXXXXXXXXX”
-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
–device=/dev/dri:/dev/dri
plexinc/pms-docker:plexpass

The reason I changed the three lines is because when I used yours exactly, everything showed up as unavailable. I had a topic about that, but never resolved the issue, so I tried deleting everything and changing the three lines instead.

One other issue I am having. I am on a Macbook and using Terminal. I ssh into NAS with an Admin account. I get an error that it cannot changed to user’s homes folder, because I do not have that enabled.

Then, when I paste the docker run command (which I create in TextEdit), it does not only work. I often get the lines with > in front, and when I hit enter, all I get is >. Nothing happens. I am not sure whether that is related, or what I am doing wrong when I run the command.

Thanks again for your help.

Did you try to setup this docker container without the native PMS installed ?

/var/packages/PlexMediaServer/shares/PlexMediaServer/AppData exists only for the duration the native package is installed.

I believe I stated that as a requirement ?

Did you also get the ID for PlexMediaServer as shown in my instructions?
(everyone’s can be different. Copying my PLEX_UID/PLEX_GID is not guaranteed)

Bad path or Permission denied both yield “unavailable”

The native PMS was installed when I setup the docker container. It is still installed and I am actually using it.

I also got the PlexUID and GID on my own. They are the same as yours.

Chris

@cgengaro

I just got to our DS716+

bash-4.4# docker container list
CONTAINER ID   IMAGE                         COMMAND   CREATED         STATUS                   PORTS     NAMES
e50833ef1adc   plexinc/pms-docker:plexpass   "/init"   4 minutes ago   Up 4 minutes (healthy)             Plex
bash-4.4# cat CreateDockerContainer 
#!/bin/bash

docker run \
-d \
--name Plex \
--network=host \
-e TZ="EST" \
-e LANG="en_US.UTF-8" \
-e PUID=297536 \
-e PGID=297536 \
-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

bash-4.4# 

It immediately picked up the overlay, without errorr

Yes the GUI complains but it does work.
They apparently don’t like spaces in the path name.

Have you tried putting quotes around it to appease the GUI ?

If it doesn’t work with quotes, I would definitely file a bug report with Synology because spaces in file names is , as you know, 100% legal.

Thanks. I tried the quotes as you suggested. That did not work. Same error.
The problem with the error is that if you try to enable Auto-Restart, it will not Save. It complains because of the Mount Path Error. There is thus no what to enable Auto-Restart.

I notice that your script (posted above) includes the following two lines which mine did not:

e PUID=297536 \
-e PGID=297536 \

Is it possible those two lines make a difference?  I suppose not since you got the same error I did.

Last, is there any reason you can see that my script does not run properly from Terminal each time.   I ssh into NAS with an Admin account. I get an error that it cannot change directory to user’s homes folder, because I do not have that enabled.

Then, when I paste the docker run command (which I create in TextEdit), it does not always work. I often get the lines with > in front, and when I hit enter, all I get is >. Nothing happens. I am not sure whether that is related, or what I am doing wrong when I run the command.

Thanks again for your time.

Oh, that’s easy :slight_smile:

docker update --restart=unless-stopped CONTAINER_NAME

I’ll go add that to the FAQ (done)

Please do submit a bug report to Synology.
I don’t remember it complaining about spaces when this work was first done

Thanks. I will do that.

Sorry, I missed this question.

I used PUID and PGID which sets the container itself.
I don’t know PLEX_UID and PLEX_GID work with other Plex (linuxserver.io, etc) images

From Plex’s perspective, they are equivalent.

Sorry for what I’m sure is a stupid question, but do I just ssh into the NAS, and then run this command? I tried that but first got a permission error. So I ran it again with sudo n front. That returned the name of my container: plex. But when I looked at the container, and clicked Edit, enable auto-restart was still unchecked.

BTW, I submitted a bug report.

if you’ve confirmed your PlexMediaServer user on DSM 7 has the same values as the script does, Timezone is updated, then you’re ready to run it.

#!/bin/bash

docker run \
-d \
--name Plex \
--network=host \
-e TZ="EST" \
-e LANG="en_US.UTF-8" \
-e PUID=297536 \
-e PGID=297536 \
-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

# Restart unless stopped
docker --update  restart=unless-stopped

Put that in a directory (home?) on the Syno
then sudo ./ScriptName

It will create the container for you.

Remember to stop PMS before you do this. They WILL collide

I tried to follow your instructions but I am new at this. I created a text file using Texteditor on Syno, and saved it as "plex_install.txt in a shared folder called Syno. The path is therefore: /volume1/Syno/plex_install.txt.

I then ssh into Syno, and ran sudo /volume1/Syno/plex_install.txt.

I get the folllowing message in Terminal:

“docker run” requires at least 1 argument.
See ‘docker run --help’.

Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG…]

Run a command in a new container
/volume1/Syno/Plex_Install.txt: line 8: -e: command not found
unknown flag: --update
See ‘docker --help’.

I am not sure what I am doing wrong.

@cgengaro

You used the Synology Text Editor app?

Each line, except for the #!/bin/bash at the top and the last ends with \ (no trailing spaces after the \) ?

You can literally copy and paste from your browser right into the Syno text editor app

Linux naming conventions we use are:

  1. either no extension
  2. or end with .sh to indicate a shell script

We would see .txt and think it a data/text file; which this isn’t

I am sorry to be such a bother, and I feel sort of stupid, but I cannot get it to run.

When I run the command from Terminal: sudo /volume1/Syno/Plex_Install.sh I get the following error:

$ sudo /volume1/Syno/Plex_Install.sh
“docker run” requires at least 1 argument.
See ‘docker run --help’.

Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG…]

Run a command in a new container
/volume1/Syno/Plex_Install.sh: line 8: -e: command not found
unknown flag: --update
See ‘docker --help’.

Usage: docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Here is a screenshot of the exact text of the file I created using texteditor in Syno which is named Plex_Install.sh (except the Claim Code):

I really cannot figure out what is wrong with it.

Look at the end of Line 7 .

There is no \ at the end :slight_smile:

Sneaky little devils, aren’t they ?

It should look like this, with your current claim token (remember, they expire after 5 minutes)

docker run \
-d \
--name Plex \
--network=host \
-e PLEX_CLAIM="claim-2rZSB3JW2t56cJngN9kt" \
-e TZ="EST" \
-e LANG="en_US.UTF-8" \
-e PUID=297536 \
-e PGID=297536 \
-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

# Set to automatically restart unless stopped
docker update --restart=unless-stopped Plex

Just thought I’d let you know that I did not get any fix from Synology. They want remote access, but before I arranged that, I found a solution to the Mount Path problem and another that cropped up. The new problem was a network error whenever the plex container restarted.

The solution:
Portainer.

It can make any changes to the container, including the Mount Path with spaces, can set it to auto-restart, and start it without errors.

Thanks again for all your assistance.

Yes, Portainer is a docker controlling package.

I think the answer is clear – Bugs in Syno Docker package.

Glad you’ve resolved it.