Plex on Synology Nas running on Docker never runs Server Setup

{
   "CapAdd" : null,
   "CapDrop" : null,
   "cmd" : "",
   "cpu_priority" : 50,
   "enable_publish_all_ports" : false,
   "enable_restart_policy" : true,
   "enabled" : true,
   "entrypoint_default" : "/init",
   "env_variables" : [
      {
         "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"
      },
      {
         "key" : "PLEX_CLAIM",
         "value" : "*********(taken out)"
      },
      {
         "key" : "PUID",
         "value" : "1026"
      },
      {
         "key" : "GUID",
         "value" : "100"
      }
   ],
   "exporting" : false,
   "id" : "a2011660e9fb23ebc729001aa76e2bb121549823bfe7827ba2a43cf83893eb35",
   "image" : "plexinc/pms-docker:latest",
   "is_ddsm" : false,
   "is_package" : false,
   "links" : [],
   "memory_limit" : 0,
   "name" : "plex",
   "network" : [
      {
         "driver" : "host",
         "name" : "host"
      }
   ],
   "network_mode" : "host",
   "port_bindings" : [],
   "privileged" : false,
   "shortcut" : {
      "enable_shortcut" : false,
      "enable_status_page" : false,
      "enable_web_page" : false,
      "web_page_url" : ""
   },
   "use_host_network" : true,
   "volume_bindings" : [
      {
         "host_volume_file" : "/Media",
         "mount_point" : "/media",
         "type" : "rw"
      },
      {
         "host_volume_file" : "/docker/plex/transcode",
         "mount_point" : "/transcode",
         "type" : "rw"
      },
      {
         "host_volume_file" : "/docker/plex/data",
         "mount_point" : "/data",
         "type" : "rw"
      },
      {
         "host_volume_file" : "/docker/plex/config",
         "mount_point" : "/config",
         "type" : "rw"
      }
   ]
}

Hardware: Synology DS920+

Docker Image: plexinc/pms-docker:latest

Issue: I just got this synology nas, and I’m moving my media over from my main PC. Finally got my plex running in docker, but every time I log into http:myipaddress:32400/manage (or /web) it brings me back to Plex’s home page where I would normally see my media. I went through and deleted my old server, I even deleted my account (mistake, don’t do that if anyone finds this post).

My plex container is running on the same network as the host, I only have one subnet for my entire network, and I’ve completely uninstalled plex from my main PC. I’ve opened it in new browsers, I’ve opened browsers in incognito mode, I’ve reset my computer, the Nas, and the container and still it doesn’t work.

My previous setup did utalize nat, but I deleted all those settings from my firewall, so that shouldn’t be causing an issue anymore either.

I’m about to tare my hair out with with how frustrating this process has been, I need advice on where to go from here.

The How-To listed below is based on overlaying the native app installation.

With this configuration, once you’ve setup with the native app, you can switch to the docker container.

Method 1 is the most common to include HW transcoding.

I have an easy method , using a scheduled task, which updates the container when you want.

Messed around with this a bit this morning but i think I missed this part

Blockquote With this configuration, once you’ve setup with the native app, you can switch to the docker container.

So I would first install the Plex app package from synology before I run that task?

Also I see that the user they you use is PlexMediaServer, is that a user that is created just for the native app?

@Erik-C

The container runs with the same UID/GID as the native app.
Doing this avoids any/all permission problems.

  1. Download and install the native app Plex app.
  2. Configure it and make it operational on the Syno
  3. When all media is added and all shared folder permissions granted,

Now add the docker overlayed container.
The container uses all server ID & permission information from the native app
because it’s sharing / using the native app’s data.

So looks like I’m getting a similar problem with the native app. I tried the one from DSM7 Package Manger, as well as downloading the one directly from plex and installing it manually. When I manually installed it I included a claim token, but I’m still getting the same issue.

2022-03-24 09_33_07-Home PC

(Doing the following through a incognito browser to count out cache)

