Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.
Resource icon

Scripted Plex installation

danb35

Wizened Sage
Joined
Aug 16, 2011
Messages
12,352

ronclark

Member
Joined
Dec 5, 2017
Messages
40
I just tried to use this script and the script fails.
it seems the jail is not getting DNS. outside of the jail DNS works. what am i doing wrong?

Code:
root@Atlas[/mnt/Storage/Scripts/freenas-iocage-plex]# ./plex-jail.sh
plex successfully created!

Testing SRV response to FreeBSD
pkg.freebsd.org's SRV record could not be verified.

Testing DNSSEC response to FreeBSD
pkg.freebsd.org could not be reached via DNSSEC.

Testing DNS response to FreeBSD
pkg.freebsd.org could not be reached via DNS, check your network
Failed to create jail


plex-config
Code:
JAIL_IP="192.168.10.200"
DEFAULT_GW_IP="192.168.10.1"
POOL_PATH="/mnt/Storage/AppData"
 

Jord9857

Member
Joined
Apr 28, 2020
Messages
68
hi,

so I've ran the 'git clone https://github.com/danb35/freenas-iocage-plex '

But now I'm on this bit -
JAIL_IP="192.168.1.75"
DEFAULT_GW_IP="192.168.1.1"
POOL_PATH="/mnt/tank"

These values must be set. They correspond to:
  • JAIL_IP and DEFAULT_GW_IP are the IP addresses of the jail and your router, respectively.
  • POOL_PATH is the path for your main data pool's root directory.

Where do i find the 'main data pool's root directory'? This is my drive below. I want to be able to access the drive on my NAS from my laptop to add films, music and tv shows.

Thanks


1588250414496.png
 

Redcoat

Dedicated Sage
Joined
Feb 18, 2014
Messages
2,190
Looks like it's /mnt/Main-HDD.

I would make a datasets under it for Films, Music, TVShows in which to store your media files (and make those SMB shares for Windows access). At the end of the plex install you will mount those source points to the plex destination (something like this):

1588251361247.png
 

Jord9857

Member
Joined
Apr 28, 2020
Messages
68
Looks like it's /mnt/Main-HDD.

I would make a datasets under it for Films, Music, TVShows in which to store your media files (and make those SMB shares for Windows access). At the end of the plex install you will mount those source points to the plex destination (something like this):

View attachment 38092


How do i make datasets / mountpoints like this? I guess I'd make a Media one like you have done so then Music/TV Shows and Films within it
 

danb35

Wizened Sage
Joined
Aug 16, 2011
Messages
12,352
How do i make datasets / mountpoints like this?
I want to be able to access the drive on my NAS from my laptop to add films, music and tv shows.
That's going to require setting up shares, which is completely outside the scope of my script. See:

See also:
 

Jord9857

Member
Joined
Apr 28, 2020
Messages
68

So am i setting up a dataset or mountpoint? I'm confused...

That's going to require setting up shares, which is completely outside the scope of my script. See:

See also:

Am i able to set up a share / network drive for the folders i need without having to be on the same domain?
 

danb35

Wizened Sage
Joined
Aug 16, 2011
Messages
12,352
So am i setting up a dataset or mountpoint? I'm confused...
Both. The dataset is the structure that stores the data. The mountpoint is how you make that data accessible to the jail.
Am i able to set up a share / network drive for the folders i need without having to be on the same domain?
Do you have a Windows (i.e., Active Directory) domain set up?
 

danb35

Wizened Sage
Joined
Aug 16, 2011
Messages
12,352

Jord9857

Member
Joined
Apr 28, 2020
Messages
68
You could create the dataset(s) before or after running the script. The mountpoint(s) would be set up after the jail is created.

Is there a 'best practice' or advisory where in the drive pool to set these up?

Then no, there's no relevant "domain" for your users or the share.

Cool, I'll grab a spare laptop i got and just use this to join the NAS domain and use it to put TV shows, music and films into those folders.
 

