TrueNAS: Update Plex Server

Updating your Plex Media Server installed on your TrueNAS server is important to keep up with the latest offered features and bug fixes. This article will show you how to update your Plex media server on your TrueNAS install to the latest build as well as show you how to automate that update process should you wish. This will ensure you can continue to use Plex as your digital media player and organizational tool to access the music, pictures, and videos stored on one computer with any other computer, set top device or compatible mobile device. This article assumes that you have already installed Plex into a jail by following my TrueNAS: Plex Manual Install article and that jail is up and running and that you have shell access to it.

This is part of my ongoing series of TrueNAS and FreeNAS setup, configuration and install articles.

Install PMS Updater

After following my TrueNAS: Plex Manual Install article you have probably noticed 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. So we need to install a little program called PMS Updater. So lets go ahead and get that installed.

From the shell within your Plex jail, we will first need to install some of the dependencies with the following commands:
pkg install wget
pkg install ca_root_nss
pkg install perl5

Now we can download the PMS Updater with the following commands:
mkdir /usr/local/PMS_Updater
cd /usr/local/PMS_Updater
wget https://raw.githubusercontent.com/mstinaff/PMS_Updater/master/PMS_Updater.sh

Now we can run the updater to get the latest Plex update and the syntax is as follows:
sh PMS_Updater.sh -v -a

Previous Versions of PMS Updater
Previous versions of the updater required username and password. If you’re following this guide you should have the latest version, but if you need it the syntax for previous versions, including how to use an username and password stored in a file can be read in the previous version of this article: FreeNAS: Manual Install and Update of Plex Media Server

Automate PMS Updater and Setup as a Cron job

So dropping to command line to update your Plex Server every time is a bit of a pain. So we can work towards automating this a little bit and to do that we will setup a Cron Job using the TrueNAS web interface.

There are two ways you can choose to use the Cron Job. First, you can just have it setup an you can manually run it without a schedule and whenever you notice an update is needed, or if you’re one of those people who (like me) likes to wait a few weeks before any kinks get ironed out of updates. This way you would have to navigate to the Cron Job menu in the web interface to run the job, but you wouldn’t have to drop to command line an remember the syntax. The other way is you can have this set to run a certain time every day, week or month. If there are updates, they would download and get installed automatically without any intervention from you.

Either way, to set this up, you need to go to Tasks -> Cron Jobs and add a new job. Enter the following into the command field, where [jailname] is the name of the jail you’ve created:
/usr/local/bin/iocage exec [jailname] /bin/sh /usr/local/PMS_Updater/PMS_Updater.sh -v -a

In this dialog box, you will have to enter a name for your Cron Job and select a user with sufficient privileges to run it. If you do want it scheduled to run automatically select a schedule and be sure the enable box is checked. If you want to run in manually, but sure that the enabled box is unticked.

Alright. That’ it. I told you it was pretty simple. Happy Plexin’

~Raze

Sources:
Updater Source Code: https://github.com/mstinaff/PMS_Updater
Updater Instructions: https://www.ceos3c.com/freenas/manually-update-plex-freenas/


13 thoughts on “TrueNAS: Update Plex Server

  1. I am getting an error message that says “version FBSD_1.6 required not found” when I get to the part where I install the PMS Updater. Is there something else I need to do?

    Like

    1. I am getting the same issue with FreeNAS 11.3 and the most recent version of transmission in a jail for digiMoot’s article on “FreeNAS: Add VPN Connection to a Jail”.

      Like

  2. Great little guide and script – have this running on a TrueNas Core 12.0-U2.1 jail with no issues.
    I found that despite setting my FreeBSD.conf manual script to ‘latest’ Plex was still out of date but this nicely fixes this and then can manually sort via the cron job as needed later. It also didn’t seem to mind that my Plex data etc is mounted outside my jail as well which was good.
    Thanks for the great work.

    Liked by 1 person

  3. I ran the update today and now my plex isn’t working. I had run this previously and had no issues. Any ideas? I am new to DSB.

    Like

  4. Hello,

    so far the cron job for the automated update of the Plex server has always worked flawlessly. After the update to the TrueNAS version TrueNAS-12.0-U3.1, the cron job no longer works and the following error message is displayed:
    ImportError: No module named site
    Command: / bin / sh /usr/local/PMS_Updater/PMS_Updater.sh -v -a failed!
    The manual update, however, can still be carried out. Anyone have any idea what the problem is?

    Like

    1. I get the importerror even when running manually since the update to u3.1…seems to be a python problem, I’m not a bsd guy, so unsure how to resolve

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s