Skip to content
Admin9705 edited this page Mar 5, 2019 · 100 revisions
WANT TO HELP? CLICK THE ★ (STAR LOGO) in the Upper-Right!

  • 📂 [Click Here] - Google G-Suite (Unlimited Hard Drive Space & Storage)
  • 📂 [Click Here] - Top Performance NewsHost! - Blitz Members Receive a 58% Discount

Reference Shortcut - | Discord ( !plex )

Table of Contents

  1. Intro
  2. Access Information
  3. Installing Plex
    1. Plex Local Edition
    2. Plex Remote Edition
  4. Configuring Plex
    1. Remote Access
    2. Accessing Content
    3. Optimization
  5. Configuring Hardware encoding
    1. Background and quick check
    2. CPU support for HW encoding info
    3. Host driver setup and install
  6. Summary

1. Intro

Plex... the main reason we are. Easy to set up? Ya. Complications at times? Ya. So "what does Plex do for me" you ask? Think of Plex as having your own version of Netflix, but rather through the files that you already own. Plex can be addictive, which is why we are both here. Starting off with a simple collection is rather satisfying, but then you start realizing that you're running out of drive space, running RAIDs, and now trying to push things to the cloud (or not). You're not contempt with the basic streaming services and the cable company has you boxed in! That's where Plex come into play! Before executing Plex, you have conducted some basic planning. Is the server powerful enough, how much disk space is available, and how can the server be cost effective for one's needs?

Demo Example of Running a Plex Server

2. Access Information

Protocol Address Notes
traefik** plex:32400 Only for Internal App-to-App Communication
https Traefik must be Deployed; Remote Servers
http Poor Security Practice - Stop with PG Port Guard
http ipv4:32400 Ideal Only for Local Servers

** Ideal for Apps to communicate between with one another. Click Here for more info!

3. Installing Plex

Welcome to the crossroads! When executing Plex to install, you will be presented with a question in order to install either the remote or local edition. This part is important because it will affect in how you will be able to claim your Plex Server. If you select the local edition, you will easily be able to claim your Plex Server, whereas the remote setup will allow you to claim your Plex Server through an IP address. So please, select the correct one!

I. Plex Local Edition

Installing the Plex Local Edition is simple. Once installed, you will see the following message.

Plex Local Edition

Here, you will simply visit your local IP address and you should see Plex asking for you to login. Once logged in and your able to claim your server, you are pretty much good to go! If your intent is to share out your server or utilize your server beyond the range of your home (or that of your local server), make sure to turn on your remote access. If you are unable to see your server outside of your local location, pay attention to tips provided. Anything beyond that, please visit our forums or the Plex Forums to resolve your issue.

II. Plex Remote Edition

a. PG YouTube: Remote Setup

Plex Remote Setup

b. Remote Setup Info

Installing the Plex Remote Edition is a-bit more involved, but easy to do if you follow the provided steps. Before Plex Deploys, you will see a screen that will ask about your Plex ID. Visit and claim your Plex Server Code and paste and press enter within the terminal window.

Plex Claim Ask - Terminal

Now that you entered your code, PG will prompt you with some more information. You will need to visit: IP Address:32400/web. Do not forget the /web (if you do, you may see some Plex XML garbage and will start to ponder how to ask us a 1000 different ways to access your server).

Ensure to follow the steps as listed to ensure that your able to access your server. It is recommended that if you are having issues, test out with a second device and see if you can access PLEX. Personally, it has been witnessed that PLEX will say your server is not able to get out and then with your phone, you can see it.

4. Configuring Plex

This is the fun part! We'll tackle this portion in two ways. First, we will configure Plex to access your content and then the second part will be in regards to optimization.

I. Remote Access

You can safely disable plex's built in remote access and still access it via your Disable remote access:

Then under network settings, click show advanced at the top. Then add your plex domain

II. Accessing Content

In the use of all PlexGuide editions, you will access your content as shown below. The best recommendation I can tell you is not to select your location, but rather type it. Here are some examples below:

Type it, do not select it

  • /mnt/unionfs/tv
  • /mnt/unionfs/movies
  • /mnt/unionfs/mycustomcategory

Type it, do not select it

Press [ENTER] and it will come up!

