[How To] Install Plex Plugin for FreeNAS 11.3 (or newer) - Plex Support Article

geoffwhere

Contributor
Joined
Apr 23, 2020
Messages
105
What's the hardware you are using? Motherboard, Ethernet chip?
It's an Acer Veriton M480 Intel Pentium E6700 Dual Core 3.2GHz 8GB RAM Gigabit Ethernet, new 4TB WD Red data HDD and 320GB system boot drive. It was working fine with the initial install. Problems only emerged after attempting to update the Plex release version.
The Ethernet cable is also OK - can ping the system and the dashboard indicates all's well:
1588513997633.png
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
There are a number of steps you can take to test this.
- Create an empty jail with BPF and DHCP, test in there, until you have it working. Plugins are jails under the hood. Giving the jail raw sockets is useful so you can ping from within the jail.
- Do an lspci and see what Ethernet chipset you have, and how well it is supported.
- Check tunables. You expect to see none, if there are a bunch of tunables created by autotune, that can cause issues

This testing would be done from CLI, easiest via SSH with an SSH client. If that sounds like entirely too much trouble: I get it.
 

geoffwhere

Contributor
Joined
Apr 23, 2020
Messages
105
empty jail with BPF and DHCP
1588515756457.png

What/how do I test in this jail?
What is an lscpi?
Tunables menu showed an empty space.
Happy to give this a whirl but I've got no idea what i'm doing or looking for. I understand what SSH is but don't know,how to drive it.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
This jail you created: That's using DHCP? And it gets an address?
 

geoffwhere

Contributor
Joined
Apr 23, 2020
Messages
105
I just fluked it with lspci, here's the result:
Controller #2 Marvel Technology Group 88E8071 PCI-E Gigabit Ethernet Controller rev 16
 

Attachments

  • 1588516590268.png
    1588516590268.png
    179.6 KB · Views: 275
  • 1588516660869.png
    1588516660869.png
    179.6 KB · Views: 263
  • 1588516668709.png
    1588516668709.png
    179.6 KB · Views: 275

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Interesting. So: DHCP inside a jail works in principle, just not when using a plugin. Maybe you ran into a bug in your FreeNAS version? Which is what again?

It's easy to install Plex inside that jail now, for some value of 'easy'. That's the direction you were going initially, with danb's script.
 

geoffwhere

Contributor
Joined
Apr 23, 2020
Messages
105
Maybe you ran into a bug in your FreeNAS version? Which is what again?
V 11.3-U2.1
Hello, I'm back after a good night's sleep, ready to give this another try, if you're up to helping me through this. I guess, my first step will be to either create a new jail or edit the test jail I created yesterday. Either way, what name and options should I set for the jail?
 

geoffwhere

Contributor
Joined
Apr 23, 2020
Messages
105
V 11.3-U2.1
Hello, I'm back after a good night's sleep, ready to give this another try, if you're up to helping me through this. I guess, my first step will be to either create a new jail or edit the test jail I created yesterday. Either way, what name and options should I set for the jail?
So, I've deleted the old 'emptytestjail' and created a new one - plex, IP address 192.168.90.30, it seemed to take a while for DHCP to assign the IP address, but it eventually got there. I've downloaded PuTTY and tried to login to FreeNAS root (192.168.90.14/24) but 'Access denied' when entering the root password. Also tried Putty access to the plex jail IP address, no go.
I understand the next step is to download the Danb35 script but it looks like I need help getting to that point, as per the above roadblocks.
 

geoffwhere

