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.
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:
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’
Updater Source Code: https://github.com/mstinaff/PMS_Updater
Updater Instructions: https://www.ceos3c.com/freenas/manually-update-plex-freenas/