This guide talks about how to install Plex on Synology NAS, configuration and enforce HTTPS on portal.
- Download Plex Package. Go to https://www.plex.tv/media-server-downloads/ and choose Synology and Intel 64bit package if you are running latest DSM
- Manually install the package through Synology DSM package center. (choose the downloaded .spk file in Synology DSM package center. And all next to install the package. Probably it will prompt to allow necessary ports at the end of the installation. Allow them or do what you know to do)
- Once installed, open a browser to access http://NAS-IP:32400/web to configure the Plex Media Server. If you are using Chrome or Firefox with strict certificate verification, this has to be http not https if you’ve already configured Let’s Encrypted SSL certificate for Synology DSM following this article. Otherwise, you will fail to connect through https. I will explain how to make https work later.
- Following the steps of Plex initial configuration.
- Register a Plex account (go to https://www.plex.tv/sign-up/?forward=web) and please remember your username and password.
- Go back to Synology DSM, Create a new Sharefolder and grant user ‘plex’ read/write access to it.
- Create Different folders under that Sharefolder, such as Movie, TV Show, Music to manage your media files properly.
- You can also use the Synology System Default Sharefolder (video) when use VideoStation or Synology MediaServer. But need to modify the Sharefolder permission to allow read/write for user ‘plex’.
- Copy some testing movies/music into those folders.
- In the Plex web configuration page, add media library one by one. Eg. map Plex Movie to Synology new created Movie folder, map TV Show to Synology TV folder.
- If you concern about security, no need to enable ‘remote access’ or you can enable ‘remote access’ but not expose the port to Internet directly from your home edge router. Plex can still work in relay mode. Port forwarding is not mandatory required.
- Other Plex configuration is based on your needs and situation, just pay attention to language and location setting to better recognise movie metadata and subtitles
- Enable Plex web HTTPS to secure the access.
- In Plex network configuration tab, the https certificate requires P12 format which increases the additional work for Synology user.
- If you follow this article to obtain and implement Let’s Encrypt certificate for your DSM, then you need to convert pem certificates files to P12 format.
- Create a script file to do this job under /volume1/Plex/scripts/SynoPlexP12Renew.sh (Just download the script from github link and store it on NAS)
- Modify the above scripts with customised folder directory. ‘script_folder=’
- Randomly type a P12 cert password for further use ‘p12cert_password=’
- Point the Synology Let’s Encrypt certificate path. ‘letsencrypt_cert_folder=/usr/syno/etc/certificate/_archive/PATH/’ if you following my previous article.
chmod +x /volume1/Plex/scripts/SynoPlexP12Renew.shto give it privilege to execute
./volume1/Plex/scripts/SynoPlexP12Renew.shto test the script. It should convert the pem cert file into p12 and stored under /volume1/Plex/scripts/
- Copy the P12 cert path ‘/volume1/Plex/scripts/’ and the P12 cert password you defined in step #5.5 and your DSM HTTPS domain Common name.
- You are ready to go!
- Fix the Plex Media Server always shows in Remote mode even the server and control device are in the same network
- This is due to DNS rebind feature that prevents plex.direct domain callback.
- Follow the later part of the post https://support.plex.tv/articles/206225077-how-to-use-secure-server-connections/ to whitelist DNS rebind protection on your router or other DNS server.
- If you use Pi-Hole with unbound recursive DNS, you need to add a line
private-domain: "plex.direct"in unbound configuration file
rebind-domain-ok=/plex.direct/in Pi-Hole dnsmasq configuration file.
- You also need to pay Plex to get some features unlock for better use.
- If you just use AppleTV to stream NAS video/audio, it’s free
- If you use laptop browser to stream NAS video/audio, it’s free
- If you stream NAS audio to SONOS, it’s free
- But if you need to use mobile device, such as iPhone/iPad to watch NAS video, listen NAS music, it is locked for 1 min, you have to pay Plex and Apple to get the In-App purchase unlocked.
- If you decide to purchase Plex Pass, then the mobile device activation is already included. No need for double payment.
Anything unclear or not working just leave comments. I hope this article helps you.
I think Plex is a good media server solution that can totally replace Synology native VideoStation and AudioStation. US$5 to unlock device activation is affordable.