III. Optimization

  • Configure what you need, there is one important area.
  • [Click] Server > Show Advanced > Library
  • [Turn On] Update my library automatically
  • [Keep-Off] Run a partical scan...
  • [Keep-On] Include music libraries...
  • [Keep-On/Off] Update my library periodically (your if you have update automatically)
  • [Select] Library update interval: Every hour (for huge libraries, every 2 is better)
  • [Keep-On] Empty trash automatically after every scan
  • [Click] Server > Show Advanced > Scheduled Tasks
  • [Turn/Keep On] Backup database every 3 days
  • [Turn/Keep On] Optimize database every week
  • [Turn/Keep On] Remove old bundles every week
  • [Turn/Keep On] Remove old cache files every week
  • [Turn/Keep On] Refresh metadata periodically
  • All the Rest; keep unchecked.

5. Configuring Hardware Encoding

NOTE: You MUST have Plex Pass to enable hardware transcoding in the Plex server. See Using Hardware-Accelerated Streaming from the Plex site.

Background/quick check:

This assumes your server has a CPU with iGPU or GPU that can do hardware transcoding. If you do, and the drivers are already installed, then the fix to get it working inside the Plex Docker container isn't too difficult.

Bottom line up front: If the hardware and drivers aren't installed on the host, it won't work inside the Docker container. If they are, I'll show you how to ensure they're available inside the Docker container as well.

You can do a quick check to see if the drivers are already installed by "ls -la /dev/dri"; you should see something for "card0" and "renderD128" if they are. --If you have multiple GPUs, including an integrated (iGPU) and a discrete (i.e. nVidia or AMD) you'll probably see additional files labeled "card1" and "renderD129". This won't matter, but we also will only use one card. If the driver files don't exist you'll likely get an error saying the directory doesn't exist, or maybe drivers for other non-GPU/iGPU devices. That's fine - the "Host Install" sections will show you how to "activate" them. If they are, and you're sure, you can skip the next part in between the dashed lines and move to how to enable inside the Docker container.

CPU support info

Does my Intel CPU include an iGPU capable of Quick Sync?

Most "desktop" class CPUs from Intel starting with the second series (i.e. "Sandy Bridge" or the 2500/2600 CPUs) have an iGPU that is capable of at least h264 hardware transcoding.

  • The Sandy Bridge (2xxx series) through Haswell (4xxx) series don't have great quality when hardware transcoding h264 - but they do work.

  • Skylake (6xxx) and higher will even do h265/HEVC.

  • Kaby Lake (7xxx) and higher will do h265/HEVC with HDR/10bit video.

Skylake and higher look GREAT when using hardware encoding - virtually indistinguishable in quality from CPU encodes, but with 5% of the CPU usage.

I have a Xeon - will it work? Some Xeons do have iGPUs. Notably those that end in a "5" or "6".

How can I confirm? Fast check: Intel's Quick Sync capable CPU search page Search for your CPU.


