Scripted Plex Installation

Another scripted installation of mine, this one for Plex Media Server. Script and instructions are here:

2 Likes

Hi Dan
Thank you for the assistance so far.
As per your request… I will put any further questions I have related to the Plex installation script here.

In the basic config file the PLEX_CONFIG_PATH is not defined/added. so it uses a default location of $POOL_PATH/plex_data
is this the folder that plex stores the metadata in that is separate from the jail? So if we update the jail/plex, it will reuse the data in this folder?

Then in saying this… I still have my older plex metadata. Would it be safe to say I could copy the data into this folder and it should re-use it?

Also, what would be the best practice for where the script is run from/downloaded to.
on the pool or in the default root

Yes, this is the path where Plex will store its metadata, and it’s outside of the jail.

I’d expect so.

I really don’t think it matters. I’d probably put it on the pool though.

okay… I THINK I have it all up and running.

I just need to know now how to get the old metadata across (or do you think its best I just start from scratch? I mean… the old metadata is from 2018…I think)

Also, if starting the metadata from scratch. Can I then delete the older metadata… if yes, how?
what would be the best way to do it and to figure out if what I am going to delete is safe to delete.
I created a SMB share to “jails” but I see there is also a “iocage” folder…

The older metadata is likely stored within the old jail, so destroying the old jail should delete the metadata.

okay… but if I go into the folder that I have set in the config… it seems empty.
so this is where I have a issue copying the older data back into the newer folders, and this is why I decided to just restart…

I have a issue with this too… so I can only see the older jails because I created a SMB share to see them. other than that with the update of FreeNAS, it no longer comes up in the interface as a jail. (unless I boot into the older version and then remove it that way)

This is currently how my pool looks in the WebGUI

But from SSH it looks like this…
storage 3

You will see there that I created a “apps” folder (where I have put the plex script and I set the config file to put the metadata in there. but this doesnt appear on the GUI

The GUI only shows datasets, not folders/directories. So it makes sense that the folder you created wouldn’t show up in the GUI.

okay, but If I SSH and go to that folder… it still comes up as blank.
that and I cant seem to change into the “Plex Media Server” folder, it doesn’t accept space (what character should I use for those spaces, hitting tab to auto fill doesn’t work)

can I add the dataset?

"Plex Media Server"

Or Plex\ Media\ Server

But I would’ve expected tab completion to work.

Running into this error on plex when trying to play back some files
“Conversion failed. A required codec could not be found or failed to install.”

Any assistance with this would be appreciated.

I don’t know that I can offer much beyond checking in the Plex logs. I’m installing directly from the FreeBSD packages, so if they aren’t working, I think the next step would be to check on the Plex forums.

Could the issue be that I didn’t set up a dataset before installing using your script?
Otherwise, what is the correct user and userID I need to setup and how would I get those permissions to plex so that it can download the needed codecs?

I have attached the Plex logs (just rename the extension to .zip)
Plex Media Server Logs_2024-05-25_15-22-18.sh (2.3 MB)

I don’t think it’s very likely.

There should already be a user with id 972; that user needs to be able to read whatever media you’re mounting to the jail.

How would I check this / set the user up?

I have a user called Plex with UID 972 in a group called plex (also UID 972), Im not sure if this is all I need.


You can check who owns the plex data by ls -la from the directory.

Having an issue trying to install using the instructions from github.
From the shell;
I changed directory into the pool I want to use, cloned, made the config file with nano and saved it.
Ran the script and got this

…
Successfully added mount to pms’s fstab
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/latest, please wait…
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:13:amd64/latest/Latest/pkg.txz: Address family for host not supported
Address resolution failed for Index of /FreeBSD:13:amd64/latest/.
Consider changing PACKAGESITE.
Command: pkg install plexmediaserver failed!
Failed to install plexmediaserver package

  • Stopping pms
  • Executing prestop…

How do I change the PACKAGESITE? I am an absolute noob, did I mess up something obvious?