Are you running Plex Media Server on FreeNAS as a plugin, but don’t like waiting for the updates from FreeNAS?
PMS_Updater for FreeNAS is exactly what you need!
PMS_Updated allows you to update the FreeNAS Plex install from CLI with out waiting for the plugin updates from the devs, the updater will connect to your specified jail, download the most recent version of Plex and run the update if needed.
To do so, first we need to either access our FreeNAS console, or login via SSH. (for Windows users, check out Putty)
Once logged into your FreeNAS server, you want to determine what Jail number your Plex server is installed in, to do so execute the following
jls

You will get an output of Jails installed, choose your Plex Server. In this example mine is 1.
Our next line with log into that Jail to update Plex, so be sure to use the number from the jls command above.
jexec 1 csh
The first time you run this, you may need to install the following.
pkg install ca_root_nss
pkg install wget
pkg install perl5
Once in the Jail, we can download the PMS_Update script
fetch -o PMS_Updater.sh https://raw.githubusercontent.com/mstinaff/PMS_Updater/master/PMS_Updater.sh
Or for PlexPass use
fetch -o PMS_Updater.sh https://raw.githubusercontent.com/luluhoc/PMS_Updater/master/PMS_UpdaterPLEXPASS.sh
After the appropriate updater is downloaded, make sure to modify the permissions for the file to execute correctly.
chmod 755 PMS_Updater.sh
And then execute the script.
./PMS_Updater.sh -vv -a
You should now be on the latest version of Plex, you may need to start your Plex Server in the FreeNAS plugins page.
For a list of known issues and bugs, please check the Issues Page from the Author of this script.
At the time of writing this article (3/23/19), there are 2 known bugs with the current release.
Forcing an update when all else fails
A few times the script above has failed me, to get around I still execute the jexec for the jail I wish to update.
jexec 1
fetch -o PMS_Updater.sh https://raw.githubusercontent.com/luluhoc/PMS_Updater/master/PMS_UpdaterPLEXPASS.sh
chmod 755 PMS_Updater.sh
And I then use WinSCP to copy the install files over to the plex jail location. The installers can be downloaded from Plex.tv and choosing FreeBSD.

