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.
- An internet connection.
- A 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.
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
- Download the latest version of TrueNAS Scale from https://www.truenas.com/download-truenas-scale/.
- 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.
After the loading dialogue, select Install/Upgrade from the options presented. Choose where you want to install TrueNAS from the list of available drives.
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.
Press YES to acknowledge that all data on the chosen drives will be erased before installing TrueNAS.
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”.
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.
Once the install is complete, reboot, and remove the installation device.
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.)
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.
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.
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.)
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.
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.
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”.
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.)
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.
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.
Select the “Available Applications” tab and search for Plex. Once it comes up, hit Install.
- 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.
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.
- 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.
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.
- 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 firstname.lastname@example.org.