Use Docker to Set Up Plex on a Synology NAS

Today we are going to take a look at how you can install Plex on a Synology NAS using Docker.

As of today, the DSM 7 Release Candidate package for Plex doesn’t work. However, Docker is not impacted, which is why we’re going to take a look at how you can get Plex working on DSM 7! 

Instructions - Use Docker to Set Up Plex on a Synology NAS

1. Inside of the Docker shared folder, create a sub-folder named Plex, then create three sub-folders inside of that folder: config, transcode, data.

2. Ensure that Docker is installed and launch the application.

3. Open the Registry, then download the latest plexinc/pms-docker image.

synology nas plex docker

4. When the image finishes downloading, double-click the image to launch the configuration tool. Give the container a name, then select Advanced Settings. Ensure that Enable auto-restart is selected.

synology nas plex docker

5. In the volume section, map the container’s folders as shown in the image below. NOTE: The Media folder that I mapped contains sub-folders for my Movies, Music, and TV Shows. If you have separate shared folders for those types of media files, you will have to mount different volumes for each. This is explained in greater detail in the video above.

synology nas plex docker

6. In the Network section, select Use the same network as Docker Host.

synology nas plex docker

7. Ensure you can SSH into your Synology NAS. Open Control Panel, select Terminal & SNMP, and Enable SSH service. If you are using Synology’s Firewall, ensure that you allow port 22 traffic. I created a video on how to SSH into your Synology NAS if you have any problems.

8. This next part is a little confusing and is better explained in the video. In summary, we need to specify the PUID and GUID in order for the container (Plex) to access our media share. You will have to run the command below and substitute the correct username. NOTE: You must ensure that the user/group has read/write permission to your media folder.

id [USERNAME]

9. In the environment variables section, create two variables: PLEX_UID, PLEX_GID. Substitute the correct values that you found in the last step. Select Apply and create the container. NOTE: As of the latest Plex update, use the environment variables PLEX_UID and PLEX_GID rather than PUID & GUID.

10. Navigate to the IP address of your Synology NAS using port 32400 and /manage. The URL should look like this:

http://[SYNOLOGY_NAS_IP]:32400/manage

11. Sign in with your Plex username/password or create one if you don’t already have an account.

12. Give the server a name and select Next. If you want Plex to automatically try to allow connections on port 32400 (using UPnP), you can select Allow me to access my media outside my home. I generally stay away from UPnP, so I will disable this.

13. You will now have to create your media libraries. Select Add Library, the content type you’d like to use, along with the folder and location where it’s stored. You will have to do this for each media type you’ll be using. Select Next, then Done and your media will start to sync!

Hardware Transcoding

As of right now, hardware transcoding does not work when using Synology’s GUI. A docker-compose or docker run command is required. I have a video below explaining how to use it with the Plex package, which will allow you to use the Plex package OR Docker. Special thanks to ChuckPa on the Plex forums for the help.

Please keep in mind that you can create your own Docker-Compose or Docker Run command if you don’t want to use it in tandem with the Plex package.

Conclusion

We aren’t entirely sure when the Synology Plex package will be updated, but there are plenty of people who prefer running it in Docker. If you implement this, you don’t have to switch to the official package when it’s released, but you are free to do so if you’d like!

Thanks for checking out the tutorial. If you have any questions, leave a comment and I will do my best to get back to you.