When I navigate to my Synology’s IP address for plex (http://nasip:32400/web) I get redirected to app.plex.tv/auth/… and am greeted with this. I log in and then am brought to the plex index page where I see Plex home. I’m never brought to the Server Setup,

Looking through the logs for the native app I’m seeing this, not sure if this helps with tracking down the issue:

BlockquoteMar 24, 2022 10:31:22.497 [0x7fb5d6a04b38] DEBUG - [HttpClient] HTTP/1.1 (0.0s) 200 response from GET http://12.10.1.28:9080 (reused)
Mar 24, 2022 10:31:22.497 [0x7fb5d6307b38] ERROR - XML: Entity: line 1:
Mar 24, 2022 10:31:22.497 [0x7fb5d6307b38] ERROR - XML: parser
Mar 24, 2022 10:31:22.497 [0x7fb5d6307b38] ERROR - XML: error :
Mar 24, 2022 10:31:22.497 [0x7fb5d6307b38] ERROR - XML: Start tag expected, ā€˜<’ not found
Mar 24, 2022 10:31:22.497 [0x7fb5d6307b38] ERROR - XML: status=ok
Mar 24, 2022 10:31:22.497 [0x7fb5d6307b38] ERROR - XML: ^
Mar 24, 2022 10:31:22.497 [0x7fb5d6307b38] ERROR - Error parsing content.
Mar 24, 2022 10:31:22.497 [0x7fb5d6307b38] ERROR - Error parsing XML: Error parsing file.
Mar 24, 2022 10:31:22.497 [0x7fb5d6307b38] ERROR - SSDP: Error parsing device schema for http://12.10.1.28:9080
Mar 24, 2022 10:31:24.235 [0x7fb5d6c47b38] DEBUG - Request: didn’t get any data from [::ffff:12.10.1.27]:53489: End of file

So I finially got it. Posting this here incase anyone stumbles upon this. I ended up doing some more digging and came across the Claimit Tool. After running through that I noticed I got an IP Address error. It all came back to how I had settup my network.

Having AT&T, they block use of some private ip ranges (10.x.x.x), so I ended up going with 12.x.x.x. Well if I knew more about networking, I would have known that this would be in the public ip address range. For proper communication on my network, I needed to change it over to a private IP Address range. So I changed it to 172.x.x.x.x and now its working perfect.

Won’t forget this lesson anytime soon, hope this helps somebody in the future.

So I managed to get Plex working natively, and I’m running through this because I had some issues with permissions on the docker container. When I run the script to create the docker container I’m getting an error returned:

Blockquotedocker run
-d
–name Plex
–network=host \
-e TZ=ā€œPSTā€
-e LANG=ā€œen_US.UTF-8ā€
-e PUID=297536 \
-e PGID=297536
-h dockerplex \ # Change this name as you deem appropriate
-v /volume1/PlexMediaServer/AppData:ā€œ/config/Library/Application Supportā€
-v /volume1/PlexMediaServer/AppData/tmp:/tmp
-v /volume1/PlexMediaServer/AppData/tmp:/transcode
-v /volume1:/volume1 \ # Add more volumes if you need to
–device=/dev/dri:/dev/dri
plexinc/pms-docker:plexpass

BlockquoteTask: Task 5
Start time: Thu, 24 Mar 2022 14:38:58 GMT
Stop time: Thu, 24 Mar 2022 14:38:58 GMT
Current status: 127 (Interrupted)
Standard output/error:
docker: invalid reference format.
See ā€˜docker run --help’.
/bin/bash: line 4: -e: command not found
/bin/bash: line 7: -e: command not found
/bin/bash: line 9: -v: command not found
/bin/bash: line 14: --device=/dev/dri:/dev/dri: No such file or directory

@Erik-C

ALL lines, except the plexinc/pms-docker:plexpass should end with \ (continuation marker)

Please again look at what I wrote

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 \                             # Change this name as you deem appropriate
-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 \    # Add more volumes if you need to
--device=/dev/dri:/dev/dri \
plexinc/pms-docker:plexpass

Looks like the block quote messed with the formatting, I did have \ to close off every line and still get the same error:

docker run \
-d \
--name Plex \
--network=host \    
-e TZ="PST" \
-e LANG="en_US.UTF-8" \
-e PUID=297536 \ 
-e PGID=297536 \
-h dockerplex \                             # Change this name as you deem appropriate
-v /volume1/PlexMediaServer/AppData:"/config/Library/Application Support" \
-v /volume1/PlexMediaServer/AppData/tmp:/tmp \
-v /volume1/PlexMediaServer/AppData/tmp:/transcode \
-v /volume1:/volume1 \    # Add more volumes if you need to
--device=/dev/dri:/dev/dri \
plexinc/pms-docker:plexpass

i dont know if this is right or not but i had to delete all the extra spaces in the code in the tutorial for mine to run correctly. like the space after network host you have above.

I’m pretty sure that ā€œ\ā€ and NL must be the last things on the line. IOW try removing your line comments.

Oh and when you post saying I tried this and it didn’t work, be sure to include the text that made you think ā€œit didn’t workā€. AKA the error message!

In bash, you can continue a line by escaping the carriage return. This would mean you can’t put comments after the ā€œ\ā€. Note you can’t even have a space after the ā€œ\ā€.

What a funny quirk, I really need to learn some bash. That seems to have cleared up my errors!

To all reading here.

  1. I rechecked on my DS418 – it worked
  2. I then installed the DSM update which was pending.
  3. Reran the same script – IF FAILED.

That’s interesting indeed. Busybox shell is no longer ignoring whitespace at the end of a line.

I’ve since gone into my How-To script and trimmed it to be compliant.

I apologize for the wasted time and effort you all invested.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.