Wikipedia's table for Intel Quick Sync hardware encoding and decoding by Intel family For example, using a Xeon E5-1650v3. Look for the E5-1650v3 series. This is a "Haswell" class CPU, but it was sold as a workstation CPU so note there is no "Graphics Clock Rate" column, because they didn't have iGPUs. (They also didn't come with heatsinks, as the users were expected to add discrete GPUs and their own heatsink.)

Host Install

(Specific instructions and examples below are for a Hetzner dedicated server however much is useful for others as a guide):

For Hetzner server users, the following is how to get the drivers and capability installed on the Linux host.

  • Comment out all line referencing i915 in this file: /etc/modprobe.d/blacklist-hetzner.conf

    • sudo nano /etc/modprobe.d/blacklist-hetzner.conf
    • Add a # in front of the lines "blacklist i915" and "blacklist i915_bdw"
    • # blacklist i915
    • # blacklist i915_bdw
  • Remove Hetzner's default grub config "nomodeset" which blocks loading of video card drivers:

    • Ubuntu 16 or earlier: nano /etc/default/grub.d/hetzner.cfg or
    • Ubuntu 18.04 or later: nano /etc/default/grub
    • comment out GRUB_CMDLINE_LINUX_DEFAULT="nomodeset" (it's okay if it also has consoleblank=0 at the end."
    • # GRUB_CMDLINE_LINUX_DEFAULT="nomodeset consoleblank=0"
  • Update and Reload grub.

    • sudo update-grub
    • For older Ubuntu try sudo grub-mkconfig -o /boot/grub/grub.cfg
  • Add user root (or whoever is the user running the Plex service) to the video group:

    • sudo usermod -a -G video root
  • Reboot the server

  • Try ls -la /dev/dri now it should find the folder and list drivers

  • Type chmod -R 777 /dev/dri to change permissions (critical step for use in Docker!)

  • I recommend installing and running vainfo and ensure it gives you a positive readout on your driver

    • sudo apt update
    • sudo apt install vainfo
    • vainfo
      • You want a line similar to "vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Server - 1.7.0" somewhere in the 18-20 lines it puts out.

Note: If VAINFO works, it's almost a sure bet you'll be able to get the Docker Plex to work. However, as long as the /dev/dri folder with the two driver files are there, you're probably okay even if running VAINFO throws an error.

Getting it working (optimally) inside Docker.

The following updates to the Plex Docker container are not strictly necessary - but recommended.

You'll need to run the following commands from the HOST (to make it easier for you):

  • docker exec plex apt-get -y update
  • docker exec plex apt-get -y install i965-va-driver vainfo
  • docker restart plex

That updates the driver now that it can get to the files outside the container.

Additional tips/tricks:

The following command should give a succinct info read on your iGPU:

GPU=$(lspci | grep VGA | cut -d ":" -f3);RAM=$(cardid=$(lspci | grep VGA |cut -d " " -f1);lspci -v -s $cardid | grep " prefetchable"| cut -d "=" -f2);echo $GPU $RAM

For example, on one of the dedicated servers I use (an Intel Xeon E3-1246V3), the output is: Intel Corporation Xeon E3-1200 v3 Processor Integrated Graphics Controller (rev 06) 256M

However on a non-dedicated VPS I use the output is: Cirrus Logic GD 5446 32M (Yeah...the emulated Cirrus Logic isn't going to work for hardware encoding.)

6. Summary

Keep in mind to monitor your Plex Server at times. Ensure that you always have enough diskspace for transcoding and keep in mind that if your server is distant, many of your issues can be related to one common medium known as the Internet (slow downs along the way). Best of Luck!

Useful Starter Links

  1. Introduction
  2. Blitz YouTube Channel
  3. G-Suite Signup
  4. Recommended NewsHosts

Prior Planning 101

  1. Recommended Pre-Reading
  2. Server - Storage Planning
  3. Usenet or BitTorrent
  4. PG Editions
  5. PGBlitz Repos
  6. Common Issues

Deploy & Config

  1. SSH Server Access
  2. Create a SUDO User
  3. Install PGBlitz
  4. WatchTower
  5. Remote Path Mappings

Data Transport
  1. PG Clone
    1. Google OAuth Keys
    2. PG Move
    3. PG Blitz
    4. 2nd HD Option

Key Components

  1. Traefik
  2. Port Guard
  3. PG Shield
  4. PG Press
  5. Google Cloud - GCE
    1. Automated setup
  6. Hetzner Cloud
  7. PG Fork
  8. Extra PG Commands

Blitz App Info

  1. Accessing PG Apps
  2. App Port Scheme
  3. Plex to AutoScan

Tools & Services

Core Apps [Expand]
  1. Emby
  2. Jackett
  3. Jellyfin
  4. LazyLibrarian
  5. Lidarr
  6. Netdata
  7. NZBGet
  8. Ombi
  9. Plex
  10. Portainer
  11. qBittorrent
  12. Radarr
  13. RuTorrent
  15. Sonarr
  16. Tautulli
Community Apps [Expand]
  1. AirSonic
  2. AllTube
  3. Bazarr
  4. Beets
  5. Bitwarden
  6. BookSonic
  7. cAdvisor
  8. Cloud Commander
  9. DDClient
  10. Deezloaderremix
  11. Deluge
  12. DelugeVPN
  13. Duplicati
  14. EmbyStats
  15. FlexGet
  16. Gazee
  17. Gitea
  18. Handbrake
  19. Headphones
  20. Heimdall
  21. HomeAssistant
  22. HTPCManager
  23. JDownloader2
  24. jd2-openvpn
  25. Kitana
  26. Logarr
  27. MakeMKV
  28. MariaDB
  29. McMyadmin
  30. MEDUSA
  31. Mellow
  32. Monitorr
  33. Muximux
  34. Mylar
  35. NextCloud
  36. NowShowing
  37. NZBHydra2
  38. NZBThrottle
  39. Organizr
  40. pyLoad
  41. Radarr4k
  42. Resilio
  43. rflood-openvpn
  44. rutorrent-openvpn
  45. ShareSite
  46. Shoko Anime Server
  47. SpeedTest
  48. SyncLounge
  49. Syncthing
  50. The Lounge
  51. Transmission
  52. Trakt.or
  53. Ubooquity
  54. x TeVe
  55. Zammad

Misc Info & Articles

  1. Change Server Time
  2. Fail2Ban
  3. Custom Containers
  1. Scripting Area
    1. Auto Upload for Sonarr and Lidarr
    2. Auto Delete Log
    3. Plex Plugin DB Backup
    4. Plex fast BACKUP
Clone this wiki locally
You can’t perform that action at this time.