Resource icon

FN11.3 iocage jails - Plex, Tautulli, Sonarr, Radarr, Lidarr, Jackett, Transmission, Organizr

Pentaflake

Explorer
Joined
Jul 8, 2014
Messages
91
Hi.

Where can I find the old 11.0 version of this guide please?

I can't find it anywhere...

Thanks.
You just need to install the pkgs listed in the iocage creation then setup the jail the rest of the same way described just from the jail shell.

For NZBGet I don't have a file /etc/ssl/cert.pem so I can't connect to my newsgroup via SSL. Any ideas?
You probably need ca_root_nss installed its not included in the default iocage template like it was under warden.
 

Wolfeman0101

Patron
Joined
Jun 14, 2012
Messages
428
You just need to install the pkgs listed in the iocage creation then setup the jail the rest of the same way described just from the jail shell.


You probably need ca_root_nss installed its not included in the default iocage template like it was under warden.
Yeah I just found the cert and put it in the folder.
 

jmcguire525

Explorer
Joined
Oct 10, 2017
Messages
94
You shouldn't need to edit the rc.conf.

Can you explain why not just so I understand? To me I took the lines beginning with "#" at the top of the rcfile to be instructions for the user. It says to add the following lines to rc.conf and mentions that the default user:group is "media" but then goes on to set user:group as sonarr within the rc file we create.

And if "sonarr" is our rc file within the rc.d directory, what is the purpose of the other rc.conf file?

Sorry for all the questions, just trying to wrap my head around what I'm doing, that way I'll have less questions going forward
 

jmcguire525

Explorer
Joined
Oct 10, 2017
Messages
94
I finally found it. I found an article that says FreeBSD doesn't install any CA root certificates by default. You have to install them from ports.

Code:
pkg install ca_root_nss

Where you able to get Sabnzbd up and working properly in iocage? If so do you mind sharing the steps you took?
 

Wolfeman0101

Patron
Joined
Jun 14, 2012
Messages
428
Can you explain why not just so I understand? To me I took the lines beginning with "#" at the top of the rcfile to be instructions for the user. It says to add the following lines to rc.conf and mentions that the default user:group is "media" but then goes on to set user:group as sonarr within the rc file we create.

And if "sonarr" is our rc file within the rc.d directory, what is the purpose of the other rc.conf file?

Sorry for all the questions, just trying to wrap my head around what I'm doing, that way I'll have less questions going forward
I'm not the best to explain it but the "sonarr" file is basically instructions for the service to run and includes things you could put in rc.conf but this is cleaner and adding "sonarr_enable=YES" to rc.conf is telling it to start on boot. I'm no expert.
 

MoonPie

Dabbler
Joined
Dec 13, 2014
Messages
20
Where you able to get Sabnzbd up and working properly in iocage? If so do you mind sharing the steps you took?

I can not find my original notes when i tried this, I am now using nzbget, but I think this should work. There is an option below for either DHCP or Static IP assignment, use only one of the choices. There is also a socat option so you can just type in http://jailip/sabnzbd/ and you don't need to worry about port number.

echo '{"pkgs":["sabnzbdplus","ca_root_nss"]}' > /tmp/pkg.json

iocage create -n "sabnzbd" -p /tmp/pkg.json -r 11.1-RELEASE vnet="on" bpf="yes" dhcp="on" allow_raw_sockets="1" boot="on"
iocage create -n "sabnzbd" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|<IP>/<MASK>" defaultrouter="<GATEWAY>" vnet="on" allow_raw_sockets="1" boot="on"

rm /tmp/pkg.json
iocage fstab -a sabnzbd /mnt/tank1/apps/sabnzbd /config nullfs rw 0 0
iocage fstab -a sabnzbd /mnt/tank1/torrents /mnt/torrents nullfs rw 0 0
iocage exec sabnzbd mkdir -p /mnt/torrents/sabnzbd/incomplete
iocage exec sabnzbd mkdir -p /mnt/torrents/sabnzbd/complete
iocage exec sabnzbd ln -s /usr/local/bin/python2.7 /usr/bin/python
iocage exec sabnzbd ln -s /usr/local/bin/python2.7 /usr/bin/python2
iocage exec sabnzbd "pw user add media -c media -u 8675309 -d /nonexistent -s /usr/bin/nologin"
iocage exec sabnzbd chown -R media:media /mnt/torrents /config
iocage exec sabnzbd ln -s /config/sabnzbd.conf /usr/local/etc/sabnzbd.conf
iocage exec sabnzbd sysrc sysrc sabnzbd_enable="YES"
iocage exec sabnzbd sysrc sabnzbd_conf_dir="/config"
iocage exec sabnzbd service sabnzbd start
iocage exec sabnzbd service sabnzbd stop


host = 0.0.0.0
download_dir = /mnt/torrents/sabnzbd/incomplete
complete_dir = /mnt/torrents/sabnzbd/complete


iocage exec sabnzbd service sabnzbd start

Sabnzbd will be available at http://jailip:8080/sabnzbd/

iocage console sabnzbd
pkg update && pkg upgrade
pkg install socat
sysrc "socat_enable=YES"
sysrc "socat_flags=TCP-LISTEN:80,fork TCP:127.0.0.1:8080
 
Last edited:

lukyjay

Contributor
Joined
May 13, 2016
Messages
134
Managed to get all but sabnzbd and nzbget to work. When will they be in iocage?
 

jmcguire525

Explorer
Joined
Oct 10, 2017
Messages
94
Managed to get all but sabnzbd and nzbget to work. When will they be in iocage?

Did you try the instructions in the comment above yours? I haven't gotten the chance since I'm running bad blocks on all of my new drives right now.
 

lukyjay

Contributor
Joined
May 13, 2016
Messages
134
I didn't see that, my apologies.

There is a typo in the create command. It says sonarr but should say sabnzbd.

It seems to work great! You should replace the current steps in the resource with this.

Also one other suggestion is to add some info on permissions. These steps won't set up the correct permissions. For mine to work I had to go in to the console and add a group with the ID 1001, then change all my services to run under this group and CHMOD my files to 775 so they could read/write with no errors. This might be useful for some people with little experience

Now all we need is an NZB Hydra guide.
 

lukyjay

Contributor
Joined
May 13, 2016
Messages
134
Okay I managed to get NZB Hydra working by taking the headphones script and making some changes, also taking the rc file from this repo: https://github.com/josh4trunks/freebsd-ports/blob/master/news/nzbhydra/files/nzbhydra.in


echo '{"pkgs":["databases/py-sqlite3","security/py-openssl","ca_root_nss","git"]}' > /tmp/pkg.json
iocage create -n "nzbhydra" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|<IP>/<MASK>" defaultrouter="<GATEWAY>" vnet="on" allow_raw_sockets="1" boot="on"
rm /tmp/pkg.json
iocage fstab -a nzbhydra /mnt/JRaid/Applications/Nzbhydra /config nullfs rw 0 0
iocage exec nzbhydra ln -s /usr/local/bin/python2.7 /usr/local/bin/python
iocage exec nzbhydra git clone https://github.com/theotherp/nzbhydra.git /usr/local/share/nzbhydra
iocage exec nzbhydra "pw user add nzbhydra -c nzbhydra -u 1001 -d /nonexistent -s /usr/bin/nologin"
iocage exec nzbhydra chown -R nzbhydra:nzbhydra /config /usr/local/share/nzbhydra
iocage exec nzbhydra ee /usr/local/etc/rc.d/nzbhydra

#!/bin/sh
#
# PROVIDE: nzbhydra
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# nzbhydra_enable (bool): Set to NO by default.
# Set it to YES to enable it.
# nzbhydra_user: The user account nzbhydra daemon runs as what
# you want it to be. It uses 'nzbhydra' user by
# default. Do not sets it as empty or it will run
# as root.
# nzbhydra_group: The group account nzbhydra daemon runs as what
# you want it to be. It uses 'nzbhydra' group by
# default. Do not sets it as empty or it will run
# as wheel.
# nzbhydra_data_dir: Directory where nzbhydra configuration
# data is stored.
# Default: /var/db/nzbhydra

. /etc/rc.subr
name="nzbhydra"
rcvar="${name}_enable"
load_rc_config ${name}

: ${nzbhydra_enable:="NO"}
: ${nzbhydra_user:="nzbhydra"}
: ${nzbhydra_group:="nzbhydra"}
: ${nzbhydra_data_dir:="/config"}

pidfile="/var/run/nzbhydra/nzbhydra.pid"
command="/usr/local/bin/python"
command_args="/usr/local/share/nzbhydra/nzbhydra.py --config ${nzbhydra_data_dir}/settings.cfg --database ${nzbhydra_data_dir}/nzbhydra.db --pidfile ${pidfile} --daemon --nobrowser"

