====== FreeNAS - Plex - Update Plex Plugin ====== ===== Backup ===== Before updating the plugin, its a good idea to make a backup of the jail containing the plugin in case something goes wrong. Navigate to the **Jails** menu option in the FreeNAS console and look for the name of the plugin you are to upgrade, the name will be listed in the jail column. {{:freenas:freenas_-_jail_-_plex_server.png?800|}} **NOTE:** In this case, the jail is called **PlexServer**. Navigate to the **Shell** menu in the FreeNAS console and run the command: iocage snapshot -n snapname jailname **NOTE:** Change snapname to whatever you want to call the backup of the jail and change jailname to the name of your plugin listed in the jail. So I will be running the command: iocage snapshot -n PlexServer_backup PlexServer If everything works correctly, you should get the message: Snapshot: /Storage/iocage/jails/PlexServer@PlexServer_backup created **NOTE:** The message will be slightly different depending on how you name your backup. ---- ===== Update ===== Now you are ready to update your plugin to the latest version Navigate to the **Plugins -> Installed** menu in FreeNAS and get the name of name of the plugin, once again the name can be found in the Jails column. **NOTE:** In this example, the name of the Plex jail is PlexServer. Go back to the Shell menu in FreeNAS and run the command: iocage update jailname * where jail_name is the name of the jail. So I will be running the command: iocage update PlexServer This should perform the update. ---- ===== Restart Plex ===== The last step in the process is to start the jail again. Navigate to the **Jails** menu in FreeNAS, click on the three vertical dots and select the start option in the menu. **NOTE:** Your Plex plugin is now updated to the latest version available from ixsystems. ---- ===== Restore from Backup (Optional; If needed) ===== If the upgrade fails for some reason and you need to back to the old version, run the commands in order: iocage stop jailname iocage snaplist jailname iocage rollback -n snapname jailname where: * **jailname** is the name of your jail. * **snapname** is the name of the jail backup we originally created. ---- ===== Alternative method to update Plex ===== Leave the jail running and ssh into FreeNas. Once you do that, type "jls" into the command line. Your running jails will have ID numbers. Whatever jail ID your plex is running on, run the command "jexec 4 tcsh" (Change the number to whatever jail ID your plex is on). This will get you into your plex root. From there, run the command portsnap extract (might need to run "portsnap fetch" first, if you haven't used ports before). Once thats done scrolling and loading a ton of ports, run the command "portsnap fetch update". After that, command "cd /usr/ports/multimedia/plexmediaserver-plexpass" to get you into the directory you need to be in. Now run the command "make deinstall" Then finally run this command "cd /usr/ports/multimedia/plexmediaserver-plexpass/ && make install clean". This will install the latest version of plex. If your not running plexpass version of plex, just remove that text from the commands. Restart the jail for the changes to take effect. ---- ===== References ===== https://www.simontaplin.net/how-to-update-the-plex-plugin-and-others-on-freenas-11-2/ https://www.ixsystems.com/community/threads/update-plex-server-on-freenas-11-3.82128/