• Views Views: 4,408
  • Last updated Last updated:
  • Stop using Chrome! Download the Brave Browser via >>> []
    It's a forked version of Chrome with native ad-blockers and Google's spyware stripped out! Download for Mac, Windows, Android, and Linux!
Welcome to the
Serving the Community since 2016!
Register Now
  • Sub-pages:

    Plex Media Server


    Plex... the main reason we are here. 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 all here. Starting off with a simple collection is rather satisfying, but then you start realizing that you're running out of drive space, running RAID, and now trying to push things to the cloud (or not). You're not content with the basic streaming services and the cable company has you boxed in! That's where Plex comes into play! Before running Plex, it's a good idea to conducted some basic planning. Is the server powerful enough? How much disk space is available? Is the server be cost effective for one's needs?


    Access Information

    Traefik**plex:32400Only for Internal App-to-App Communication
    httpsplex.domain.comTraefik must be Deployed; Remote Servers Security Practice - Stop with PG Port Guard
    httpipv4:32400Ideal Only for Local Servers


    Installing Plex

    Welcome to the crossroads! When installing Plex, you will be asked if you are installing on a remote or local server. 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!


    Plex Local Edition

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


    Here, you 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.

    Plex Remote Edition Edition

    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.

    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).

    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.

    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. Please connect Radarr and Sonarr to plex in the connect settings page inside of Radarr/Sonarr to enable autoscans!

    Remote Access

    Via Port 32400 without a domain

    Enable remote access to access your Plex Server.

    With a domain -

    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:

    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 out (or copy & paste), but do not select it (loading may take forever)


    • /pg/unity/tv
    • /pg/unity/movies
    • /pg/unity/mycustomcategory


    • /mnt/unionfs/tv
    • /mnt/unionfs/movies
    • /mnt/unionfs/mycustomcategory
    ** Add Picture
    Press [ENTER] and everything will start to come up!

    Library Settings

    Goto > Show Advanced settings

    Plex Library SettingValue
    Scan my library automatically☐ Unchecked
    Run a partial scan when changes are detected☑ Checked
    Custom server access URLs☐ Unchecked
    Scan my library periodically☐ Unchecked
    Library scan intervaldaily
    Empty trash automatically after every scan☐ Unchecked (recommended until you are stable)
    Allow media deletion☑ Checked
    Generate video preview thumbnailsnever, not recommended to enable, will cause 24hr bans
    Generate chapter thumbnailsnever, not recommended to enable, will cause 24hr bans
    Analyze audio tracks for loudnessnever, not recommended to enable, will cause 24hr bans
    Location visibilityadmin only

    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
    In Portainer - add the /dev/dri as a resource to the plex container:

    Containers->Plex->Duplicate/edit->Runtime & Resources->add device-> host: /dev/dri container: /dev/dri -> Deploy!

    That updates the driver now that it can get to the files outside the container. Also plex has access to the iGPU drivers.

    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.)

    Additional Notes

    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!
  • Loading…