yzxvoq.over-blog.com/
24 Janvier 2021
On my Plex media server I run the Plex Media Server as a service, and the one issue that I had was not being able to update Plex from within the Web dashboard. The reason is that when running Plex Media Server as a service Plex is running as a service, any update through Plex can't be done because the service needs to be stopped first before any updates can happen.
For me, another issue was that the Plex Media Server runs under a standard user account on my Windows 10 machine, and a standard user account can't perform any application installs, which leads to another reason for me to disable Plex auto updates.
Plex is your home for free TV and movies, giving you access to 80+ live channels and thousands of on-demand titles from around the world. Stream music, podcasts, news, and more, all wrapped in a beautiful interface. No other free streaming service delivers more content to more countries, all without a subscription.
Meanwhile Plex is urging folks who want to run Plex on a computer to download the new Plex desktop app for Windows or Mac, which will be continuously updated. For now the new app looks a lot like. Now we can run the updater to get the latest Plex update and the syntax is as follows: sh PMSUpdater.sh -u user -p password -v -a. So that should have you updated to the latest version and you're good to go! 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.
While I can't have Plex auto update to the latest version, I have found another way of accomplishing the same goal. I created a small application called Plex Server Auto Updater that will perform the same update task when Plex is running as a service.
The Plex Auto Updater makes it easy to update Plex when the Plex Media Server is running as a service. The updater will automatically perform the tasks that you would normally need to take when updating Plex.
Note:
Since the Plex Auto Updater needs to install the Plex update, the updater needs to be run under an administrator account. If you are logged in as a standard user, you simply need to right-click the Plex Auto Updater executable and select 'Run as administrator' to allow the updater to perform the update.
The following actions are performed when the updater is run:
The updater will update Plex regardless of where Plex is installed, where the Plex local data directory is located, and which user account is running the service.
I created the Plex Auto Updater so that it is portable, which means it doesn't need to be installed. It is a single executable that can be saved and run from any directory on your machine.
To get the Plex Auto Updater and use it, follow these steps:
To have the Plex updater perform an update, there is one thing that will need to be done in Plex to ensure the updater can find the updates, which I discuss below.
Before running the Plex Auto Updater, it is important to first have Plex automatically download the latest updates. The Plex Auto Updater will check these downloaded updates to determine if it should install a newer version.
To enable Plex to download updates automatically, use the following steps:
Once the above steps have been completed, and an update has been downloaded, the Plex Auto Updater can now perform the update.
Of course, you can simply run the Auto Updater executable, but the point is to have it update automatically without any user intervention. This can be done by simply scheduling a task to run the executable at a specified time.
Once Plex Media Server has been configured to download any updates, you can now schedule the Plex Auto Updater to automatically check the updates to see if one is available.
To avoid updating the Plex Media Server when you are streaming media, you will want to schedule the updater at times when the media server won't be streaming any media, such as early morning.
To schedule the Plex Auto Updater, use the following steps:
When the above steps is completed, you should have a task scheduled to run the Plex Auto Updater at a specified schedule, and using the administrative user account.

This application solves the issue I had when running Plex as a service and not having the ability to update Plex automatically. With the portable application I created, I can now schedule Plex updates so that my Plex Media Server has the latest release.
Download the latest Plex Server Auto Updater release.
Installing Plex Media Server on your FreeNas server 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 FreeNAS system, without using the standard FreeNAS 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 and other FreeNAS articles on this site.
UPDATE: I have updated this article for TrueNAS and you can read the TrueNAS: Plex Manual Install article and the TrueNAS: Update Plex Server article from the links provided.
There are two versions of Plex to install – the PlexPass version and thebasic 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.

