TrueNAS: Plex Manual Install
Installing Plex Media Server in a jail on your TrueNAS server (formally FreeNAS) is an absolute essential. Completing a TrueNAS: Plex manual install allows you to further customize the jail you’ve installed with additional programs and services such as Tautulli. Plex is a digital media player and organizational tool that allows you to access the music, pictures, and videos stored on one computer with any other computer, set top device or compatible mobile device. The Plex Media Server is the core of your PVR setup here and will provide all the media that you are ripping, downloading, etc to all of your clients. It will serve, and transcode as necessary based on the client devices requirements, all your movies, TV shows, music personal videos and more.
This article will show you how to install Plex Media Server on your TrueNAS server (formally FreeNAS) without using the standard TrueNAS plugin interface and will instruct you on how to update your install your Plex Media Server to the latest version. You may want to setup Plex after you have setup some of your automated downloading agents which you can read about how to setup in my Sonarr, Radarr, Jackett, Qbittorrent, OpenVPN.
This is part of my ongoing series of TrueNAS and FreeNAS setup, configuration and install articles.
Install Plex Media Server
This TrueNAS: Plex Manual Install article assumes that you already have TrueNAS installed and configured and you have already created a jail in which you want to run Plex. I started from a fresh jail using release 12.1-p10 which obtains a separate IP using DHCP and uses all the default jail creation options. However, theoretically there’s no reason these steps wouldn’t work with other jails.
There are two versions of Plex to install – the PlexPass version and the basic version if you don’t have a PlexPass. Go to the command line interface for the jail in which you want to install Plex and enter one of the two following commands.
If you DO have a PlexPass, use this command to install:
pkg install plexmediaserver-plexpass
If you DO NOT have a PlexPass, use this command to install:
pkg install plexmediaserver
That’s it! Plex is now installed, but now we need to configure it a bit.
Automatic Start
The next step in this TrueNAS: Plex Manual Install article is to set Plex to start automatically every time the jail starts. It’s pretty simple, all you need to do is run the following command:
sysrc "plexmediaserver_plexpass_enable=YES"
OR
sysrc "plexmediaserver_enable=YES"
The Plex installation creates a new user and a new group, both named ‘plex’. By default these are set as the user/group that would be running the Plex service. If you plan to use the default use/group then you need to make sure permissions are setup correctly within and this jail and through your TrueNAS system. I have my Plex server being run by the root user so that I can be sure that there is access to files and I am able to delete files from my Plex interface. So I edit the /usr/local/etc/rc.d/plexmediaserver
file and change:
from:
: ${plexmediaserver_user=”plex”}
: ${plexmediaserver_group=”plex”}
to:
: ${plexmediaserver_user=”root”}
: ${plexmediaserver_group=”wheel”}
Now you can restart your jail or start Plex with one of the following commands:
service plexmediaserver_plexpass start
OR
service plexmediaserver start
Access Web Interface
Once the service has started, or you jail has rebooted, you are ready to access the web interface and start setting up your Plex server and adding all your movies and TV shows! You can access the web interface at:
http://yourlocalipaddress:32400/web/index.html
Update Plex Install and Automate the Process
Once you are setup, you will probably notice that your Plex Media Server is not the latest version and is asking for an update. And you probably also notice that you are unable to update it from the web browser. It’s a bit of a pain that you can’t do an update from the browser, however there is a really simple work around. To make sure your Plex server is up to date and to automate that update process (if you want), check out the TrueNAS: Update Plex Server article.
Plex Configure Tips
This article is not meant to lead you through the setup of your Plex Server, there are other resources out there if you need help with that. However there is one challenge I found I needed to solve and you may come across it aswell:
If you have an issue with movies and TV showing up with dots in their names (i.e. with their file names, and not the name which should be scraped from the web, follow these instructions (source):
In the web interface for your plex server, go to Settings -> Server -> Agents -> Shows -> TheTVDB
. In there, grab the line ‘Local Media Assets’ with your mouse and drag it downwards, so it ends up being at the bottom of the stack of active agents. Repeat the same under Settings -> Server -> Agents -> Shows -> TheMovieDatabase
and Settings -> Server -> Agents -> Movies -> Plex Movie
and Settings -> Server -> Agents -> Movies -> TheMovieDatabase
Check and make sure this is working by refreshing the metadata on one movie and wait a couple minutes. Plex should scrape the right data and update the movie title for you.
Wait 1 or 2 minutes.
Alright! So with this you should be up and running and experiencing Plex Media Server! Make sure you update your install by reading the TrueNAS: Update Plex Server article.
Happy Plexin’!
~digiMoot
Sources:
Install Instructions: https://www.myrandomtips.com/linux/freenas/how-to-install-plex-media-server-on-freenas-11-2/
Is there a reason to not install the plex plugin instead?
If you want to combine multiple installation in a single jail, then you can’t use the plug-ins.
Ah! Thanks!
THANK YOU for this guide!
This helped me immensely
“Server settings are not available,†is the message I’m getting using the latest versions of Plex on TrueNAS. I had to drop back to version PlexMediaServer-1.22.3.4523-d0ce30438-FreeBSD-amd64.tar.bz2.
Are you running into this problem? I’m not alone, here’s a thread:
https://forums.plex.tv/t/server-settings-are-unavailable-ubuntu-20-04-1-22-1-4271/706327/104
Hm… I’m still on an older version. 1.21.3.4046.
It sounds as if for now, the solution is to stay drop back a version as you’ve identified. Thanks for sharing so other don’t have the same frustrating experience figuring this out.
Cheers,
Link to “update plex server” is broken :d (reference old WordPress scheme)
i suppose this is also true for the rest of you newly hosted articles
Thanks for letting me know. They should have been updated automatically but were not! I’ve fixed them now.
Hi ! And many thanks for sharing all that useful info !
I’ve got a nice Truenas-radarr-jackett-Plex system running, no big difficulties so far.
Apparently though, the setting of :
: ${plexmediaserver_user=”root”}
: ${plexmediaserver_group=”wheel”}
doesn’t seem to work for me, since I can still see the processes running under “plex” username.
It forced me to add plex to the wheel group for Plex to be able to discover newly imported movies by radarr.
I also have an issue that could be related to permissions when trying to run the update…I get :
…
stopping Plex server
Command: login -p -f root failed!
Console failed!
The cause could be bad permissions for /mnt/Disk1/iocage/jails/Plex/root/usr/lib
This of course interrupts the upgrade process.
Same message when I try to manually stop plexmediaserver, killing the Plex jail console at the same time.
Any insights ?
Thanks in advance,
Thierry