Total Guide to use Plex on Synology NAS

This guide talks about how to install Plex on Synology NAS, configuration and enforce HTTPS on portal.

  1. Download Plex PackageGo to https://www.plex.tv/media-server-downloads/ and choose Synology and Intel 64bit package if you are running latest DSM
  2. Manually install the package through Synology DSM package center.
  3. 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. https://www.xfelix.com/2017/06/synology-letsencrypt-dns-01-cert-issue-and-install/ Otherwise, you will fail to connect through https. I will explain how to make https work later.
  4. Following the steps of Plex initial configuration.
    1. Register a Plex account
    2. In Synology DSM, Create a new Sharefolder and grant user ‘plex’ read/write access to it.
      1. Create Different folders under that Sharefolder, such as Movie, TV Show, Music to manage your media files properly.
      2. 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’.
      3. Copy some testing movies/music into those folders.
    3. 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.
    4. 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.
    5. Other Plex configuration is based on your needs and situation, just pay attention to language and location setting to better recognize movie metadata and subtitles
  5. Enable Plex web HTTPS to secure the access.
    1. In Plex network configuration tab, the https certificate requires P12 format which increases the additional work for Synology user.
    2. 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.
    3. Create a script file to do this job under /volume1/plex/scripts/SynoPlexP12Renew.sh
    4. Modify the above scripts with customized folder directory.  ‘script_folder=’
    5. Randomly type a P12 cert password for further use ‘p12cert_password=’
    6. Point the Synology Let’s Encrypt certificate path. ‘letsencrypt_cert_folder=/usr/syno/etc/certificate/_archive/PATH/’ if you following my previous article.
    7. chmod +x /volume1/plex/scripts/SynoPlexP12Renew.sh
    8. ./volume1/plex/scripts/SynoPlexP12Renew.sh to test the script. It should convert the pem cert file into p12 and stored under /volume1/plex/scripts/
    9. Copy the P12 cert patch ‘/volume1/plex/scripts/’ and the P12 cert password you defined in step #5.5 and your DSM HTTPS domain Common name.
    10. You are ready to go!
  6. Fix the Plex Media Server always shows in Remote mode even the server and control device are in the same network
    1. This is due to DNS rebind feature that prevents plex.direct domain callback.
    2. 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.
    3. If you use Pi-Hole and unbound recursive DNS, you need to add a line private-domain: "plex.direct" in unbound configuration file /etc/unbound/unbound.d/01.pihole.conf
  7. You need to pay Plex to get some features unlock for better use.
    1. If you just use AppleTV to stream NAS video/audio, it’s free
    2. If you use laptop browser to stream NAS video/audio, it’s free
    3. If you stream NAS audio to SONOS, it’s free
    4. 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.

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.

 

Leave a Reply

Your email address will not be published. Required fields are marked *