3utools v2 12. If you don't have a PlexPass, use this command to install:pkg install plexmediaserver
If you do have a PlexPass, use this command to install
pkg install plexmediaserver-plexpass
We will need to set Plex to start automatically. It's pretty simple, all you need to do is run the following command:
sysrc 'plexmediaserver-plexpass_enable=YES' rosysrc 'plexmediaserver_enable=YES'
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/plexmediaserverfile 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
Now you are ready to access the web interface, point Plex to your media files and start playing all your movies and TV shows! You can access the web interface at:
You have probably noticed that you 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 wgetpkg install ca_root_nsspkg install perl5
Now we can download the PMS Updater with the following commands:
mkdir /usr/local/PMS_Updatercd /usr/local/PMS_Updaterwget 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 -u [user] -p [password] -v -a
So that should have you updated to the latest version and you're good to go!
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. First we will need to store your login and password in a file. Go back to the /usr/local/PMS_Updater directory and create a password file with the following command:
nano auth.txt
Enter the following within the file:
user=email@address.com
password=password
Save the file and exit using Ctrl-X.
Now using the following command will perform the Plex update.
sh PMS_Updater.sh -c auth.txt -v -a
Now we can use this command as a Cron job. In the FreeNAS web interface go to Tasks -> Cron Jobs and add a new job. Enter the following into the command field.
/usr/local/bin/iocage exec [jailname] /bin/sh /usr/local/PMS_Updater/PMS_Updater.sh -c /usr/local/PMS_Updater/auth.txt -v -a
You can set it up to run automatically at a specified time, daily, monthly or whatever you'd like. I have un-ticked the ‘enabled' option which means it does not run automatically on a schedule, however I have the option to run this job whenever I need to from the web interface.
This article is not meant to lead you through the setup of your Plex Server. However here are a couple of tips, I found I needed:
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):
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! Happy Plexing!
~Raze42
Sources:
Install Instructions: https://www.myrandomtips.com/linux/freenas/how-to-install-plex-media-server-on-freenas-11-2/
Updater Source Code: https://github.com/mstinaff/PMS_Updater
Updater Instructions: https://www.ceos3c.com/freenas/manually-update-plex-freenas/
Alternate Method (not tried): https://www.simontaplin.net/how-to-update-the-plex-plugin-and-others-on-freenas-11-2/
Installing Plex Media Server on your FreeNas server 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 FreeNAS system, without using the standard FreeNAS 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 and other FreeNAS articles on this site.
UPDATE: I have updated this article for TrueNAS and you can read the TrueNAS: Plex Manual Install article and the TrueNAS: Update Plex Server article from the links provided.
There are two versions of Plex to install – the PlexPass version and thebasic 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 don't have a PlexPass, use this command to install:pkg install plexmediaserver
If you do have a PlexPass, use this command to install
pkg install plexmediaserver-plexpass
We will need to set Plex to start automatically. It's pretty simple, all you need to do is run the following command:
sysrc 'plexmediaserver-plexpass_enable=YES' rosysrc 'plexmediaserver_enable=YES'
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/plexmediaserverfile and change:
from
Activision servers down ww2. : ${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
Now you are ready to access the web interface, point Plex to your media files and start playing all your movies and TV shows! You can access the web interface at:
You have probably noticed that you 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 wgetpkg install ca_root_nsspkg install perl5
Now we can download the PMS Updater with the following commands:
mkdir /usr/local/PMS_Updatercd /usr/local/PMS_Updaterwget 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 -u [user] -p [password] -v -a
So that should have you updated to the latest version and you're good to go!
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. First we will need to store your login and password in a file. Go back to the /usr/local/PMS_Updater directory and create a password file with the following command:
nano auth.txt
Enter the following within the file:
user=email@address.com
password=password
Save the file and exit using Ctrl-X.
Now using the following command will perform the Plex update.
sh PMS_Updater.sh -c auth.txt -v -a
Now we can use this command as a Cron job. In the FreeNAS web interface go to Tasks -> Cron Jobs and add a new job. Enter the following into the command field.
/usr/local/bin/iocage exec [jailname] /bin/sh /usr/local/PMS_Updater/PMS_Updater.sh -c /usr/local/PMS_Updater/auth.txt -v -a
You can set it up to run automatically at a specified time, daily, monthly or whatever you'd like. I have un-ticked the ‘enabled' option which means it does not run automatically on a schedule, however I have the option to run this job whenever I need to from the web interface.
Ctrl alt delete function. This article is not meant to lead you through the setup of your Plex Server. However here are a couple of tips, I found I needed:
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):
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! Happy Plexing!
~Raze42
Sources:
Install Instructions: https://www.myrandomtips.com/linux/freenas/how-to-install-plex-media-server-on-freenas-11-2/
Updater Source Code: https://github.com/mstinaff/PMS_Updater
Updater Instructions: https://www.ceos3c.com/freenas/manually-update-plex-freenas/
Alternate Method (not tried): https://www.simontaplin.net/how-to-update-the-plex-plugin-and-others-on-freenas-11-2/
