Don’t bother with the plug-in. They aren’t really supported.
I recommend just doing this manually.
Open the shell on the TrueNAS system and set up a plain jail install from there.
echo '{"pkgs":["plexmediaserver","ca_root_nss","nano"]}' > /tmp/pkg.json
This makes a temporary list of packages to get.
iocage create -n "plex" -p /tmp/pkg.json -r 13.1-RELEASE ip4_addr="vnet0|LOCALIP/24" defaultrouter="DEFAULTGW" vnet="on" allow_raw_sockets="1" boot="on"
This creates the actual jail and runs installation of the packages we listed in the last step. Substitute the static IP you want to use for LOCALIP and your normal default gateway for DEFAULTGW. The jail will be named “plex” here unless you want to change that.
rm /tmp/pkg.json
We’ve installed stuff now, so we don’t need that list anymore.
iocage exec plex sysrc "plexmediaserver_enable=YES"
Setting the new jail to run Plex automatically when it starts here. The first “plex” on these commands is referring to the jail by name, so if you decided to name it something else you’ll need to use that name instead.
iocage exec plex service plexmediaserver start
Starting the Plex Media Server now…
You can exit out of the shell now.
Now, wait 30 seconds or so, and then go try accessing the server at http://LOCALIP:32400/web/index.html
You should get the initial setup screens. You can go ahead and sign in with your Plex account and stuff but we aren’t done yet. Just making sure the server boots up and can be claimed mostly,
Go ahead and close that out for now.
Now open the shell in the jail you created. (Go to the FreeNAS Jails section, expand down the jail you made there, hit Shell there.
mkdir -p /usr/local/etc/pkg/repos
Making a folder here that does not exist on the jail right now.
nano /usr/local/etc/pkg/repos/FreeBSD.conf
Making a new text file with the Nano text editor called “FreeBSD.conf” in that folder we just made.
The jail you just made installed Plex from an older set of packages that are only updated once every three months, so the version of Plex you have now is not current. We need to change the jail to use the LATEST updates on packages.
Here is what you paste in that text file:
FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}
Ctrl-x to exit out of Nano, and tell it to save changes.
service plexmediaserver stop
Stopping Plex Media Server to upgrade it.
pkg update
Updating the current listings of things since we just changed that info on the repository to use.
pkg upgrade
Upgrade current packages. It will probably find newer versions of Plex and Nano at least.
service plexmediaserver start
Once all the updates are installed we can start Plex up again.
This is just the initial setup. You will still need to set up mount points to locations outside the jail to where you media files are, just like if the Plugin had installed properly.
To update Plex in the future you would just go into the jail and:
- Stop the server, like we just did.
- pkg update
- pkg upgrade
- Start the server again.
I recommend making a snapshot of the “root” portion of the jail just before you do an update to Plex, in case you have to rewind and roll back in case of a problem (see normal FreeNAS forum for help on that).
[ref]