Tutorial: How to keep an iocage plex install up to date (plexpass)

ryanakata

Explorer
Joined
Jul 26, 2015
Messages
63
Hop into the root of your plex jail via SSH and install 2 packages that are not installed in the 11.1 template by default.

Code:
pkg install wget
pkg install p5-Authen-SASL-2.16_1


This will install the supporting software to run the script.

Head over to https://github.com/ryanakata/PMS_Updater

Grab the .sh file and copy it using WinSCP or whatever you use to /mnt/iocage/jails/plex

Run the command

Code:
./PMS_Updater.sh -u PLEXUSERNAME -p PLEXPASSWORD -a


You should be up to date in a few moments and it will restart itself. You can schedule a cronjob to do this routinely once you confirm it works.
 

ryanakata

Explorer
Joined
Jul 26, 2015
Messages
63
Why would you not just run

Code:
pkg update && pkg upgrade plexmediaserver-plexpass


?

That relies on the repo being up to date, which in my experience never is until days/weeks later.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
I've yet to see the plex package take more than a week to hit the repo.
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
Yep I just use the command @ryanakata posted. I don't need bleeding edge. All I care is that my plex server gets relevant patches in a timely manner. The repo has been fulfilling that need for me.

This is happening automatically as well courtesy of a script someone here on the forums wrote that updates all my jails with a cron job.
 
Last edited:

madhub

Cadet
Joined
Mar 14, 2014
Messages
6
Installed sucsessfully but the script is not running.

Code:
root@plex:/ # ./PMS_Updater.sh -f -a -n
./PMS_Updater.sh: /usr/local/share/plexmediaserver-plexpass/Plex Media Server: not found
Error downloading https://plex.tv/api/downloads/1.json
root@plex:/ #


Can someone help me further. I do not have plexpass therefore the folder can not be found.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Just drop the -plexpass portion of the file path.
 

madhub

Cadet
Joined
Mar 14, 2014
Messages
6
Thank you for your help.
Had to remove some entries with "_plexpass" also but the script is working now.
 

kamhoe

Dabbler
Joined
Mar 30, 2016
Messages
26
I have no problem to update

Code:
pkg install wget
pkg install p5-Authen-SASL-2.16_1


But does anyone have any idea why I can't update my plex?

Code:
root@plex:~ # service plexmediaserver_plexpass stop	  
Stopping plexmediaserver_plexpass.
Waiting for PIDS: 14110, 14110.
Cleaning up leftover child processes.
Waiting for PIDS: 14116 14111, 14111.

root@plex:/ # ./PMS_Updater.sh -u USER -p PSWD -a
./PMS_Updater.sh: 7: Syntax error: newline unexpected (expecting word)


My plex is located
Code:
/mnt/Pool1/iocage/jails/plex/root/usr/local/share/plexmediaserver-plexpass
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
I would not use that script. To be reliable, you have to understand what the script is doing and make certain everything in the script is set just right for your system. If you cannot read and understand the script, then there will always be the potential for error.

Updating from the repo's is sufficient and reliable.
 

rmccullough

Patron
Joined
May 17, 2018
Messages
269
@pschatz100 when you say "updating from the repo's" are you taking about performing pkg update && pkg upgrade? Or are you referring to updated from ports using portsnap fetch extract?
 

kamhoe

Dabbler
Joined
Mar 30, 2016
Messages
26
I would not use that script. To be reliable, you have to understand what the script is doing and make certain everything in the script is set just right for your system. If you cannot read and understand the script, then there will always be the potential for error.

Updating from the repo's is sufficient and reliable.

I would to love to update from repo and I don't have to do it manually which is troublesome at this point but the repo doesn't update a newer version that often.

Since I am having a PlexPass membership and I always want to get a latest version.
 

rmccullough

Patron
Joined
May 17, 2018
Messages
269

kamhoe

Dabbler
Joined
Mar 30, 2016
Messages
26
@rmccullough I agree with you. The PlexPass always have newer update compare to regular Plex account.

My banner shows up all the time but I still couldn't figure out the error I am having since I am not good with scripts.
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
@rmccullough I agree with you. The PlexPass always have newer update compare to regular Plex account.

My banner shows up all the time but I still couldn't figure out the error I am having since I am not good with scripts.
If the update banner pops up, you should be able to dismiss it by clicking on "skip this version." Then, the banner will not show again until there is another update.

The "repo" is the package repository that is accessed when one runs pkg update && pkg upgrade. The package repository is usually updated a few days after the ports. Waiting a few days for the package repo to be updated is not a problem for me. However, by default a new jail might be set to quarterly libraries.

