How to Set Up TrueNAS Scale to Host Plex – TechMikeNY
Back To Top

RECENT ARTICLES

Another Use for a Raspberry Pi: Pimoroni Enviro + Air Quality Setup Guide

Another Use for a Raspberry Pi: Pimoroni E...

Fri, May 31, 24

  Here at TechMikeNY, we love Raspberry Pis. And as you know,...

Setting Up a RAID 1 Virtual Disk in UEFI

Setting Up a RAID 1 Virtual Disk in UEFI

Wed, May 22, 24

It's a bird, it's a plane, it's... another RAID tutorial from TechMikeNY?...

How to Configure a BOSS Card: Setting Up RAID

How to Configure a BOSS Card: Setting Up RAID

Wed, May 15, 24

If you don't have fault tolerance for your OS and your drive...

Upcycling Projects: Turning a Chassis Into a Planter

Upcycling Projects: Turning a Chassis Into...

Mon, May 06, 24

As you may know, TechMike’s office is practically a jungle at this...

VIEW ALL

How to Set Up TrueNAS Scale to Host Plex

How to Set Up TrueNAS Scale to Host Plex


If you’ve been thinking about setting up a centralized media server of your own, there’s a good chance you’ve come across Plex, a media server software that allows you to organize, stream, and access your personal media collection across various devices. To set up Plex, you need a reliable, high-performance hosting solution. That’s where TrueNAS Scale comes in.

TrueNAS Scale is a powerful free network-attached storage (NAS) with an easy to understand graphical user interface, making set-up a relatively intuitive process. In this guide, we’ll walk you through the process of installing and configuring TrueNAS & Plex so you can have your media server running in no time.

Set-up checklist: 

 
  • An internet connection.
  • good desktop to install and run TrueNAS Scale on. According to the TrueNAS Website, TrueNAS SCALE can run on any x86_64 compatible (Intel or AMD) processor, but it requires at least 8GB of RAM (more is better).
  • A 2nd desktop to access TrueNAS WebUI and Plex.
  • A boot device; according to Plex, you’ll want to use at 20GB Boot Device at minimum.
  • A Plex account. You’ll need to have one set up in order to install Plex.

    Author's Note 06/2024: This tutorial has instructions for the Bluefin version of TrueNAS Scale; newer version updates have changed the way that TrueNAS Scale handles shares and app interactions. TechMikeNY will share a new tutorial for the updated process.

Why use a desktop for a media server?

Due to their ease of setup and space efficiency, using a desktop is the way to go when setting up Plex on TrueNAS. Unlike rack servers, desktops are compact, fitting well in home or small office environments; you might not want a full rack in your TV room. They also require minimal technical expertise, featuring user-friendly interfaces and straightforward installation processes, so after it's set up, it's something the whole family can use. (If you want them to.) Plus, desktops are definitely going to be the quieter option, so they won’t interrupt movie night.

Importantly, desktops also offer reduced energy consumption. Media servers generally need to be turned on all the time, and using a desktop instead of a rack server definitely saves power (and your electricity bill). Desktops also happen to excel in heat dissipation, thanks to their advanced cooling technologies. That means better performance and longer-lasting components. Essentially, setting up your media server on a desktop is the more efficient, sustainable choice.

Downloading and Installing TrueNAS

  1. Download the latest version of TrueNAS Scale from https://www.truenas.com/download-truenas-scale/.

  2. Using something like Balena Etcher, Rufus, or Ventoy, make a bootable installer. Boot the installer on the desktop/server you plan to install TrueNAS & Plex. In this tutorial, we used Ventoy.
    Here's a great tutorial we found on how to use Rufus to make a bootable installer.



  3. After the loading dialogue, select Install/Upgrade from the options presented.  Choose where you want to install TrueNAS from the list of available drives.

    Step 3.2


    You can choose 2 identical drives, if you are able to sacrifice 2 drives, to use in a Mirror configuration. That way, if one drive fails, you have a backup that can take over. Not necessary, but recommended.

    3.3


    Press YES to acknowledge that all data on the chosen drives will be erased before installing TrueNAS.

    Step 3.4


    At this point, you’ll be asked to choose how you’ll want to log in when the TrueNAS WebUI comes up. In our case, we used  “Administrative user”.  “Administrative user” will be quickest to get you going; you can set up other accounts later. Or, if you’d prefer to save setting up the admin account for when you eventually load up the TrueNAS WebUI, hit  “Configure using WebUI”.        

    Step 3.3


    Unless you’re low on RAM (think less than 32GB), you don’t need a swap partition, so select “No swap” when prompted to create a swap partition.

    The install will begin.

  1. Step 4


    Once the install is complete, reboot, and remove the installation device.

  1.  
    Step 5

    On boot, it will ask which version of TrueNAS to boot. Press Enter or just let it boot automagically. (It’s preset to boot the version we just installed. The list is just there in case you want to boot a previous version after installing updates in the future.)


Creating Pools


