Manually update your Plex Media Server on Freenas

In this tutorial, I show you how to manually update your Plex Media Server on Freenas without relying on the developers of the Plex Plugin of Freenas to release a new version. 

It seems that sometimes the Plex Plugin gets updated very close to a new Plex release and sometimes it doesn’t.

If you don’t want to wait until the Plex Freenas Plugin dev’s release a new version, there’s another way how to update your Plex on Freenas straight away.

 

The Github script will pull the newest release directly from Plex, so you could also implement a script to do that for you.

 

 

Step 1 Connecting to FreeNAS via SSH or Web GUI

Navigate to Plugins -> Installed and switch off your Plex Media Server.

Now connect to your FreeNAS using either SSH with Putty or the built-in Shell in the WebGUI:

 

 

Step 2 Manually updating Plex Media Server

Once you are inside of the shell, type:

jls

And note down which JID your Plex Media Server has. If you have only one Jail, it will be #1.

How to manually update plex media server
Noting down the Jail Number

Next, we type:

jexec 1 csh (replace 1 with whatever jail number you have!)

Followed by:

fetch -o PMS_Updater.sh https://raw.githubusercontent.com/mstinaff/PMS_Updater/master/PMS_Updater.sh

Next, we are going to set permissions:

chmod 755 PMS_Updater.sh

And finally we run the script:

./PMS_Updater.sh -vv -a

After the script run through, you should be on the newest version of Plex Media Server. Switch on your Plex Media Server under Plugins -> Installed.

 

 

How to install Plex on a Jail in Freenas: Tecmint

Github Script: https://raw.githubusercontent.com/mstinaff/PMS_Updater/master/PMS_Updater.sh

 

