Thank you very much!
Using your excellent howto and the info in the comments, i wrote down the steps for FreeNAS 9.3:
Configure jails
First off, navigate to your FreeNAS WebUI in your browser. Click on the "Jails" button on the top bar, and in the Jails tab, click the the "Configuration" button. From there, select a "Jail Root" that is suitable to where you want your jails to be stored. Then click the Advanced button and fill in the network settings to match your environment. Do not use dhcp and choose a range that is not in your router's dhcp range/.
Create fhe jail
Still in the "Jails" tab, click the “Jails” buton and then click the "Add Jails" button.
In the popup, configure your jail name: plex
Click the “Advanced” button and theck what IP address will be assigned to the jail
Check these settings:
- Autostart & VIMAGE: Checked (default)
- NAT: Unchecked (default)
Then click "Ok".
The first time you create a jail, it will take some time, as some templates will be downloaded.
For more information on creating jails in FreeNAS, visit
http://doc.freenas.org/index.php/Adding_Jails
Inside the jail
Once the jail is created, navigate to the FreeNAS shell prompt, either through the FreeNAS WebUI Shell or via SSH. In the shell prompt, view the currently installed jails:
jls
You should see something like this:
1 - plex /mnt/tank/jails/plex
Here, the plex jail has a JID of 1, so to get a shell prompt in the jail, use the following command:
jexec 1 tcsh
First we update pkg (installed version is 1.3.7). To check the version:
pkg -v
You should see something like this:
1.3.7
Update the repository and upgrade the pkg version:
pkg update && pkg upgrade
you have to confirm several steps with typing 'y' <enter>
Check the new version:
pkg -v
You should see something like this:
1.4.0
Next, download & extract the ports tree (this includes the files to compile Plex). Since this is the first time, run the following:
portsnap fetch extract
next time, to download & update the ports tree, run:
portsnap fetch update
To be able to update the insstalled port(s) later, we install the tool
portupgrade:
cd /usr/ports/ports-mgmt/portupgrade/ && make install clean
Follow on-screen instructions – just accept default values
To upgrade all ports at once, use the following:
portupgrade -a
Follow on-screen instructions – just accept default values
Alternatively, you can have portupgrade prompt you before upgrading each port with this:
portupgrade -ai
Install Plex
Now, to install Plex, run the following command:
cd /usr/ports/multimedia/plexmediaserver/ && make install clean
cd /usr/ports/multimedia/plexmediaserver-plexpass/ && make install clean
Once that is complete, you need to setup Plex to start automatically when the jail starts with the following command:
echo plexmediaserver_enable="YES" >> /etc/rc.conf
echo plexmediaserver_plexpass_enable="YES" >> /etc/rc.conf
Next, start Plex with the following:
service plexmediaserver start
service plexmediaserver_plexpass start
Plex is now ready to use and you can navigate to it with this URL:
http://192.168.x.x:32400/web/index.html
Once you tie a Plex account with your server, you will be able to access Plex internally and externally via:
https://plex.tv/web
Storage
Add storage to the jail
http://doc.freenas.org/index.php/Adding_Jails#Adding_Storage
In this example the group owner of the mounted storage is media, the ID of this group is 2000, which you can lookup in the accounts of the FreeNAS WebUI
To give plex access to this mount, you have to create the goup media, with id 2000 in the jail and add the plex user to the group. To do this, start by editing /etc/group with this command in the jail shell:
ee /etc/group
Then add this to the bottom of the file (without the line numver and dot):
to exit the editor, hit <Esc> and then in the menu that appears, hit <a>, you will be prompted to save the file
Now, restart the plex service:
service plexmediaserver restart
That is it, you can now add your storage in the Plex web GUI