And then execute the following command. (Just be sure to name the downloaded Plex server files to PlexBuild.tar.bz2)
./PMS_Updater.sh -l PlexBuild.tar.bz2 -vv -a
Is there a reason the non-plexpass and plexpass appear to be the same?
I looked at the live files just now and it does appear both serve the same purpose now, with the option for “-n” for a normal Plex install rather than PlexPass.
I will work updating this doc over this upcoming weekend.
Thanks so much for this tutorial. It was easy and worked the first time (after I fixed my typo’s). You made it very easy to follow and understand. I have printed it and will refer to it whenever Plex says there is an update.
Many Thanks For A Job Well Done.
Bob Ivey
Glad to help!
Looks like the -n option doesn’t stop the correct service if you’re a non-plex pass user and that the service name is hard-coded.
root@plex:/ # grep service /PMS_Updater.sh
service plexmediaserver_plexpass stop 2>&1
service plexmediaserver_plexpass start
I worked around this by symlinking
lrwxr-xr-x 1 root wheel 15 Aug 28 15:19 /usr/local/etc/rc.d/plexmediaserver_plexpass -> plexmediaserver
and it appears to do the needful.
Thanks for the great article you saved me from waiting plugin updates and your method using WinSCP so easy than any other I have seen.
This is awesome. I tried I think an older version of this many years ago and ending up nuking my entire install, lol. I definitely want to try this however I have one concern.
I started out with the original plug in as there was no plex pass plugin at that time. But, I did end up buying a plex pass. Now I’m not sure if I should use the updater or the plexpass?
Thanks again.
Use the Plex Pass option, looking thru the code that is what it defaults to
Just an FYI, I had to Change “enabled: no” to “enabled: yes” in /usr/local/etc/pkg/repos/FreeBSD.conf in order to get access to the standard FreeBSD repository to install wget since the IOcage repository doesn’t have it.
the non-plexpass function wasn’t working properly – it kept installing to a plexmediaserver-plexpass folder, despite indicating with -n that this was not a plexpass installation. Along with what Sean said above:
lrwxr-xr-x 1 root wheel 15 Aug 28 15:19 /usr/local/etc/rc.d/plexmediaserver_plexpass -> plexmediaserver
I also symlinked the installation folder
lrwxr-xr-x 1 root wheel 15 Sep 20 22:42 /usr/local/share/plexmediaserver-plexpass -> plexmediaserver
Note lines 9&10 in PMS_Updater.sh
Does this work on a non plugin Plex install?
I haven’t tested it in that aspect, if the paths are the same I don’t see why not.
Legend – i had to do the force update approach but worked a treat – thank you!
So I installed FreeNAS/Plex about 12 months ago and added my library. I have some customizations that I don’t want to lose (ie. Sort Titles, etc).
I bought Plex Pass about 6 months ago. Should I “upgrade” to the Plex Pass version? Whats the difference? and if so, how do I save all my preferences/sort titles/etc. so I dont have to redo them all for my library.
It’s been a few years since I moved to PlexPass.
I think at the time I created a new jail and started from scratch.
I did find this article that may be off help
https://forums.plex.tv/t/how-to-migrate-from-plexmediaserver-to-plexmediaserver_plexpass/85165/3
oh my..what a script. here’s the all-in-one instruction:
sed “s/enabled: no/enabled: yes/g” /usr/local/etc/pkg/repos/FreeBSD.conf > /usr/local/etc/pkg/repos/FreeBSD.conf;
pkg update;
pkg install ca_root_nss;
pkg install wget;
pkg install perl5;
fetch -o PMS_Updater.sh https://raw.githubusercontent.com/mstinaff/PMS_Updater/master/PMS_Updater.sh;
sed “s/[_-]plexpass//g” PMS_Updater.sh > PMS_Updater_fixed.sh
#fetch -o PMS_Updater.sh https://raw.githubusercontent.com/luluhoc/PMS_Updater/master/PMS_UpdaterPLEXPASS.sh;
chmod 755 PMS_Updater_fixed.sh;
./PMS_Updater_fixed.sh -vv -a;
CHECK Up to date – in 10 seconds
I keep getting the following error:
root@plex:/ # pkg install wget
Updating iocage-plugins repository catalogue…
iocage-plugins repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching ‘wget’ have been found in the repositories
Is wget no longer an available package?
Be sure to execute jexec (#) csh prior to running the installs.
The number will be the jail number for plex when you do jls
First run jls, find the number for plex (1 for example), then run jexec 1 csh and then you should be able to do the pkg install wget
Yeah I’m getting the same error as darthmongo, definitely inside the jail yet wget is unavailable. :/
These instructions helped resolve the issue: https://www.reddit.com/r/freenas/comments/def328/cant_install_wget_into_plex_jail/
I think they changed something in their api, i’m getting this error:
Could not find a FreeBSD download link on page https://plex.tv/api/downloads/5.json?channel=plexpass&X-Plex-Token=
To get the FreeBSD installer, goto the Plex.tv Downloads page, choose “Plex Media Server” and click the drop down for FreeBSD.
From there you should be able to atleast SACP the files sto your server, then manually update
Do you mind please giving a bit more instructions on this? I’m also struggling to update, I’m having the same issue as Mathijs.
Also, I’m on Freenas 11.0 and I see that the latest Plex requires FreeBSD 11.2 or newer, is it wise for me to update Plex?
You can manually download Plex from their website and grab the FreeBSD server version.
https://www.plex.tv/media-server-downloads/
From there, follow the WinSCP instructions to copy the files to your FreeNAS box and install them via putty, under the “Forcing an update when all else fails” section.
I would for SURE update your FreeNAS system first, you want to be on the latest version of FreeNAS
Thanks for the instructions!
I tried updating to 11.3 but my jails went missing so I had to roll back. I’ll dedicate some time soon to sort it out properly.
Been using this method of updating for several month and works without a hitch. I upgraded FreeNas to 11.3 but can’t figure out how to update the jail itself to 11.3. Running this command gives this error:
iocage upgrade -r 11.3-RELEASE plex
Snapshotting plex…
Snapshot already exists
Updating plugin INDEX…
Traceback (most recent call last):
File “/usr/local/bin/iocage”, line 10, in
sys.exit(cli())
File “/usr/local/lib/python3.7/site-packages/click/core.py”, line 764, in __call__
return self.main(*args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python3.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python3.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/iocage_cli/upgrade.py”, line 40, in cli
ioc.IOCage(jail=jail, skip_jails=skip_jails).upgrade(release)
File “/usr/local/lib/python3.7/site-packages/iocage_lib/iocage.py”, line 2065, in upgrade
).upgrade(jid)
File “/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_plugin.py”, line 1251, in upgrade
self.iocroot, ‘jails’, self.jail, f'{plugin_name}.json’
File “/usr/local/lib/python3.7/shutil.py”, line 248, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File “/usr/local/lib/python3.7/shutil.py”, line 120, in copyfile
with open(src, ‘rb’) as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: ‘/mnt/Tank-Striped-Mirrors/iocage/.plugins/github_com_freenas_iocage-ix-plugins_git/plex.json’
In my situation, I created a new Jail, installed plex and carried my data over.
Something like this.
Moving Plex Data between Jails
I have FreeNAS-11.3-U1 with a jailed Plex Server that was 18.2.2058. Followed the first instructions and worked like charm! Plex now at 1.19.1.2589 without any issues as of 4/2/2020. Searched for a week and tried all other methods.
I wanted to thank you very much! I haven’t been able to get the Plex package to update since mid January. Your “when all else fails” tutorial did the trick. I’ve Favorited this page. THANKS!
Glad I could help!
I had the same issues for a long time, once I figured it all out I knew this guide would be handy.
Thank you
I wish I would have found your post first! I tried so many other methods and one resulted in me deleting everything and starting over.
Your instructions are so clear and simple. The script makes everything effortless.
Thank you!
NICE post! Worked like a complete charm on FreeNAS-11.3-U3. Awesome work and thanks for sharing!
Cheers from Córdoba, Argentina,
Matías.-
This works great!!! Thank you.
Can you explain how to set this up as a cron job?
This works in my 11.3 setup and would be great to know how to make a cron job for this too.
In FreeNAS, Tasks > Cron Jobs > name it whatever you want and use iocage exec plex ./PMS_Updater.sh -vv -a > Set the schedule to whatever you want. I have mine do it every Wednesday at 3am
Anyone with the same problem?
root@plexR:/ # ./PMS_Updater.sh -vv -a
Using URL https://plex.tv/api/downloads/5.json
Searching https://plex.tv/api/downloads/5.json for the FreeBSD download URL …..ImportError: No module named site
Could not find a FreeBSD download link on page https://plex.tv/api/downloads/5.json?channel=plexpass&X-Plex-Token=k6-vvf2PvYqKdDn85xtD
root@plexR:/ #
Thank you for your answers.
Can you please try the steps detailed here
https://github.com/mstinaff/PMS_Updater/issues/36
I have used this a couple of times, and am a complete novice when it comes to this stuff, but I am so relieved that this process absolutely works, thank you so much for sharing the details.
This worked like a champ! Thanks for putting all this together and posting it. You rock!
Thank you, honestly, thank you very much.
Been using this for a few years now and is perfect.