62 thoughts on “Manually update your Plex Media Server on Freenas

  • September 1, 2019 at 6:46 pm
    Permalink

    When is this command used?

    Thanks
    Dejan

    Reply
  • May 12, 2019 at 4:33 pm
    Permalink

    If anyone is getting the error:

    Shared object “libdl.so.1” not found, required by “wget”

    Use this command:

    ln -sf /lib/libc.so.7 /usr/lib/libdl.so.1

    And it’ll work. It appears the issue is related to FreeBSD ending support for 11.1. All packages are now being built for 11.2, which does have libdl.

    Reply
    • May 13, 2019 at 10:22 am
      Permalink

      Hey Michael,

      thanks for leaving this information here!

      Reply
  • April 21, 2019 at 8:59 am
    Permalink

    Is there a specific reason not to just:

    jls

    then

    jexec 1 csh (replace 1 with whatever jail number you have!)

    then

    pkg update

    then

    pkg upgrade

    then

    restart jail

    ?

    Reply
  • April 7, 2019 at 9:36 am
    Permalink

    Everything seem to go well using this method except for the final execute I get..
    root@plex:/ # ./PMS_Updater.sh -l PlexBuild.tar.bz2 -vv -a
    ./PMS_Updater.sh: 1: Syntax error: “)” unexpected
    ./PMS_Updater.sh: 1: Syntax error: Error in command substitution

    Reply
  • April 5, 2019 at 10:42 am
    Permalink

    got the same issue. Just rolled back to snapshot and stick to old version, till I can be bothered to re-setup a new jail
    Did you find a fix?

    Reply
  • March 28, 2019 at 4:16 am
    Permalink

    On freenas 11.1, the plex service refuses to start… I’ve ran through this update/script more than once in the past. Not sure what has changed

    Reply
  • March 27, 2019 at 8:38 pm
    Permalink

    Run
    pkg install wget perl5

    Reply
  • March 26, 2019 at 1:13 pm
    Permalink

    I am also getting this anyone know how to fix?

    Reply
  • March 20, 2019 at 6:29 am
    Permalink

    I’m getting the following error message under Freenas 11.2. Can you help?

    root@plexmediaserver_1:/ # ./PMS_Updater.sh -vv -a
    ./PMS_Updater.sh: /usr/local/share/plexmediaserver-plexpass/Plex Media Server: not found
    Using URL https://plex.tv/api/downloads/5.json?channel=plexpass
    Downloading https://plex.tv/api/downloads/5.json?channel=plexpass
    Shared object “libdl.so.1” not found, required by “wget”
    Error downloading https://plex.tv/api/downloads/5.json?channel=plexpass

    Reply
  • March 8, 2019 at 1:52 am
    Permalink

    Same. Anyone know what to do?

    Reply
  • February 28, 2019 at 10:12 pm
    Permalink

    geting error after commad ./PMS_Updater.sh -vv -a

    Shared object “libsoci_core.so” not found, required by “Plex Media Server”
    Using URL https://plex.tv/api/downloads/5.json?channel=plexpass
    Downloading https://plex.tv/api/downloads/5.json?channel=plexpass
    –2019-02-28 21:09:54– https://plex.tv/api/downloads/5.json?channel=plexpass
    Resolving plex.tv (plex.tv)… 54.154.198.3, 52.31.211.151, 52.18.254.79, …
    Connecting to plex.tv (plex.tv)|54.154.198.3|:443… connected.
    HTTP request sent, awaiting response… 200 OK
    Length: unspecified [application/json]
    Last-modified header missing — time-stamps turned off.
    –2019-02-28 21:09:55– https://plex.tv/api/downloads/5.json?channel=plexpass
    Reusing existing connection to plex.tv:443.
    HTTP request sent, awaiting response… 200 OK
    Length: unspecified [application/json]
    Saving to: ‘/tmp/5.json?channel=plexpass’

    [ ] 24 –.-K/s in 0s

    2019-02-28 21:09:55 (1.20 MB/s) – ‘/tmp/5.json?channel=plexpass’ saved [24]

    Download Complete
    Searching https://plex.tv/api/downloads/5.json?channel=plexpass for the FreeBSD
    download URL …..Could not find a FreeBSD download link on page https://plex.tv
    /api/downloads/5.json?channel=plexpass
    root@plexmediaserver_1:/ #

    Reply
  • December 10, 2018 at 4:56 am
    Permalink

    Trying to update Plex on Freenas 11.2 and getting a Cert Error

    Reply
  • December 7, 2018 at 3:08 pm
    Permalink

    Worked Great Thanks!

    Reply
  • December 3, 2018 at 5:27 am
    Permalink

    Worked perfectly, Thank you.

    Reply
  • September 6, 2018 at 5:45 am
    Permalink

    Does this work with FreeNAS 11.2 Beta2? When I stop the plugin via the web ui, the shell option under the jail disappears and i can’t get in unless i start it again. I am running the plexpass version but VERY new to FreeNAS and can’t figure out how to update plex. Last time I tried it wrecked my Plex and I had to remove and reinstall it, so Im a little nervous to try it. Do I need to change anything from the above instructions when doing it thru 11.2 beta2 (using beta web UI)? TIA!

    Reply
    • August 30, 2018 at 7:31 am
      Permalink

      Aaron, thanks 🙂 Glad it was helpful to you.

      Reply
  • August 15, 2018 at 3:29 am
    Permalink

    I had to make a slight modification to your sh file in order for mine to work.

    I received the error “/usr/pbi/plexmediaserver-amd64/share/plexmediaserver/Plex Media Server: not found”

    I changed the “PMSPARENTPATH to be “/usr/local/share” as that is where my plexmediaserver/Plex Media Server folder lived.
    Also used steps 5 and 6 from Tom above to manually update from local file, because I assume the cert authority folder also does not exist: CERTFILE=”/usr/local/share/certs/ca-root-nss.crt”

    Reply
    • August 16, 2018 at 3:57 pm
      Permalink

      David, thanks for letting us know. Maybe it can help someone else out there!

      Reply
  • July 9, 2018 at 6:18 pm
    Permalink

    Good work-around. Also though, on the github page it calls out the need to put in a UN/PW combo to get the latest Plex Pass version instead of the latest public release.

    „Running without the username/password or bad username/password will retrieve the latest public release rather than the latest Plex Pass release.“

    Reply
  • May 9, 2018 at 2:55 pm
    Permalink

    I was wondering if there is way to automate this with perhaps a cron job?

    Reply
  • April 23, 2018 at 10:04 pm
    Permalink

    Hmm…

    Stopped the Plex jail via GUI
    SSH on to server and enter JLS …. Headings and nothing else
    Start server again and retry teh command.. JLS
    Ahh this time it works, seems it’s 2
    Shut down the server and enter jexec 2 csh
    I get ” jail_attach(2) : operation not permitted”
    Ok
    Try it with sudo
    nope
    get “jexec: jail_attach(2): Invalid argument”

    Stumped…

    Can any one help?

    Reply
    • May 29, 2018 at 9:20 pm
      Permalink

      Don’t stop the jail in the GUI. That shuts it down completely. The author means to stop the Plex plugin via the GUI.

      Reply
  • April 3, 2018 at 1:38 pm
    Permalink

    Thanks so much 🙂
    I had no idea where the Plex was installed, this script made it plain simple, took less than 2 minutes and it’s updated and working 🙂

    Reply
    • April 3, 2018 at 1:56 pm
      Permalink

      Thanks for the Feedback, Matt! Happy to hear that you got it fixed 🙂

      Reply
  • November 22, 2017 at 5:07 am
    Permalink

    Thank you! Thank you! Thank you!

    Reply
    • November 23, 2017 at 10:48 am
      Permalink

      Haha, you are welcome 😉

      Reply
  • September 8, 2017 at 7:21 am
    Permalink

    Thank you for posting this. It works like a charm!

    Reply
    • September 8, 2017 at 8:11 am
      Permalink

      You are very welcome Juno 🙂

      Reply
  • August 13, 2017 at 7:43 pm
    Permalink

    Thank you for this guide. I had to use the -u and -p options to get the latest version for plex pass users. Works like a charm now.

    Reply
    • August 21, 2017 at 9:55 am
      Permalink

      Your welcome!

      Reply
  • July 15, 2017 at 3:36 pm
    Permalink

    I have followed the comments here and even installed the link directly. It appears to run and says that it has completed and please is on the latest version.

    I even restarted the jail manually

    In the plex gui under server it still has the old version number and says to download the update.

    I am on the new version 11 of FreeNAS.

    Reply
    • April 25, 2017 at 8:45 am
      Permalink

      You are welcome 🙂

      Reply
  • April 3, 2017 at 11:05 am
    Permalink

    Hey, this appears to have stopped working with the latest plex pass build 1.5.2- the url used to scrape build information no longer appears to include plexpass builds?

    Reply
    • April 3, 2017 at 11:10 am
      Permalink

      Fix until the script is updated:

      1) Goto https://www.plex.tv/downloads/ turn on ‘Plex Pass Downloads’ and select ‘FreeBSD’ from the drop down
      2) Copy the url of the ‘DOWNLOAD 64-BIT’ button
      3) SSH into your FreeNAS box
      4) Follow steps 1-4 of the above article
      5) Execute: fetch -o PlexBuild.tar.bz2 {PateInURLCopiedEarlier}
      6) Execute: ./PMS_Updater.sh -l PlexBuild.tar.bz2 -vv -a

      Done!

      Reply
      • April 7, 2017 at 8:55 am
        Permalink

        Cool! Thanks for the info!

        Reply
      • May 28, 2017 at 1:38 am
        Permalink

        Trying to update also.

        I followed your above instructions for the fix until the script is updated. All went fine through step 5. I get ‘Permission denied.’ when I entered step 6.

        Ideas?

        Reply
      • May 28, 2017 at 1:57 am
        Permalink

        Your Step 4 should actually read Follow steps 1-5 of the above article. If you don’t execute the CHMOD from step 5 you’ll get a permission error.

        Otherwise it worked like a champ!

        Thanks!

        -Rob

        Reply
        • June 6, 2017 at 10:56 am
          Permalink

          Thanks for the info!

          Reply
  • March 21, 2017 at 3:54 pm
    Permalink

    Thanks it worked great to roll me forward when the freenas plugin the GUI installed was buggy with its TVDB matching!

    Reply
    • March 18, 2017 at 10:10 am
      Permalink

      Very welcome buddy!

      Reply
  • February 27, 2017 at 2:03 am
    Permalink

    Freenas GUI still shows old plugin version and claims I need an update after this manual install method. Any way to fix?

    Reply
    • March 18, 2017 at 10:12 am
      Permalink

      It may show the old version but Plex should be on the newest. At least for me.

      Reply
  • February 19, 2017 at 4:41 am
    Permalink

    Now I can’t access my Plex Media Server interface. 🙁 How do I troubleshoot this?

    Reply
    • February 19, 2017 at 4:47 am
      Permalink

      I just restarted my jail and all works great! Thanks!

      Reply
      • March 18, 2017 at 10:13 am
        Permalink

        Welcome 🙂

        Reply
    • March 18, 2017 at 10:13 am
      Permalink

      You are welcome!

      Reply
  • February 12, 2017 at 2:42 pm
    Permalink

    BAM! Worked like a champ. Thanks!!

    Reply
    • February 12, 2017 at 4:25 pm
      Permalink

      Very welcome 🙂

      Reply
  • February 2, 2017 at 10:23 pm
    Permalink

    Hi, I get errors about directories that are missing and such, any assistance welcomed and appreciated!

    root@plex:/ # ./PMS_Updater.sh -vv -a
    ./PMS_Updater.sh: /usr/pbi/plexmediaserver-amd64/share/plexmediaserver/Plex Medi
    a Server: not found
    Using URL https://plex.tv/api/downloads/1.json?channel=plexpass
    Downloading https://plex.tv/api/downloads/1.json?channel=plexpass
    ./PMS_Updater.sh: wget: not found
    Error downloading https://plex.tv/api/downloads/1.json?channel=plexpass
    root@plex:/ #

    Reply
    • January 19, 2017 at 2:16 pm
      Permalink

      Thanks! Glad it could help you 🙂

      Reply

Tell us what you think!

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: