A new updated version using docker-compose is available here. A recent docker bug on Synology wiped all my container configuration which is the reason for switching to docker-compose, which I anyhow find more user friendly and easy to use. The good news is that once setup, you can use the Synology UI to control the start/stop events and also view the logs.
I use images created and maintained by https://www.linuxserver.io/. They are popular amongst the Docker community and they provide the base images for most of my utility installs such as SABNZBd, PLEX and Unifi Controller. For some containers, I want them to auto update when restarted and linuxserver makes it easy for an end user like myself.
Go into the Package Center and install Docker. The package is provided and maintained by Synology.
I’ve chosen to keep many settings and other data outside of my containers. This approach makes container upgrades, backups and configuration easier. The docker folder is a shared folder on my NAS. For Plex, I’ve chosen to export the entire Library structure out of the container. This folder contains the Plex Library which can grow quite large, Logs, Settings and the Plug-Ins folder.
When creating and configuring the container, I map paths within the container to these external paths.
Search the official Docker registry for the Plex distribution. Click on the link to browse the documentation which informs about important switches and configuration settings. The link will take you to the Docker page for that specific image (https://hub.docker.com/r/linuxserver/plex/).
For most containers, it is about which ports and file shares you want to share between your container and host environment. In case of Plex, you keep your actual media files outside of the container so the container needs at least read access to your media folders. You may also want to keep your media library, configurations and plug-ins folder outside of your container. Ports need to be opened, and sometimes re-mapped, to make Plex and other apps accessible from outside of the container. If you run many containerized apps, you may need to re-map conflicting ports.
- Enter the name of the wanted image based on [maintainer account]/[image name]
- Click on Search button to search in the set repositories
- Always check the documentation in order to plan your setup
- Click on the Download button to actually download the wanted image. This step will also provide you with an option to select version which are detailed in the documentation.
This step is equivalent to cli “docker pull linuxserver/plex:latest”.
For most containers without complex settings, it is easiest to launch the provided Wizard which will provide a UI based setup process.
In this step, you will apply all the wanted configuration settings such as port re-mapping, volume exports and container linking.
Click on the Advanced Settings button in order to set path exports.
Mount /config path to the external folder /docker/plex on the Synology.
The Library includes:
- The logs folder
- The actual library metadata, which can grow quite large
- The important plug-ins folder where you can install additional Plex plugins just by placing the bundles in the folder.
Next step is to map all your media folders you want indexed by Plex. Not all media need to be placed on your NAS as Synology supports remote mount points as well.
Since Plex can also delete and update your media files, I’ve chosen to allow read/writes on the media folders.
In the Environment tab, I’ve chosen to set TimeZone and Version.
The Version setting will allow auto updates to the latest Plex version. This is accomplished by an internal script provided by linuxservers and not a feature of Docker. Normally I would need to do a “docker pull linuxservers/plex:latest” to update the image, and then re-create the container to get the latest and updated docker image.
The caveat being if Plex is introducing breaking changes, which are incompatible with the image, things can break.
To export and backup your container settings, Click on Settings and choose Export.
If you want to update to the latest version of the image, you need to delete the container and then re-download the docker image. To speed up the process you can either export or duplicate the container settings.
Another shortcut is to drop to the CLI and do a “docker pull linuxserver/plex:latest” to update the image, and then create a new container from the exported settings.