Isn’t the plex_data directory supposed to go into the specified directory in the config file? Right now it’s putting it into the iocage/jail directory like a default Plex install.
Hey quick question. How is updating handled with the jail created by your script? Does the jail update button in the FreeNAS work or does it have to be handled via command prompt?
The packages in the jail are updated automatically by a cron job that’s installed by the script. If you want to update the FreeBSD release in the jail (e.g., from 11.3 to 11.4), you should be able to do that in the FreeNAS GUI.
First of all, well done and congrats for creating what appears to be a very popular solution, you should certainly give yourself a pat on the back when your hands aren’t on the keyboard!
I was genuinely hoping to be with of those that had no issue, and merely leave you a message consisting of gratitude…unfortunately I’m having a little issue, that’s no doubt user error. There is no hurry at all, I’ve been learning FreeNAS during the past 6 months or so, I’ve been using Plex via the plugin without issue - but as you know, it’s not a very migratable plugin, so I saw your script and thought, “perfect!”.
If you had time to indulge me, here are a few details:
FreeNAS Version: FreeNAS-11.3-U3.2
Existing Plex Jail: Yes
Plex Pass: Yes
Method of getting script: git clone and your url
Permissions set: everyone (already 972 plex user account created for working install, via plugin method)
Install process notes: none, all successful.
Installed via Shell or SSH: SSH (putty)
Jail status: JID provided / State is UP
Other evidence: Router shows IP allocated (ending 50 as above)
URL used to connect to install: http://192.168.1.50:32400/web
Success: No. Browser message: “This site can’t be reached. 192.168.1.50 refused to connect.”
If I can provide any other information do say so, but like I said, this is such low priority as I’m very inferior in knowledge compared to people such as yourself…nevertheless, thanks in advance!
Just installed TrueNAS CORE, latest version; seems they have altered the release strings…
GUI says the version is TrueNAS-12.0-RELEASE but when the script runs freebsd-version 12.2-RC3 is returned, and breaks the script when it tries to create the jail. I manually altered the script to return “12.2-RELEASE” for the ${RELEASE} variable, but thought you might like the heads up to perhaps amend…
Script works fine apart from this on TrueNAS - many thanks for your work on it
Sorry about taking so long to get back to you–your post slipped off my radar. The refused connection suggests to me that Plex isn’t actually running in your jail. To check that, enter the jail with iocage console pms, and then run service plexmediaserver status. What’s the output?
Hi Dan, thank you very much for getting back to me, really kind of you.
I’m being evicted from my office soon (new owners), but as soon as I’ve built a new one, I’ll get right back to this as I would really like to do it properly. Thanks again, Chris
Hey Dan, quick question. Is there a way to force the update cron job to run? I ran into a bad Plex version where I can’t access the server settings. So I either need to revert or push past to the latest version.
Easiest thing to do would be to get to a shell in the jail (iocage console pms), and then run pkg upgrade. Once it finishes, service plexmediaserver restart.
Went ahead and tried reinstalling, kept getting stuck and timing out at “>Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/latest, please wait…”
After a couple times it worked eventually but still getting the same errors. Below is the install.
Blockquoteroot@truenas[~/freenas-iocage-plex]# ./plex-jail.sh
Netmask not set, defaulting to /24 (255.255.255.0)
Plex metadata path not set, defaulting to /mnt/tank/plex_data
Plex media path not set, please mount media directory manually when done
Not configuring hardware transcode
Using stable-release plexmediaserver code
Creating jail pms. This may take a minute, please be patient.
pms successfully created!
No default gateway found for ipv6.
Starting pms
Started OK
Using devfs_ruleset: 1000 (iocage generated default)
Configuring VNET OK
Using IP options: vnet
Starting services OK
Executing poststart OK
Successfully added mount to pms’s fstab
Successfully added mount to pms’s fstab
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/latest, please wait…
plexmediaserver_enable: → YES
plexmediaserver_support_path: → /config
Successfully removed mount from pms’s fstab
Stopping pms
Executing prestop OK
Stopping services OK
Tearing down VNET OK
Removing devfs_ruleset: 1000 OK
Removing jail process OK
Executing poststop OK
Installation Complete!
Mount your media folder into the jail, then start the jail.
Log in and configure your server by browsing to: http://192.168.2.4:32400/web
root@truenas[~/freenas-iocage-plex]# service plexmediaserver status
plexmediaserver does not exist in /etc/rc.d or the local startup
directories (/etc/ix.rc.d /usr/local/etc/rc.d), or is not executable
root@truenas[~/freenas-iocage-plex]# pkg install plexmediaserver
Updating local repository catalogue…
pkg: file:///usr/ports/packages/meta.txz: No such file or directory
repository local has no meta file, using default settings
pkg: file:///usr/ports/packages/packagesite.txz: No such file or directory
Unable to update repository local
Error updating repositories!