danb35

Wizened Sage
Joined
Aug 16, 2011
Messages
12,352
Is there a 'best practice' or advisory where in the drive pool to set these up?
I'd make a dataset on your pool called "media", and in there have subdirectories or datasets (your choice--I don't see any particular reason for using datasets) for movies, tv, music, and/or photos as appropriate. Create a SMB share for that dataset, and you can use any of your Windows, Mac, or Linux client PCs to copy stuff into the appropriate directories. Be sure to look at the Plex support articles about naming and organizing your media.
Cool, I'll grab a spare laptop i got and just use this to join the NAS domain
Why not just use your normal computer?
 

Jord9857

Member
Joined
Apr 28, 2020
Messages
68
I'd make a dataset on your pool called "media", and in there have subdirectories or datasets (your choice--I don't see any particular reason for using datasets) for movies, tv, music, and/or photos as appropriate. Create a SMB share for that dataset, and you can use any of your Windows, Mac, or Linux client PCs to copy stuff into the appropriate directories. Be sure to look at the Plex support articles about naming and organizing your media.

Brill thank you very much for your time & help. I will finish running the script now & then set up these datasets and mounts then try and set up this shared network drive & gmail email alerts.

Why not just use your normal computer?

I use my normal laptop for all sorts e.g. Remote desktop onto my other server, telnet & ssh onto my HP & Cisco switches and that
 

Jord9857

Member
Joined
Apr 28, 2020
Messages
68
1588256373378.png


Am i meant to receive any confirmation this folder has been created like the one above?
 

danb35

Wizened Sage
Joined
Aug 16, 2011
Messages
12,352
Am i meant to receive any confirmation this folder has been created like the one above?
You're meant to put those lines into a plex-config file inside the freenas-iocage-plex directory:
1588256695999.png


You can use a graphical editor with SFTP support on your Windows machine (like Notepad++) to do this, or you can SSH into your FreeNAS box* and use one of the editors installed there like ee or nano. Do not use the shell through the web GUI; it's very badly broken.

*see https://www.familybrown.org/dokuwiki/doku.php?id=fester112:ssh_setup, but you don't need to bother with private/public key setup. And if you're using Windows 10 (or pretty much any OS other than Windows), there's a built-in ssh client, so you don't need to install PuTTY.
 

Yorick

Dedicated Sage
Joined
Nov 4, 2018
Messages
1,849

Jord9857

Member
Joined
Apr 28, 2020
Messages
68
I enabled the SSH feature on Windows 10. Although I already have Putty for my switches.

Just saying 'Permission Denied (publickey,password). in PowerShell
Permission Denided, please try again in CMD
but managed to get it working in Putty
 

Jord9857

Member
Joined
Apr 28, 2020
Messages
68
Would it be helpful to see someone walk through using the script? I created a video for that, which is at https://www.youtube.com/watch?v=GvM32lWc_r4

This is so helpful so far! This is the first time setting up plex on here & using FreeNAS really so got no films or anything. Just at this point here (18:30) and i can't seem to see the /Plex Media Server. Guessing as this is your old plex jail which I don't have.

Although to be able to access the jail outside the NAS on other laptop, I think the other people were saying I do need to move it out so it's accessible, correct me if I'm wrong.



1588260297680.png
 

Yorick

Dedicated Sage
Joined
Nov 4, 2018
Messages
1,849
I am moving data from an old jail to the new jail. If you don't have an old jail, there's no data to move. Just create plex_data as a dataset, mount it into the jail once the jail has been created, and ignore the entire rsync portion of the video.
 

Jord9857

Member
Joined
Apr 28, 2020
Messages
68
I am moving data from an old jail to the new jail. If you don't have an old jail, there's no data to move. Just create plex_data as a dataset, mount it into the jail once the jail has been created, and ignore the entire rsync portion of the video.

Oh right so that's it? All i need to do now is set up a share to that Media dataset and sub folders?
 
Top