# Current Optimal Set Up on Synology

**URL:** <https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264>\
**Category:** Plex Media Server\
**Tags:** server-synology\
**Created:** [June 24, 2022, 1:39am UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264 "2022-06-24T01:39:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Royal2000H](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/royal2000h/32/131788_2.png) [@Royal2000H](https://forums.plex.tv/u/Royal2000H)\
**Post date:** [June 24, 2022, 1:39am UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/1 "2022-06-24T01:39:20Z")

</div>

This may be a question for @ChuckPa

What is the current most optimal way to run Plex on a Synology DS920+ with DSM 7?

I’ve previously (~Sep 2021) followed your guide to migrate from DSM 6 to DSM 7 with the native Synology package downloaded from Plex. Updates are easily done by downloading new packages from Plex.

As far as I can tell, hardware transcoding works with this meth  
But now I’m seeing posts that hardware transcoding works with HDR tonemapping using Docker.

So is Docker the “best” current way to run Plex? If so, which image? Linuxserver’s?

Best = most feature-filled, highest performance, least resource hungry, least problematic, easiest to maintain/keep updated, etc.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 24, 2022, 2:03am UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/2 "2022-06-24T02:03:45Z")

</div>

If you want hardware HDR tone mapping, using the “Docker overlay” method works the best.

You have the libraries which docker provides to handle HDR and you have your existing metadata.

The only thing you’ll have to remember is to never run both at the same time – that would corrupt it.

I don’t delete the PlexMediaServer shared folder or username when you uninstall the package (unless you ask it to).

This means you can

1. Stop Plex,
2. Create the docker overlay,
3. Confirm it works
4. Uninstall the native package (using the KEEP option)

If you need help with the How-To, please let me know.

---

<div class="post-metadata">

**Author:** ![Royal2000H](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/royal2000h/32/131788_2.png) [@Royal2000H](https://forums.plex.tv/u/Royal2000H)\
**Post date:** [June 25, 2022, 4:48am UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/3 "2022-06-25T04:48:16Z")

</div>

Thanks for your response!

Other than hardware HDR tone mapping, what are the other implications of the different methods (performance or otherwise)?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 25, 2022, 6:02am UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/4 "2022-06-25T06:02:09Z")

</div>

There are no other differences between the Docker container implementation versus the native application with exception of how you start, stop, and update the software.

If you use Docker, you’ll start and stop it using the Synology docker app instead of Package Center.

With the metadata in this “overlay” configuration, to update PMS, you simply delete then recreate the container. (the software downloads the newer version as part of creation).

---

<div class="post-metadata">

**Author:** ![Royal2000H](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/royal2000h/32/131788_2.png) [@Royal2000H](https://forums.plex.tv/u/Royal2000H)\
**Post date:** [June 26, 2022, 3:15am UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/5 "2022-06-26T03:15:46Z")

</div>

Excellent. Was planning on following your guide from here ([Synology FAQ - Questions, Answers, and a few How-To's - #35 by ChuckPa](https://forums.plex.tv/t/synology-faq-questions-answers-and-a-few-how-tos/490215/35)) but using [linuxserver’s Docker container](https://hub.docker.com/r/linuxserver/plex) because I have other media-related docker containers using the linuxserver base so I understand this would help save some space.

However, are a lot of the docker run parameters vastly different (namely the networking stuff)?

Also for below,

> -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 \

Instead of the last 2 lines, if I have “/volume1/media/TV” and “/volume1/media/Movies”, I assume I can just pass "/volume1/media:/volume1/media " or should I pass both separately as they’re separate libraries?

Finally, for updating. If I want to stay automatically updated with the latest plexpass, if I understand the documentation correctly, I do the “latest” tag. This will update from inside the container and therefore doesn’t rely on watchtower which updates my other containers?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 26, 2022, 3:33am UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/6 "2022-06-26T03:33:52Z")

</div>

> [@Royal2000H](#):
>
> -v /volume1:/volume1  
> -v /volume2:/volume2 \

By passing all of `/volume` as `/volume1` then it does not matter what you use inside the container. Passing all of `/volume1`, by definition includes `/volume1/media/TV`. See it? (pass the top level and all sub-levels come with it automatically)

I wrote it this way to keep the container definition as simple as possible while working for everyone.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 26, 2022, 3:45am UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/7 "2022-06-26T03:45:36Z")

</div>

Have you reviewed this for DSM 7 ?

> [@DSM 7 + Packaging 2.0 + Docker -- The How-To](https://forums.plex.tv/t/dsm-7-packaging-2-0-docker-the-how-to/737361):
>
> DSM 7 + Packaging 2.0 + Docker – The How-To This How-To (FAQ) will demonstrate how to setup a pms-docker container which uses the new packaging (/PlexMediaServer/AppData) structure used in PMS 1.24.2.4973 and above (DO NOT USE BETA 1.21.0.3744) and is fully interoperative & non-destructive of the Native app. (you can run either either as you wish.) A. Get the UID/GID values from DSM 7 for use with PLEX\_UID & PLEX\_GID Create a Scheduled Task - User script a. Run once b. Email you t…

If you use HOST networking, the container assumes the identity of the Synology.  
All Synology networking configuration is in control (as it should be)

I recommend not ‘over-thinking’ or ‘over-complicating’ it.

Remember, this is an ‘overlay’. You’re overlaying all your storage from outside the container and placing inside the container (all pathnames are exactly the same).

The only change the container makes is PMS itself.

---

<div class="post-metadata">

**Author:** ![Royal2000H](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/royal2000h/32/131788_2.png) [@Royal2000H](https://forums.plex.tv/u/Royal2000H)\
**Post date:** [June 26, 2022, 8:51pm UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/8 "2022-06-26T20:51:19Z")

</div>

Yea I think you’re right that I’m definitely overthinking things. Logic dictated that if I pass the parent media folder, access to all subdirectories would be available within the container. But having such superficial experience with Docker, I wasn’t sure whether for some reason paths need to be passed through independently for different libraries. Obviously that was wrong.

I’ll give it a shot modifying your FAQ guide to work with the linuxserver image a little bit later today/tomorrow and hopefully not break anything.

As for updates, I think I understand correctly that setting the “latest” tag for VERSION in the linuxserver container will both update to the latest (plex-pass) version using Plex’s update but also update any time watchtower updates the container. Hopefully that’s a good way to go about it.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 26, 2022, 11:39pm UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/9 "2022-06-26T23:39:02Z")

</div>

The image you use (Linuxserver or Plex) isn’t as important as the other definitions for creating the container.

If you use Linuxserver, PUID/PGID must still match the UID/GID of `PlexMediaServer` as taken from the Synology

All the other volume and environment variables as the same.

---

<div class="post-metadata">

**Author:** ![Royal2000H](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/royal2000h/32/131788_2.png) [@Royal2000H](https://forums.plex.tv/u/Royal2000H)\
**Post date:** [September 15, 2022, 1:29am UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/10 "2022-09-15T01:29:18Z")

</div>

Hey @ChuckPa I ended up having to move across the country so I put all my changes on hold. Coming back to it now, I found this guide [Plex in Docker on a Synology NAS (Hardware Transcoding)](https://drfrankenstein.co.uk/2021/12/06/plex-in-docker-on-a-synology-nas-hardware-transcoding/) and it uses Linuxserver so the parameters should line up perfectly for me. I’m hoping you could help me confirm two things:

1. If I stop the package service and then install via docker through his guide, my data will be carry over as expected just like your guide.
2. Can I safely uninstall the package once the docker container is installed?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [September 15, 2022, 1:53am UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/11 "2022-09-15T01:53:08Z")

</div>

If you want to run his config, that’s fine but be advised.

1. It’s completely independent of the native packages

2. None of your existing metadata will be used. He puts everything in his own place. You’ll start out with a brand new server

3. There will be no hardware transcoding (not configured in that definition)

What he’s created is a generic plex container with none of the benefits.

You’d be better off running the official Plex Docker container.

I have configurations, with hardware transcoding, which fully overlay both DSM 6 and DSM 7

> [@Synology FAQ - Questions, Answers, and How-To's](https://forums.plex.tv/t/synology-faq-questions-answers-and-a-few-how-tos/490215/35):
>
> 28. Using Docker for HW trancode & Tone Mapping - How To WARNING: This technique is no longer required as of PMS 1.29.1.6240. PMS 1.29.1.6240 and above installs the needed drivers automatically upon first use You may now remove the PMS container and image. ================================================================= OBSOLETE This How-To (FAQ) will demonstrate how to setup PMS, with HW transcoding and tonemapping support. Two different methods are presented here – First method is ru…

---

<div class="post-metadata">

**Author:** ![Royal2000H](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/royal2000h/32/131788_2.png) [@Royal2000H](https://forums.plex.tv/u/Royal2000H)\
**Post date:** [September 15, 2022, 3:22am UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/12 "2022-09-15T03:22:46Z")

</div>

Really? He specifically mentions Hardware transcoding and even has the “/dev/dri:/dev/dri” line so it really seems like his hardware transcode with HDR tonemapping.  
That said, if my library will be totally new, that’s a deal breaker.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [September 15, 2022, 3:59am UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/13 "2022-09-15T03:59:53Z")

</div>

There’s a serious deal breaker there.

DSM 7 locks out the hardware.

The UID:GID the container will run as is `100:100` which goes nowhere on DSM 7.

We had to work with Synology to get the hooks for hardware transcoding.  
Initially , they didn’t even have it in their design.

[![](https://drfrankenstein.co.uk/wp-content/uploads/2022/08/image-8.png) ](https://drfrankenstein.co.uk/wp-content/uploads/2022/08/image-8.png)

`YOURGID` does not have hardware access on DSM 7. That’s how they designed DSM 7.

It’s why we needed a new username , “System Internal User” class, PlexMediaServer.

If you cheat, and run as `0:0` (as root) then that is your choice but also be advised, if anything happens, it’s totally on you.

Such a configuration is non-standard and unsupportable.

Now, getting to the totally new library part

- `/volume1/docker` (shared folder ‘docker’) is used ; not your existing metadata.
- Your data is defined to exist in shared folder `/volume1/data` .

Look at the differences:

```auto
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

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

```

You can easily change this `run` into a `compose` with some trivial editing. That’s not important.

My container is a perfect overlay of the live filesystem

---

<div class="post-metadata">

**Author:** ![Royal2000H](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/royal2000h/32/131788_2.png) [@Royal2000H](https://forums.plex.tv/u/Royal2000H)\
**Post date:** [September 16, 2022, 3:40am UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/14 "2022-09-16T03:40:12Z")

</div>

I understand. So interesting he posts it as having hardware transcoding when there is no user permission to do so. I agree with you that modifying to run as root is not something I would want to do. I don’t care about docker run vs docker compose, I simply wanted to follow his guide because he uses linuxserver/plex and I’d rather use that over plexinc/pms-docker because I have several linuxserver containers. I’m sure changing the syntax of parameters from your post to work with the linuxserver container is trivial but it’s still daunting.

Regardless, before I proceed, once I install the docker container (via your guide) and confirm it’s working, can the package be uninstalled? Or does that modify the user/files the container relies on?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [September 16, 2022, 4:10am UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/15 "2022-09-16T04:10:13Z")

</div>

LInuxServer is put together from our image.

We worked together for the hardware tone mapping library support

If you want to use their image, that’s fine.  
Just be certain to use a proper container definition.

You’ll know soon enough if it works.

As point of order, I setup the UID/GID environment variables to be compatible with both.

Per:

> [@Royal2000H](#):
>
> Regardless, before I proceed, once I install the docker container (via your guide) and confirm it’s working, can the package be uninstalled? Or does that modify the user/files the container relies on?

You may not uninstall the package because the package’s configuration is what defines the access to the hardware for transcoding and tone mapping.

Unpacked, you’re only looking at ~200 MB of HDD space for the code.

---

<div class="post-metadata">

**Author:** ![Royal2000H](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/royal2000h/32/131788_2.png) [@Royal2000H](https://forums.plex.tv/u/Royal2000H)\
**Post date:** [September 16, 2022, 11:25pm UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/16 "2022-09-16T23:25:06Z")

</div>

Thanks for your quick replies. Only reason I’d use the linuxserver is because I have other linuxserver containers so they’d share the same base in terms of resource (as far as I understand).

Understood about keeping the package installed. Will do. I assume I don’t need to keep updating the package though. Can leave it dormant / “forgotten” (and stopped).

---

<div class="post-metadata">

**Author:** ![Royal2000H](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/royal2000h/32/131788_2.png) [@Royal2000H](https://forums.plex.tv/u/Royal2000H)\
**Post date:** [September 17, 2022, 7:59pm UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/17 "2022-09-17T19:59:08Z")

</div>

OK I stopped the Plex package.

I then ran the following task (after confirming that my IDs are indeed 297536):

```auto
docker run -d \
  --name=plex \
  --net=host \
  -e TZ="America/New_York" \
  -e LANG="en_US.UTF-8" \
  -e PUID=297536 \
  -e PGID=297536 \
  -e PLEX_UID=297536 \
  -e PLEX_GID=297536 \
  -e VERSION=latest \
  -v /volume1/PlexMediaServer/AppData:"/config/Library/Application Support" \
  -v /volume1/PlexMediaServer/AppData/tmp:/tmp \
  -v /volume1/PlexMediaServer/AppData/tmp:/transcode \
  -v /volume1/media:/volume1/media \
  --device=/dev/dri:/dev/dri \
  --restart unless-stopped \
  lscr.io/linuxserver/plex:latest

```

I ran Plex through Docker, went into settings \> Transcoder and have the following settings:

 ![image](https://global.discourse-cdn.com/plex/original/4X/d/c/6/dc61447496872db9d70e0451a2a196e2bbd9c69f.jpeg)

Now if I open Plex on my phone and force it to play 480p for testing purposes, I have the following show up in Activity on a 4K non-HDR video:

 ![image](https://global.discourse-cdn.com/plex/original/4X/0/6/f/06ff807e3ba71ac06e6aee2dc463a48d7f45ade7.png)  
Great, HW transcoding works!

However, with a 4K HDR video, I get the following:

 ![image](https://global.discourse-cdn.com/plex/original/4X/6/b/b/6bbeb36cd72cd892392339f0eb8a10c673c3dded.png)  
Not using hardware to transcode!

Regardless of HDR, Plex using \>95% CPU of my DS920+ when transcoding.

Any thoughts?

Edit:  
I stopped the Docker container and restarted the package just to check. With the package, weirdly enough it does say I’m getting HW with HDR even though I thought the package was said to not support that! Also my CPU usage is in the 30+% range rather than 90+%, though it still buffers significantly. Using package:

 ![image](https://global.discourse-cdn.com/plex/original/4X/d/f/b/dfb037c65bc1c549f10aaa1c727c948ac9a6e70a.png)

Edit2:  
I removed the linuxserver container and installed the pms-docker container as per your instructions (just removed hostname, modified volume, and modified TZ because “EST” does not respect DST):

```auto
docker run \
-d \
--name Plex \
--network=host \
-e TZ="America/New_York" \
-e LANG="en_US.UTF-8" \
-e PUID=297536 \
-e PGID=297536 \
-e PLEX_UID=297536 \
-e PLEX_GID=297536 \
-v /volume1/PlexMediaServer/AppData:"/config/Library/Application Support" \
-v /volume1/PlexMediaServer/AppData/tmp:/tmp \
-v /volume1/PlexMediaServer/AppData/tmp:/transcode \
-v /volume1/media:/volume1/media \
--device=/dev/dri:/dev/dri \
plexinc/pms-docker:plexpass

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

```

And now it does show HW transcoding with HDR:

 ![image](https://global.discourse-cdn.com/plex/original/4X/5/2/9/52977be1033341f66ed46daee514ea95d4dc942e.png)  
CPU and buffering seem to be superior on pms-docker compared to package or my linuxserver attempt.

Curious why linuxserver attempt didn’t work.

---

<div class="post-metadata">

**Author:** ![DaveTheNerd](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/davethenerd/32/126923_2.png) [@DaveTheNerd](https://forums.plex.tv/u/DaveTheNerd)\
**Post date:** [September 21, 2022, 10:00pm UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/18 "2022-09-21T22:00:31Z")

</div>

I set this Docker overlay up, and it launched fine and works great with hardware-transcoding being used for HDR and all that.

I went into the Synology Docker app and stopped the container…and it stopped. But I get an error when I go to start it: “Unable to perform this operation, possibly because the network connection is unstable or the system is busy. Please try again later.”

 ![image](https://global.discourse-cdn.com/plex/original/4X/f/a/0/fa0a88d87d11edfa206e9da947792bd9df34a800.jpeg)

But if I SSH into my DiskStation and issue “docker start Plex” it fires up just fine. Any ideas?

Thank you! And if this should be in a separate thread, my apologies. I just didn’t want to create even-more-threads about this general topic.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [September 21, 2022, 10:50pm UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/19 "2022-09-21T22:50:19Z")

</div>

@DaveTheNerd

Please create that error again and then grab a ZIP file of the logs directory via PlexMediaSerfer/AppData/Plex Media Server/Logs (use FileStation)

That type of error occurs when native app and docker container try to run at the same time

---

<div class="post-metadata">

**Author:** ![DaveTheNerd](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/davethenerd/32/126923_2.png) [@DaveTheNerd](https://forums.plex.tv/u/DaveTheNerd)\
**Post date:** [September 21, 2022, 11:19pm UTC](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264/20 "2022-09-21T23:19:50Z")

</div>

> [@ChuckPa](#):
>
> Please create that error again and then grab a ZIP file of the logs directory via PlexMediaSerfer/AppData/Plex Media Server/Logs (use FileStation)

[PlexDockerFailure-Logs.zip](https://forums.plex.tv/uploads/short-url/bkxLMnp8atsNZ7BgLqgzTBVtcO3.zip) (1.4 MB)  
Sure thing! And thank you. 🙂

> [@ChuckPa](#):
>
> That type of error occurs when native app and docker container try to run at the same time

I confirmed (twice now) that the native Plex app is NOT running. Package Manager confirms this, and the Plex web interface wouldn’t load when the Docker container was off.

[Next page](https://forums.plex.tv/t/current-optimal-set-up-on-synology/798264.md?page=2)