Once TrueNAS boots, you’ll be able to head into the WebUI to get TrueNAS ready to host Plex. The first step will be creating pools within TrueNAS.

A pool is a logical storage construct in TrueNAS that combines multiple physical drives into a single entity. Pools enable you to allocate drives, configure redundancy options like mirroring, and create datasets for organizing and managing your files and data. In this case, we’ll be creating datasets specifically intended to store media files and configuration files for Plex.


  1. Step 6

    As soon as the boot process is complete, you’ll be presented with the IP address to access the WebUI and some options for configuring things locally if you need to (optional). Otherwise, use your second device to head over to a Web browser like Chrome or Edge (or OperaGX if you’re fancy).

    You don’t need to type the port numbers in the address bar when trying to get to the WebUI, just the IP address.

    Niche note: If you've disabled DHCP, the IP address will not show here.



    Once you enter the displayed IP address into a web browser, the WebUI login page will be shown. Log in again to access the dashboard.



  1. From the dashboard, we need to create some pools with the other drives we have in the system. Select Storage on the left, and click “Create Pool”.

     A menu showing the other drives available in your system will appear. Name the pool whatever you’d like. (We chose to name it Tank.)

    Adding a Drive to the Pool

    Check the box by the drive(s) you’d like to add to the pool, and hit the arrow to add it to the pool.

    If you only have one drive to use for your Pool (as shown here), check the “Force” box at the bottom left and accept the warnings that pop up.

    Click Create Pool to finalize.


Security note on setting up the pool: To avoid data loss, it’s recommended to at least do a mirror of 2 identical drives when setting up a pool (in case one fails).

Additionally, if you want your entire pool to be encrypted, you must check the encryption box at this stage during the pool creation process. You will later be able to choose whether or not you want your child datasets encrypted, but you won’t be able to encrypt the entire pool if you don’t do so here.

Setting Up Datasets


Once the pool has been created, we need to set up two datasets on that pool. One will be a designated space for your media, and the other will hold the configuration files for Plex.




  1. Select the Datasets option on the left. Then click on the dataset for the pool you’re setting up (for us, Tank Dataset), and hit “Add Dataset” at the top right.

    Child Dataset
    Name the child dataset “Plex Config” (or something that will help you remember it’s your Plex Config dataset) before you hit Save at the bottom. You can even add a description, if you want.

    Repeat the process to create another child dataset, this one designated for media. We were really creative and named ours “Media”.



  1. Next, you’ll need to set up an SMB Share. From the “Shares” section on the left, click “Add” (located next to the “Windows (SMB) Shares” section), and set the path to point towards your “Media” dataset.

    Name the share and click “Save”. Check the box to start the SMB Service on TrueNAS automatically and click the "Enable Service" button. You'll then be taken to a screen to edit the dataset's Access Control List (ACL). You can customize the ACL configuration if you wish, but the preset configuration works as well. Scroll down and select "Save Access Control List" to continue.


ALTERNATIVE METHOD:  
If you don’t want to set up an SMB share, a simpler way of getting your media to “Media” is by installing and using File Browser within TrueNAS. File Browser is a web-based file manager app. In our case, we would use it to add media to “Media”.

For more on how to set up and use File Browser within TrueNAS, check out this helpful video.

Installing and Configuring Plex