Contributor
Joined
Apr 23, 2020
Messages
105
Dear Yorick,
After more attempts to grasp the complexities of the Jail approach to install and maintain Plex (I simply don't understand the architecture of FreeBSD and commands needed to implement this), I've been able to start from scratch and successfully re-install the FreeNAS Flex Plugin.
While it might not be optimal in terms of keeping up-to-the-minute with Plex releases, it works and I can forego the confusion, time and effort needed to go down the Danb script path (which for me was scattered with broken glass).
Thank you very much for your persistence and patience. It may be rewarded some time in future if I ever get the urge to become a Linux guru.
For now, best wishes and sincere appreciation of your dedication.
Geoff
 

delovelady

Dabbler
Joined
Nov 3, 2019
Messages
16
Hi Yorick,

Installing FreeNAS 11.3 RC2 (or newer) Plex plugin with static IP address:

At the Dataset where the media is located, choose edit ACL.
Under File Information choose User -> plex and Group -> wheel
Check Apply permissions recursively
Confirm, Continue, Save.


Regards, R.
Starting at the beginning here.

"At the Dataset where ..." You're assuming I have some menu or some such in front of me that makes a list of datasets known? Can you please explain your start point, and (if not obvious) exactly what "at the Dataset" means?

Thank you.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Storage -> Pools shows you your datasets.

You have mounted media into Plex, the assumption is that this was a dataset. It could also be a folder.

Best practice is to use a dataset, as that allows you to easily set permissions. If it's a folder in your main pool, DO NOT set permissions recursively in the pool, you'll break things.

Scenario 1: You have a dataset for your media, and it's mounted in Plex. Set permissions on that dataset. Recursively is fine, assuming that the dataset is exclusively for Plex media, not for other things.

Scenario 2: You use a folder in the main pool (or inside another non-Plex dataset) for your media, and it's mounted in Plex. Or, you have a dataset, but it also contains child datasets that are unrelated. If that's so, you'll want to do some "untangling" so you don't have to try and massage permissions manually on command line. Create a dataset for Plex media, and only for that (Movies, TV and Music can live in folders inside that dataset), move all your media in there, mount it in the Plex jail, and set permissions on it.

There are videos and instructions that go into more detail on how to accomplish those tasks, including on my own YouTube channel. Find a format that works for your learning style.

Edit: For what it is worth, I disagree with user plex group wheel, it works but is brittle: Create a new folder in Windows, say for a movie, and access isn't granted because the user doesn't match. My preferred method for handling Plex permissions on a media dataset shared via SMB is documented yonder. It's not the only way, and I don't know enough to claim whether it's better than other ways. It does work. https://www.youtube.com/watch?v=9Xsgsap0wgQ

Good luck!
 
Last edited:

delovelady

Dabbler
Joined
Nov 3, 2019
Messages
16
Storage -> Pools shows you your datasets.

You have mounted media into Plex, the assumption is that this was a dataset. It could also be a folder.

Best practice is to use a dataset, as that allows you to easily set permissions. If it's a folder in your main pool, DO NOT set permissions recursively in the pool, you'll break things.

Scenario 1: You have a dataset for your media, and it's mounted in Plex. Set permissions on that dataset. Recursively is fine, assuming that the dataset is exclusively for Plex media, not for other things.

Scenario 2: You use a folder in the main pool (or inside another non-Plex dataset) for your media, and it's mounted in Plex. Or, you have a dataset, but it also contains child datasets that are unrelated. If that's so, you'll want to do some "untangling" so you don't have to try and massage permissions manually on command line. Create a dataset for Plex media, and only for that (Movies, TV and Music can live in folders inside that dataset), move all your media in there, mount it in the Plex jail, and set permissions on it.

There are videos and instructions that go into more detail on how to accomplish those tasks, including on my own YouTube channel. Find a format that works for your learning style.

Edit: For what it is worth, I disagree with user plex group wheel, it works but is brittle: Create a new folder in Windows, say for a movie, and access isn't granted because the user doesn't match. My preferred method for handling Plex permissions on a media dataset shared via SMB is documented yonder. It's not the only way, and I don't know enough to claim whether it's better than other ways. It does work. https://www.youtube.com/watch?v=9Xsgsap0wgQ

Good luck!

Got it. I think. Thanks.

I have
!!!!
Main-HDDs dataset 15.36TiB
Jails dataset 2.66GiB​
Plex dataset 2.19MiB​
iocage dataset 5.29Gib​
stuff...​
jail​
stuff...​
!!!!
So the Plex that's under Main-HDDs/Jails is the dataset that interests me. There is one Mount Point for the PLEX jail:
Source: /mnt/Main-HDDs/Plex, Destination: /mnt/Main-HDDs/iocage/jails/plex-nas1/root/Media

The only thing under the Plex umbrella, is folders that exclusively contain subfolders with PLEX media files

From within the Jail, that looks like this:
~~~~
Media/
Movies/​
A Dog's Purpose (2017)/​
A Dog's Purpose (2017).mkv​
~~~~
and so on

So I'm OK under the circumstances to use the ACL route? Thanks for your time
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
So here's where I am unclear: You say /mnt/Main-HDDs/Plex, but above all I see is /mnt/Main-HDDs/Jails/Plex, and that seems too small to hold all your movies.

Now it's possible Main-HDDs/Jails/Plex was meant to hold your metadata, in which case leave it be. But if it was created as an SMB type dataset, and the intent was that movies and such would live there, and Main-HDDs/Plex is just a folder, then you want to move all your media files into Main-HDDs/Jails/Plex, mount that into Plex, and set permissions there.
 

delovelady

Dabbler
Joined
Nov 3, 2019
Messages
16
So here's where I am unclear: You say /mnt/Main-HDDs/Plex, but above all I see is /mnt/Main-HDDs/Jails/Plex, and that seems too small to hold all your movies.

Now it's possible Main-HDDs/Jails/Plex was meant to hold your metadata, in which case leave it be. But if it was created as an SMB type dataset, and the intent was that movies and such would live there, and Main-HDDs/Plex is just a folder, then you want to move all your media files into Main-HDDs/Jails/Plex, mount that into Plex, and set permissions there.
1588984705115.png


I hope that helps...

Actually, I have always wondered about that. It's not reporting correctly, as you can see here:

1588985644258.png
 

Attachments

  • 1588984576660.png
    1588984576660.png
    425.6 KB · Views: 265
  • 1588985512122.png
    1588985512122.png
    16.1 KB · Views: 245
Last edited:

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Main-HDDs/Plex is a folder. Rather than repeat myself, everything above holds - move your Plex media into a dataset, that Jails/Plex one seems as good a target as any, that was likely meant to be the dataset for media in the first place. Or create a new (SMB) dataset called Media or Plex-Media and move it there. The point is to have an easy starting point to edit permissions from without needing to drop into CLI for that.
 

delovelady

Dabbler
Joined
Nov 3, 2019
Messages
16
Main-HDDs/Plex is a folder. Rather than repeat myself, everything above holds - move your Plex media into a dataset, that Jails/Plex one seems as good a target as any, that was likely meant to be the dataset for media in the first place. Or create a new (SMB) dataset called Media or Plex-Media and move it there. The point is to have an easy starting point to edit permissions from without needing to drop into CLI for that.
Thanks, I get it now. I've created the dataset, and have applied the ACL. This is what I originally wanted to do but I confused myself.

The next challenge, is getting the data into the right place. The data at /mnt/Main-HDDs/Plex has historically been seen by the jail as /Media/ compliments of this mount point:
1588994402260.png


The new dataset name is PlexMedia.
1588994668303.png

I have now changed the above mount to instead be sourced at /mnt/Main-HDDs/PlexMedia.

While the jail is still shutdown, is it safe for me now to, at Unix command line within the FREENAS (not jail) environment, execute this:
mv /mnt/Main-HDDs/Plex/* /mnt/Main-HDDs/PlexMedia
Seems to be the way to go.
Code:
root@nas1:/mnt/Main-HDDs/Plex # ls -l
total 1512
drwsrwxr-x     2 plex    plex    62 May  8 15:00 Cocomelon
drwsrwxr-x    24 plex    plex    24 Mar 29 17:58 Converted-DVDs
drwsrwxr-x     2 plex    plex    52 Feb  5 21:18 DVD
drwsrwxr-x   264 plex    plex   266 Dec 27 21:08 Favorites-to-Share
drwsrwxr-x     2 dennis  plex    16 May  7 02:19 metadata-backup
drwsrwxr-x   627 plex    plex   630 Feb  1 23:19 Movies
drwsrwxr-x  1274 plex    plex  1275 May  8 14:18 Music
drwxrwxr-x    46 dennis  plex    46 Dec 12 12:38 MusicChristmas
drwxrwxr-x    18 dennis  plex    18 Mar 18 13:50 MusicPlex
drwsrwxr-x    23 plex    plex    82 Oct 29  2019 MyVideos
drwsrwxr-x    25 plex    plex    25 Mar 13 00:16 NewStuff
drwsrwxr-x    26 plex    plex    26 Dec 28 20:50 QiuMin
drwsrwxr-x    33 plex    plex    34 Dec 12 11:21 TV
drwsrwxr-x     4 plex    plex     4 Nov 13 23:21 TV-DVDs-to-Review
 

peter2cfu

Dabbler
Joined
May 14, 2020
Messages
25
Hi Yorick,

Installing FreeNAS 11.3 RC2 (or newer) Plex plugin with static IP address:
The notes below are not scientifically proven but to reproduce myself a fully functional PMS ;)

Create user ‘plex’ with ID 972 at Primary Group ‘wheel’. The Plex plugin allways uses this username in it’s jail with corresponding userid. You need this user at the next step.

At the Dataset where the media is located, choose edit ACL.
Under File Information choose User -> plex and Group -> wheel
Check Apply permissions recursively
Confirm, Continue, Save.

Install Plex plugin with DHCP settings. Just enter the name of the jail and there you go. Just accept DHCP because static IP address is not possible initially to get it right. You can change the IP config later to static IP. The Plex plugin with it’s jail will be started after install automatically.

Stop the Plex jail
Edit the Plex jail

Basic properties:
· Uncheck DHCP Autoconfigure IPv4
· Leave VNet checked
· LeaveBerkely checked
IP4 interface: leave ----------------
IP4 address: (free IP address for your jail)
IP4 netmask: (your netmask)
Default router: (your gateway)
· Leave Autostart checked

Jail properties:
· Check Allow raw sockets

Network properties:
· Leave all unchanged

Custom properties:
· Leave all unchanged

Save settings
Start the jail to check if it’s working

If yes:
Stop the jail again
Create mountpoints
Start the jail

Now you’ve created the dependencies for the Plex web gui. At this gui you can create your media entrances without errors ‘no soup for you’ or ‘no items available.

Regards, R.

Great write up, thanks really helped me out,
 

Estropelic

Contributor
Joined
Feb 8, 2016
Messages
107
Seems like I may be having the same issue. :X I think I'm going to have to wait until this issue is resolved in a patch. I've spent much time on this and I'm not too hot with command line. Learned much today tho.
 
Top