This Post Has 26 Comments

  1. I followed your instructions but the container fail to start. Log is complaining about port 53 already in use ???
    I have pi-hole running in docker as well,

    1. That’s a very weird error to run into since port 53 isn’t used for Plex? Pi-hole will definitely use port 53, since that’s the default DNS port, but Plex doesn’t use that port anywhere. Have you tried starting from scratch and seeing if it gives the same error?

  2. Thanks a lot for the guide! Does Transcoding with Plex Pass works in this way?

    1. Thank you! Yes, you will have to potentially modify the Docker container, but you should be able to get hardware transcoding working.

  3. I am not able to get access to my media share. I tried different user. All of them have acces to the media share. Even admin account does not work. What else can I try?

    1. Can you make sure that the user group (users) has read/write access to the media folder? I believe this is a different way of getting the data to show.

    2. I had the same issue as Holger. Modifying the User Group permissions on my shared folder fixed the problem!

      1. I am having exactly the same as well … Cannot get access to my media share somehow? Tried all users and checked the read/write access rights already.

        1. Are you using DSM 6 or DSM 7? Also, when you say read/write permissions, do you mean on the user or group?

  4. First off I appreciate all of your videos. I’ve taken a whole week just to watch your videos to understand as much as I could.
    Everything is working out so far, but I noticed that the read speed when opening the mapped network folder that holds my streaming media has drastically slowed down… Any tips or ideas on why this is the case? I turned off plex on DSM to as a quick troubleshooting step but no changes.

    1. Thanks for the kind words! When you say that the read speeds slow down, are you talking about from Plex or an SMB/DSM/other share? The issue with network slow downs is that it can be so many different things. From my experience, trying to rule things out by process of elimination is the best (but slowest) method.

  5. Hi, and thanks for the guide.
    As i’ve installed Portainer, do you have a docker-compose syntax to provide that will do the same in portainer’s stack section ?
    (and to go a little deeper :
    – how do you manage do do the same network configuration for the plex container ?
    – how do you set up your firewall inside DSM ?
    – how do you “modify” the container to allow hardware transcoding ?
    Thanks for your help

    1. I unfortunately don’t have a docker-compose. The firewall will be port 32400, and the container is the same network configuration as host. As long as you aren’t using the Plex package, it should install properly on that port. Hardware acceleration can be managed by the docker-compose file as well.

  6. Hi,
    regarding the UID/GID part, I’ve created a “docker-plex” user (I do that for every container).
    and as I don’t want to give all users the r/w permissions on the “media” shared folder, I’ve created a “plex” group, with only this “docker-plex” user.
    So if I give “docker-plex” user and “plex” group the r/w permissions on “/volume1/docker/plex” and on “/volume1/media”, is it ok ?

    Last question is : with the id command, I get this :
    uid=1029(docker-plex) gid=100(users) groups=100(users),65536(plex)
    So what should I enter as environment variables ?
    PUID:1029 and GUID:65536 ?

    Thanks for your advices.
    (I precise that I’m on a fresh DSM 7 install)

    1. That sounds correct. As long as it has permission, that should work properly.

  7. Thanks for this. I’ve followed everything and it’s all working fine up until I I try to add the media libraries. I’m mapping them to a shared folder in the NAS, (shared-folder/media/Movies, etc) but they’re not populating within plex.I wonder if it’s permissions-related?

    1. Yes, that would signal a permission issue. For the GUID/PUID parameters, did you set them to values of an account that has permission to that share?

  8. Hi, first of all thank you for your very helpful tutorials! I will see later the other content of your channel. I followed all the steps and have configured Plex under Docker on my Synology now running the DSM7 version. I haven’t tested yet, but I see that the connection with Plex-Web is still unsecure. How can I turn it into a secure connection?

    1. Thanks! That can be fixed with certificates, but if you’re only accessing the webpage locally (on your local network), then it’s not necessary. However, if you have exposed Plex outside of your local network, you should set up a Let’s Encrypt certificate. There are tons of ways to do it, but I would probably recommend Synology’s reverse proxy server (I have a video on it if interested).

  9. Hi, just to say that Plex is now working perfect on my TV set Samsung. I have just this doubt, if it is necessary a secure connection to Plex-web or not. Is my synology system secure? Thanks in advance.

  10. Hello, just passing by again to apologize and say that now it is everything ok. I could access Plex-web securely after installing Plex in a Docker container on my Synology NAS. Thank you for all.

    1. Glad you got it working!

Comments are closed.

Close Menu