Now you’re ready to install Plex! Well, almost;  you need to have a Plex account set up and ready before proceeding. (Here's how to create an account.)



  1. Start by heading over to the “Apps” section.  The apps will need a pool to install to, so click “Choose Pool” and select the pool that you just set up. Doing so will create a dataset for all your installed apps called ix-applications.




  2. Before you can point Plex towards the dataset you want to store your media in, you’ll need to disable host path validation. To do so, select “Advanced Settings” from the “Settings” drop down and disable “Host Path Safety Checks”. (Otherwise, TrueNAS will block you from sharing the dataset using SMB, which you need to do in order to upload media.)

    If it’s not automatically filled in, make sure that Route v4 Interface is set to the port that you have your cable connected to and that Route v4 Gateway is set to your router’s IP address.

    Save your settings to continue.


    In case you’re curious, here’s an explanation of the host path validation feature and why it's recommended to disable it.

 


  1. Step 12

    Select the “Available Applications” tab and search for Plex. Once it comes up, hit Install.

  2. You’ll be presented with a side window to configure the App.



    Enter the Claim token for your Plex Account available at plex.tv/claim. If you’ve paid for a Plex Pass, check that box.

    13.2
    Scroll down to the Storage section of the menu and check the boxes for “Enable Host Path for Plex Data volume” and “Enable Host Path for Plex Config Volume.” Then, point the Data volume towards the designated “Media” dataset you created during set-up & point the Config volume towards the designated “Plex Config” dataset.

  3. Moment of truth. Once everything is all set, double check that you’ve entered your claim token correctly and click Save to install the app and deploy it.

Setting Up Your Library


When Plex says it’s Active under the “Installed Applications” tab, you’ll need to log into the Web Portal to set up your library.



  1. Click the “Web Portal” button and log into Plex. Once you’re logged in, click through the introduction, name your Plex server, and enable remote access if your network allows for it.



    You’ll be prompted to set up your library. Choose the type of library that corresponds to what you’ll be using your server for (ex. Movies, TV Shows, Music), name it whatever you’d like, then point it to the “data” directory on the next step.

  2. To finish up, connect to the “Media” SMB share we set up in step 14. We found that you need to create a new local user in TrueNAS to be able to log into the SMB share; you can do so by going over to Credentials, then Local Users, and then hitting Add. Once you’ve added your new user, all you have to do is map the SMB share you created to the device you’ll be uploading media from.

And you’re all done. Congratulations! You now have a centralized media server. Feels good, right?

 

We hope you’ve found this guide for setting up Plex on TrueNAS helpful. If you have any questions, don’t be a stranger – drop us a line in the comments below or at info@techmikeny.com.

 9 comments

  • Hey Aaron,

    To get your GPU recognized for transcoding, you’ll need to select the GPU in TrueNAS and turn on hardware transcoding in Plex. To do that:

    1. Select Plex from your list of TrueNAS apps and edit its config. This will look different in different versions of TrueNAS.
    1A. If you’re using “Cobia”, clicking the “Apps” button on the left side will pull up a list. Find Plex on the list, look in the box labeled “Application Info”, and select “Edit”.
    1B. If you’re on “Bluefin”, the “Apps” button will take you to a screen of apps. Once you find Plex, click the 3 dots in the top right corner its little box, and select “Edit”.    

    2. Scroll down until you see “GPU Configuration”.
    3. If the section doesn’t have the “Select GPU” dropdowns, you’ll need to click “Add”.
    4. Click the drop down to select the type of GPU you’re using. Select “Allocate 1 xxxxxxx/xxx GPU”. (xxxxxxx/xxx being your brand of GPU.)
    5. Once you’ve selected your GPU, click “Save”, and wait for Plex to deploy.
    6. After Plex has deployed, hop into Plex settings in the WebUI and select “Transcoder”.
    7. From the Transcoder settings, find the checkbox that says “Use hardware acceleration when available”. Check that box to turn on hardware transcoding. (The checkbox will be the setting directly below the “Transcoder quality” dropdown.) 8. Remember to hit “Save” to apply the change.

    And you should be all set. Once you configure your GPU in TrueNAS and turn on hardware transcoding in Plex, you’ll see “(hw)” written at the end of the stream data.

    If you’re using a Nvidia GPU for transcoding, you can see if it’s being utilized by Plex when you have a stream playing that’s being transcoded. To do that, you can use the “nvidia-smi” command in the TrueNAS shell. (More on that here: https://developer.nvidia.com/nvidia-system-management-interface.)

    Hope that helps!

    TechMike
  • I’m struggling with this type of setup on Truenas Scale as I’m trying to get a GPU recognised for transcoding. I’m not seeing any provision for this in the setup. Have you been able to pull this off?

    Aaron
  • Thanks for sharing! Yes, the fix in that Reddit thread will work; as we mentioned in Step 11, you’ll need to make sure that the top fields are correctly filled out when you go to disable host path safety checks in “Advanced Settings”, aka “Kubernetes Settings”. (This also includes selecting “0.0.0.0” from the “Node IP” dropdown.) Otherwise, if your port forwarding isn’t set up properly, Plex will not be able to see the server remotely.

    TechMike
  • In order to see my server from app.plex.tv and also use the mobile apps, I had to change the settings in Plex and the apps settings in Truenas apps (interface and gateway fields) like explained here: https://reddit.com/r/truenas/s/h1irnAB2Fm

    Michel
  • Hey Logan, 

    Thanks for your question. Start by making sure that “Plex Data Volume” and “Plex Config Volume” settings for Plex are pointing to the correct datasets (see step 13). If that’s all set properly, you may be running into one of a few things. 

    We found that in order for Plex to recognize our media, we had to create subfolders for each individual piece of media and give the subfolders whatever name we wanted the media to appear as in Plex. 

    If it’s a folder structure issue, here’s what you can do: Let’s say you want to add Jaws to Plex, for example. Your structure would need to be Media > Movies > Jaws > Jaws.mkv. If you want it to show up as, say, “Scary Shark Movie”, your structure could be Media > Movies > Scary Shark Movie > Jaws.mkv. (Note that changing the folder name will also change what Plex searches for to populate the movie info/poster.) 

    Now, if that doesn’t solve the problem, then it may have to do with the permissions for your Media dataset. To check what your permissions are set to, go into the “Datasets” menu on the left, select your Media dataset, and click “Edit” on the permissions box. First, double check that Owner is set to “apps” for both User and Group. Then, make sure that the “Read”, “Write”, and “Execute” permission boxes are checked for both User and Group. 

    Let us know if you need help with anything else!

    TechMike

Leave a comment

Name . . Message .

Please note, comments must be approved before they are published