For those that have an excessively large 'C:UsersUSERNAMEAppDataLocalPlex Media Server' or related folder. This is how my Plex Media Server folder went from 60GB to 4.3GB without loosing any metadata (media images, movie position or read status) and I am posting this as I found it difficult to find the answers myself on both the Plex forums and here. Plex is like mission control for your content. With our easy-to-install Plex Media Server software and Plex apps on the devices of your choosing, you can stream your video, music, and photo collections any time, anywhere, to whatever you want. The Plex server will create a randomid.plex.tv local DNS entry. Plex clients try to access that DNS entry to have a local connection. By default pfSense blocks local DNS. Note that if Plex is installed on a remote Debian 10 Buster server, you need to set up a SSH tunnel by executing the following command on your local computer. Replace 12.34.56.78 with the IP address of the remote Debian server.
Installing Plex Media Server on your TrueNAS server (formally FreeNAS) is an absolute essential. 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 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 seperate 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
Visualgdb.
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
We will now need 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'
ORsysrc '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
ORservice 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): Shutter count nikon d3200.
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.
: ${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
ORservice 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): Shutter count nikon d3200.
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'!
~Raze
Sources:
Install Instructions: https://www.myrandomtips.com/linux/freenas/how-to-install-plex-media-server-on-freenas-11-2/
Plex magically organizes your media libraries and streams them to any device
Master your Mediaverse. Stream all your personal video, music, and photo collections, as well as your preferred podcasts, web shows, and online news, plus thousands of free movies and TV shows, to any of your devices.
Plex Local Server Not Reachable
- Magically organize all your personal media—photos, music, movies, shows, even DVR-ed TV—and stream it to any device in a beautiful, simple interface; Plex adds rich descriptions, artwork, and other related information
- Search for your favourite podcast or discover new ones through personalized recommendations. Plus: 30 second skip, variable speed playback, rich discovery, and full Plex-style support for cross-device playback status (including On Deck, so you can pick back up where you left off on any device)
- Get personalized and trusted video news from over 190 global publisher partners (and growing!), including CBS, Financial Times, Euronews, and top local news sources for over 80% of markets in the US
- Stream 1000s of FREE movies and TV shows from filmmakers around the world. From Oscar™ award-winning movies to Anime, Bollywood musicals, documentaries, family-friendly shows, and much more
- Cut the cord! Go premium with a Plex Pass and use Plex Live TV & DVR so you can watch and record free over-the-air HD TV, at home or away, like NBC, ABC, CBS, and FOX, with any supported digital antenna and tuner