start_precmd="nzbhydra_prestart"
nzbhydra_prestart() {
if [ ! -d ${pidfile%/*} ]; then
install -d -o ${nzbhydra_user} -g ${nzbhydra_group} ${pidfile%/*}
fi

if [ ! -d ${nzbhydra_data_dir} ]; then
install -d -o ${nzbhydra_user} -g ${nzbhydra_group} ${nzbhydra_data_dir}
fi
}

run_rc_command "$1"


iocage exec nzbhydra chmod u+x /usr/local/etc/rc.d/nzbhydra
iocage exec nzbhydra sysrc "nzbhydra_enable=YES"
iocage exec nzbhydra sysrc "nzbhydra_user=nzbhydra"
iocage exec nzbhydra sysrc "nzbhydra_data_dir=/config"
iocage exec nzbhydra service nzbhydra start

Obviously change your user ID and freenas mount paths. Please add this to the resource
 

Prasanth

Contributor
Joined
Mar 2, 2014
Messages
100
So I used the previous guides(warden jails) and everything had been set up perfectly and running well, but being a tinkerer I wanted to try out the iocage set up. I slowly transitioned one app at a time and plex and plexpy are working great. Now when i switched radarr and sonarr over I am running into permissions issues...

Using the permissions guide you originally linked to I chose to use solution 3.
All my media directories are owned by media:media which is a user:group that freenas had already created originally on install(with GID 8675309)
After install of sonarr I run:

iocage exec sonarr "pw groupadd -n media -g 8675309"
iocage exec sonarr "pw groupmod media -m sonarr"


I checked that sonarr is a member of the media group with

iocage exec sonarr "cat /etc/group"

and last 2 lines of output show

sonarr:*:351:
media:*:8675309:sonarr


but I still get the error "Access to the path is denied." within sonarr when trying to copy a file from the torrents directory to the videos directory

I did do "ls -l" on the directories and files within the jail and here is an example
root@sonarr:/mnt # ls -l
total 12
drwxrwxr-x 8 8675309 media 10 Apr 14 2017 torrents
drwxrwxr-x 4 8675309 media 5 Aug 7 19:38 video


Any idea what I'm doing wrong?
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I'm trying to get up and running with iocage to implement this guide. I've been looking at the iocage docs and seaching the forums and experimenting.
I have a few basic questions I'm hoping someone can clarify.

1) to get iocage working do you just create a jail from the new GUI or is there a CLI that needs to be sent in an SSH shell? I'm wondering this because of question #2 that maybe iocage isn't setup properly.
2) When I run iocage create -n "plexpass" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="igb0|192.168.5.62/24" defaultrouter="192.168.5.1" vnet="on" allow_raw_sockets="1" boot="on"
the jail has no access to the internet. If I turn vnet off in the GUI it works. Is it a problem if I have it turned off? Why doesn't my setup work with vnet on?
 

Prasanth

Contributor
Joined
Mar 2, 2014
Messages
100
I can not find my original notes when i tried this, I am now using nzbget, but I think this should work. There is an option below for either DHCP or Static IP assignment, use only one of the choices. There is also a socat option so you can just type in http://jailip/sabnzbd/ and you don't need to worry about port number.

echo '{"pkgs":["sabnzbdplus","ca_root_nss"]}' > /tmp/pkg.json

iocage create -n "sabnzbd" -p /tmp/pkg.json -r 11.1-RELEASE vnet="on" bpf="yes" dhcp="on" allow_raw_sockets="1" boot="on"
iocage create -n "sabnzbd" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|<IP>/<MASK>" defaultrouter="<GATEWAY>" vnet="on" allow_raw_sockets="1" boot="on"

rm /tmp/pkg.json
iocage fstab -a sabnzbd /mnt/tank1/apps/sabnzbd /config nullfs rw 0 0
iocage fstab -a sabnzbd /mnt/tank1/torrents /mnt/torrents nullfs rw 0 0
iocage exec sabnzbd mkdir -p /mnt/torrents/sabnzbd/incomplete
iocage exec sabnzbd mkdir -p /mnt/torrents/sabnzbd/complete
iocage exec sabnzbd ln -s /usr/local/bin/python2.7 /usr/bin/python
iocage exec sabnzbd ln -s /usr/local/bin/python2.7 /usr/bin/python2
iocage exec sabnzbd "pw user add media -c media -u 8675309 -d /nonexistent -s /usr/bin/nologin"
iocage exec sabnzbd chown -R media:media /mnt/torrents /config
iocage exec sabnzbd ln -s /config/sabnzbd.conf /usr/local/etc/sabnzbd.conf
iocage exec sabnzbd sysrc sysrc sabnzbd_enable="YES"
iocage exec sabnzbd sysrc sabnzbd_conf_dir="/config"
iocage exec sabnzbd service sabnzbd start
iocage exec sabnzbd service sabnzbd stop


host = 0.0.0.0
download_dir = /mnt/torrents/sabnzbd/incomplete
complete_dir = /mnt/torrents/sabnzbd/complete


iocage exec sabnzbd service sabnzbd start

Sabnzbd will be available at http://jailip:8080/sabnzbd/

iocage console sabnzbd
pkg update && pkg upgrade
pkg install socat
sysrc "socat_enable=YES"
sysrc "socat_flags=TCP-LISTEN:80,fork TCP:127.0.0.1:8080


Thanks for this...very helpful
I think you forgot 1 line
iocage exec sabnzbd chmod u+x /usr/local/etc/rc.d/sabnzbd
To be done before starting the service
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I'm trying to get up and running with iocage to implement this guide. I've been looking at the iocage docs and seaching the forums and experimenting.
I have a few basic questions I'm hoping someone can clarify.

1) to get iocage working do you just create a jail from the new GUI or is there a CLI that needs to be sent in an SSH shell? I'm wondering this because of question #2 that maybe iocage isn't setup properly.
2) When I run iocage create -n "plexpass" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="igb0|192.168.5.62/24" defaultrouter="192.168.5.1" vnet="on" allow_raw_sockets="1" boot="on"
the jail has no access to the internet. If I turn vnet off in the GUI it works. Is it a problem if I have it turned off? Why doesn't my setup work with vnet on?

Should have been vnet0 not igb0
iocage create -n "plexpass" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="vnet0|192.168.5.62/24" defaultrouter="192.168.5.1" vnet="on" allow_raw_sockets="1" boot="on"
Now it works.
 

PrincePaul

Patron
Joined
Feb 26, 2012
Messages
225
If I turn vnet off in the GUI it works. Is it a problem if I have it turned off? Why doesn't my setup work with vnet on?

vnet is for a virtual network adapter which you don`t need in your case as you used igb0 which is a physical NIC.
So either:
1: Turn vnet off and use a NIC from your system
or
2: Turn vnet on and write vnet0 instead of igb0 to create/use a virtual network bridge from the jail to a physical NIC

Upps.. haven`t seen that you figured it our yourself :D

Just waiting for an update regarding this:
Hey guys, how am i supposed to update plex (with plexpass) once a new version is released?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Hey guys, how am i supposed to update plex (with plexpass) once a new version is released?
pkg upgrade or ports, at your preference.
 

Wolfeman0101

Patron
Joined
Jun 14, 2012
Messages
428
Hey guys, how am i supposed to update plex (with plexpass) once a new version is released? Should i still use this script: https://raw.githubusercontent.com/mstinaff/PMS_Updater/master/PMS_Updater.sh ?
It takes a few days to a week for the update to get ported. You can check here to see if it's updated: https://www.freshports.org/multimedia/plexmediaserver-plexpass/

Then run on your Plex jail.
Code:
pkg update && pkg upgrade


In the post for setting up Plex you can do this too to help get updates faster

If you would like to change to the latest repo to get faster updates to Plex than every month or so you can do that by creating the following file.
iocage exec plex "mkdir -p /usr/local/etc/pkg/repos"
iocage exec plex "vi /usr/local/etc/pkg/repos/FreeBSD.conf"
Code:
FreeBSD: {
	url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}
 
Last edited:

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
vnet is for a virtual network adapter which you don`t need in your case as you used igb0 which is a physical NIC.
So either:
1: Turn vnet off and use a NIC from your system
or
2: Turn vnet on and write vnet0 instead of igb0 to create/use a virtual network bridge from the jail to a physical NIC

Upps.. haven`t seen that you figured it our yourself :D

Just waiting for an update regarding this:
I appreciate the explanation. So iocage create -n "plexpass" -p /tmp/pkg.json -r 11.1-RELEASE ip4_addr="igb0|192.168.5.62/24" defaultrouter="192.168.5.1" vnet="off" allow_raw_sockets="1" boot="on" would also work.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
Having a problem with sonarr install. It runs but give an error in the log
Code:
Import failed, path does not exist or is not accessible by Sonarr: /mnt/media/downloads/sabnzbd/complete/tv/tvshow.S01E01.example

My setup is Sabnzbd in a separate Warden Jail downloading completed stuff to /mnt/media/downloads/sabnzbd/complete/tv
Sonarr is in an iocage jail with the following mount points.

Code:
+-------+------------------------------------------------------------------------+
| INDEX |							  FSTAB ENTRY							   |
+=======+========================================================================+
| 0	 | /mnt/v1/apps/sonarr /mnt/iocage/jails/sonarr/root/config nullfs rw 0 0 |
+-------+------------------------------------------------------------------------+
| 1	 | /mnt/v1/media /mnt/iocage/jails/sonarr/root/mnt/media nullfs rw 0 0	|
+-------+------------------------------------------------------------------------+


The owner of my /mnt/media/downloads/sabnzbd/complete/tv directory is media:media
Code:
drwxrwxrwx+ 133 media  media		  133 Jan 29 19:35 tv

my /etc/group has an entry in the sonarr iocage jail is
media:*:8675309:sonarr

I'm not sure if this is a permission problem or something else.
 
Last edited:
Top