If you are comfortable with the Shell and with using a text editor, then you can set the system to find the latest updates:

To have the latest packages in FreeBSD, edit /usr/local/etc/pkg/repos/FreeBSD.conf with the following:

Code:
FreeBSD: {pkg
	url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}


Edit: If your jail is set to quarterly library updates, you will need to edit the FreeBSD.conf file that is in the jail itself. This file may not exist and might have to be created.

There is other stuff in the FreeBSD.conf file, so be careful when you modify the file. If you don't know how to use a FreeBSD text editor, then learn to do that first.

Now you will receive the newest Plex Media Server packages available.
"pkg search plexmediaserver" (or plexmediaserver-plexpass) will find versions of Plex in the repo

"pkg upgrade plexmediaserver" (or plexmediaserver-plexpass) will update Plex installation
 
Last edited:

kamhoe

Dabbler
Joined
Mar 30, 2016
Messages
26
If the update banner pops up, you should be able to dismiss it by clicking on "skip this version." Then, the banner will not show again until there is another update.

The "repo" is the package repository that is accessed when one runs pkg update && pkg upgrade. The package repository is usually updated a few days after the ports. Waiting a few days for the package repo to be updated is not a problem for me. However, by default a new jail might be set to quarterly libraries.

If you are comfortable with the Shell and with using a text editor, then you can set the system to find the latest updates:

To have the latest packages in FreeBSD, edit /usr/local/etc/pkg/repos/FreeBSD.conf with the following:

Code:
FreeBSD: {pkg
	url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}


There is other stuff in the FreeBSD.conf file, so be careful when you modify the file. If you don't know how to use a FreeBSD text editor, then learn to do that first.

Now you will receive the newest Plex Media Server packages available.
"pkg search plexmediaserver" (or plexmediaserver-plexpass) will find versions of Plex in the repo

"pkg upgrade plexmediaserver" (or plexmediaserver-plexpass) will update Plex installation
Great! I will give a try when I will have free time tomorrow.

I don’t mind to wait for few days for a new update but everytime when I click on the “Update” under jails, it doesn’t have any update.

Thanks @pschatz100
 

kamhoe

Dabbler
Joined
Mar 30, 2016
Messages
26
Finally, I am able to update my older 1.13.8.5395 to 1.13.9.5439 by following pschatz100 guide.

Code:
root@plex:/ # pkg search plexmediaserver-plexpass
plexmediaserver-plexpass-1.13.9.5439 Plex Media Server component
root@plex:/ # pkg upgrade plexmediaserver-plexpass
Updating iocage-plugins repository catalogue...
iocage-plugins repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
		plexmediaserver-plexpass: 1.13.8.5395 -> 1.13.9.5439

Number of packages to be upgraded: 1

The process will require 10 MiB more space.
68 MiB to be downloaded.

Proceed with this action? [y/N]: y
[plex] [1/1] Fetching plexmediaserver-plexpass-1.13.9.5439.txz: 100%   68 MiB   7.1MB/s	00:10
Checking integrity... done (0 conflicting)
[plex] [1/1] Upgrading plexmediaserver-plexpass from 1.13.8.5395 to 1.13.9.5439...
===> Creating groups.
Using existing group 'plex'.
===> Creating users
Using existing user 'plex'.
[plex] [1/1] Extracting plexmediaserver-plexpass-1.13.9.5439: 100%
Message from plexmediaserver-plexpass-1.13.9.5439:

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

multimedia/plexmediaserver_plexpass includes an RC script:
/usr/local/etc/rc.d/plexmediaserver_plexpass

TO START PLEXMEDIASERVER ON BOOT:
sysrc plexmediaserver_plexpass_enable=YES

START MANUALLY:
service plexmediaserver_plexpass start

Once started, visit the following to configure:
http://localhost:32400/web

This is the PlexPass release channel of Plex. It is bleeding edge and
new features may not function without an active PlexPass account.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Glad you got it working :)
 

Thousandbuckle

Contributor
Joined
Jul 9, 2014
Messages
136
Hello, I have a similar question along this thread. I just upgraded FreeNAS to 11.2 and installed Plex Media Server PlexPass into a custom jail but can not seem to get the latest version to install.

Plex is reporting that it has version 1.17.0.1709 installed but there is a new version showing available version 1.18.0.1944. I installed Plex using the "pkg install plexmediaserver_plexpass" and when I do the "pkg upgrade" check it says everything is up to date. So how is it Plex is reporting a newer version that the pkg upgrade process is not seeing?
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
So how is it Plex is reporting a newer version that the pkg upgrade process is not seeing?
Give it time to have the package built, the port was just updated today.
 
Top