User Tools

Site Tools


freenas:install_plex_in_a_jail

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
freenas:install_plex_in_a_jail [2020/06/23 13:21] peterfreenas:install_plex_in_a_jail [2020/10/21 10:44] (current) – removed 192.168.1.1
Line 1: Line 1:
-====== FreeNAS - Install Plex in a Jail ====== 
- 
-Navigate to **Jails -> Configuration**. 
- 
-Select a **Jail Root** that is suitable to where you want your jails to be stored. 
- 
-Fill in the network settings to match your environment. 
- 
-Navigate to **Jails -> Add Jails**. 
- 
-A window will popup with options to configure your jail. 
- 
-Select the following: 
- 
-  * Jail Name: plex 
-  * Type: pluginjail or standard (your choice) 
-  * IPv4 Address: 192.168.x.x (Anything that isn't taken and isn't in your DHCP scope) 
-  * Autostart: Checked (default) 
-  * VIMAGE: Checked (default) 
-  * vanilla: Checked (default) 
- 
-  
-Click "Ok". 
- 
- 
- 
- 
-Once the jail is created, navigate to a shell prompt, either through the FreeNAS WebUI Shell or via SSH. 
- 
-Once at a shell prompt, view the currently installed jails with the following command: 
- 
-<code bash> 
-jls 
-</code> 
-  
- 
-You should see something like this: 
- 
-<code bash> 
-1 - plex /mnt/tank/jails/plex 
-</code> 
-  
- 
-In this case, the plex jail has a JID of 1, so to get a shell prompt in the jail, use the following command: 
- 
-<code bash> 
-jexec 1 tcsh 
-</code> 
-  
- 
-Next, to download the ports tree (this includes the files to compile Plex), run the following: 
- 
-<code bash> 
-portsnap fetch extract 
-</code> 
-  
- 
-Now, to install Plex, run the following command: 
- 
-<code bash> 
-cd /usr/ports/multimedia/plexmediaserver/ && make install clean 
-</code> 
-  
- 
-Once that is complete, you need to setup Plex to start automatically when the jail starts with the following command: 
- 
-<code bash> 
-echo plexmediaserver_enable="YES" >> /etc/rc.conf 
-</code> 
-  
- 
-Next, start Plex with the following: 
- 
-<code bash> 
-service plexmediaserver start 
-</code> 
- 
-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  
- 
- 
- 
----- 
- 
-===== Accessing Mounted Storage In Your Jail With Plex ===== 
- 
-To add storage to your FreeNAS Jail, start by following this documentation:http://doc.freenas.org/index.php/Adding_Jails#Adding_Storage 
- 
-After mounting the storage in your jail, it may be tempting to grant your files 777 access to give Plex access to them.  With that said, don’t do it; there is an easy work around.  Basically, you can add groups to the jail with the same GroupID as the ones on the host system. 
- 
-  
- 
-Once at a shell prompt within the jail, find out what the GroupID is of the group that is assigned permissions on the mount with this command: 
- 
-<code bash> 
-ls -l /mnt 
-</code> 
- 
- 
-You’ll then see a list of mount points such as this one: 
- 
-<code bash> 
-drwxrwx---+ 7 1002 1001 8 Mar 3 18:35 Media 
-</code> 
-  
- 
-The column with 1002 is the UserID, and 1001 is the GroupID.  If you want Plex to have access to the Media mount, you need need to create the Media group in the jail with a GroupID of 1001, and have the plex user in it. 
- 
-To do this, start by editing /etc/group with this command: 
- 
-<code bash> 
-ee /etc/group 
-</code> 
- 
-Then add this to the bottom of the file: 
- 
-<file bash> 
-Media:*:1001:plex 
-</file> 
- 
-After saving the file, you can look at the permissions of the mount again by using: 
- 
-<code bash> 
-ls -l /mnt 
-</code> 
-  
-Now, you should see the following instead: 
- 
-<code bash> 
-drwxrwx---+ 7 1002 Media 8 Mar 3 18:35 Media 
-</code> 
-  
- 
-You are now done. Plex will now have access to the Media mount. 
- 
- 
-<WRAP info> 
-**NOTE:**  If Plex cannot access your mounts after properly setting up your permissions, it may need to be restarted with the following command: 
- 
-<code bash> 
-service plexmediaserver restart 
-</code> 
- 
-</WRAP> 
- 
----- 
- 
- 
-===== Upgrading Plex ===== 
-  
- 
-When new releases of Plex come out, you may update without losing your data and preferences. 
- 
-To check if a new release of Plex is available via ports, visit this page: http://www.freshports.org/multimedia/plexmediaserver/ 51 
- 
-  
-To upgrade Plex, first install a tool called portupgrade with this command: 
- 
-<code bash> 
-cd /usr/ports/ports-mgmt/portupgrade/ && make install clean 
-</code> 
-  
- 
-When configuration dialog boxes appear, accept the defaults. 
-  
- 
-Next, you have to update the FreeBSD port tree with this command: 
- 
-<code bash> 
-portsnap fetch update 
-</code> 
- 
- 
-Then to upgrade all ports at once, use the following: 
- 
-<code bash> 
-portupgrade -a 
-</code> 
-  
- 
-Alternatively, you can have portupgrade prompt you before upgrading each port with this: 
- 
-<code bash> 
-portupgrade -ai 
-</code> 
- 
- 
- 
-Afterwards, your ports, including Plex, should be up to date. 
- 
- 
----- 
- 
-===== References ===== 
- 
-[[http://doc.freenas.org/index.php/Adding_Jails|Information on creating jails in FreeNAS]] 
- 
-https://forums.plex.tv/t/how-to-install-plex-in-a-freenas-jail/60641/4 
- 
-  
- 
- 
  
freenas/install_plex_in_a_jail.1592918505.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki