Help with manually installing NZBget!

Arman

Patron
Joined
Jan 28, 2016
Messages
243
Hello!

I have attempted multiple times to install NZBget as a plugin but I have failed. I would deeply appreciate it if someone explains how I can do this!

Thank you in advance.
 

Arman

Patron
Joined
Jan 28, 2016
Messages
243
There currently isn't a plugin for it. Have you tried creating an iocage jail and installing the pkg using the instructions in https://www.ixsystems.com/documentation/freenas/11.2/jails.html?
Thanks for the reply! Im really desperate to get this working! It's bee far too long! Last time I used NZBget was on FreeNAS Corral...

I created a jail and I typed into the shell "pkg install nzbget". I get the following:
Screenshot 2019-01-12 at 8.30.58 pm.png
 
D

dlavigne

Guest
Were you able to resolve this? That error message indicates no gateway or DNS has been set.
 

Arman

Patron
Joined
Jan 28, 2016
Messages
243
They were all set, already. I can't seem to find the problem. I would really really appreciate it if you could set up NZBget on your own server and make a simple tutorial on it if you can be bothered.

Thanks a lot!
Screenshot 2019-01-22 at 11.39.08.png



Screenshot 2019-01-22 at 11.37.14.png
 

Ixian

Patron
Joined
May 11, 2015
Messages
218
First thing you want to do is check your Global Configuration settings under "Network" in the GUI. Make sure you have your correct default gateway and DNS (the two can be the same, assuming your gateway also does DNS like most consumer models do) set. Also a good idea to set the correct timezone there.

Then restart network services (I believe changes to the Global Config will do it for you) and restart the jail. From a console in the jail try to ping out to both an ip (4.2.2.1 is a good one) and FQDN (google.com, etc.). If you can't, something is off with your network config for sure.

As for the jail creation; I use SABNZBD, not nzbget, but I can give you a basic guide - can't guarantee it's step by step so don't blindly cut&paste, but should give you enough to get started:

First, in the Freenas GUI:
A) Create, or pick, the directory where you want the jail's configuration data to reside. I recommend something outside the jail itself. I personally created an "Appdata" dataset on my jail pool and then a sub-dataset called "jailhouse" under it for this. Looks like this:

/mnt/Jails/appdata/jailhouse

Where "Jails" is my pool.

B) Do the same for your downloads directory, where nzbget will store the stuff it downloads. I use a common download path /mnt/Jails/appdata/downloads since it's shared with other jails like Radarr, Sonarr, etc. I imagine you have the same needs.

C) I find, for a "home media NAS" use case, for it to be much easier to use the common "media" user and group for all apps/jails that share media. In newer versions of Freenas that user/group is PID/GID 8675309 (Jeeenny I got your number....if you don't know that song yet, it's about to get stuck in your head forever). Remember those.

Whatever you end up using, from a permissions standpoint it's important that you remember the user & group ids you give the above datasets in Freenas permission to since you'll be replicating those in the jail itself.

So, going by my examples above:

Create /mnt/<JAILS>/appdata/jailhouse and /mnt/<JAILS>/appdata/downloads datasets in the Freenas GUI, where <JAILS> is the name of the pool you want this all to reside on. Or pick something you already have set up.

Assign permissions to the datasets for the media user & group (also in GUI, right click the dataset and select Modify Permissions). Or use your own user/group, just remember the ids.

Now you are ready to create the jail. Let's just start fresh, and blow whatever existing nzbget jail you created away first since you couldn't get it working. I've put basic explanations under each statements starting with # and remember to substitute your paths and users:

From a Freenas shell:

echo '{"pkgs":["nzbget","ca_root_nss"]}' > /tmp/pkg.json
#This will create a temp file with the packages needed in the jail. Not required, just cleaner to do it this way.
#I believe the only other package nzbget needs is ca_root but not positive on this point

Code:
iocage create -n "nzbget" -p /tmp/pkg.json -r 11.2-RELEASE ip4_addr="vnet0|192.168.86.232/24" defaultrouter="192.168.86.1" vnet="on" allow_raw_sockets="1" boot="on"

#This creates the jail, named "nzbget", installing the packages from the temp file we created in the first step. 11.2 is the release you want to use assuming of course you are actually using Freenas 11.2. <IP> is the address you want to assign the jail, <MASK> is the subnet mask, <GATEWAY> is, of course, your default gateway ip. Should look something like this:
Code:
iocage create -n "nzbget" -p /tmp/pkg.json -r 11.2-RELEASE ip4_addr="vnet0|192.168.0.10/24" defaultrouter="192.168.0.1" vnet="on" allow_raw_sockets="1" boot="on"


You should get a success message.

rm /tmp/pkg.json
#Don't need the temp file anymore, clean it out

mkdir -p /<APPDATA_PATH/nzbget
#Create the nzbget directory in the dataset you created (not the jail).
#Example: mkdir -p/mnt/appdata/jailhouse/nzbget

Note for the following commands
iocage exec nzbget
is running the command inside the jail itself. You could also
iocage console nzbget
to use a shell inside the jail and run everything directly but let's keep this simple.

iocage exec nzbget mkdir -p /config iocage exec nzbget mkdir -p /downloads
#Create /config and /download directories inside the jail itself. Note: I am not sure if nzbget already creates these, if so you'll get a message they already exist, no big deal

iocage fstab -a nzbget /<APPDATA_PATH> /config nullfs rw 0 0
#Mount the dataset you created for appdata to the directory "config" you created in the step above inside the jail.
#Example: iocage fstab -a nzbget /mnt/appdata/jailhouse/nzbget /config nullfs rw 0 0

iocage fstab -a nzbget /<DOWNLOAD_PATH> /downloads nullfs rw 0 0
#Same as above step, for downloads directory.
#Example: iocage fstab -a nzbget /mnt/appdata/downloads /downloads nullfs rw 0 0

iocage exec nzbget ln -s /usr/local/bin/python2.7 /usr/bin/python iocage exec nzbget ln -s /usr/local/bin/python2.7 /usr/bin/python2
#Link Python2.7 to "Python" and "Python2" because that is what apps usually look for when trying to run Python scripts

Code:
iocage exec nzbget "pw groupadd -n media -g 8675309"

#Adds a group in the Jail called media with an id of 8675309. MAKE SURE YOU USE THE SAME GROUP AND USER ID as the ones you assigned permissions to for <APPDATA> and <DOWNLOADS>

Code:
iocage exec nzbget "pw user add media -c media -u 8675309 -d /nonexistent -s /usr/bin/nologin"

#Adds the media user with same id, adds to media group, sets no shell (not needed) and no login (also not needed).

Code:
iocage exec nzbget chown -R media:media /downloads /config

#Gives the media user/group you just created ownership of the downloads and config directory in the jail, which should match up with your pools.
*NOTE* This is the number one thing new users screw up when creating jails. Make sure the directories and user/group permissions inside the jail match the same of the dataset they are linked to outside of it.

iocage exec nzbget sysrc nzbget_enable=YES
#Enable auto start for nzbget

iocage exec nzbget sysrc nzbget_conf_dir="/config"
#Make sure nzbget knows where to look for its config directory, which you set up in the proceeding steps
iocage exec nzbget service nzbget start
#Pretty obvious what this does


Note: I am not sure if the nzbget pkg includes a startup script though I'm guessing it does. If not you'll need to create one, let me know.

Otherwise you should now be able to browse to
http://<jailipaddress>:6789
and finish setup. Remember, to nzbget, the download path will be "/downloads"

Hopefully this works for you, or at least gets you along the way.
 
Last edited:

ninjaneer68

Dabbler
Joined
May 14, 2017
Messages
27
Has anyone tried this yet ? Going to try this next weekend when I get a chance to work on my setup.
 

dgs2001

Dabbler
Joined
Oct 28, 2012
Messages
26
First thing you want to do is check your Global Configuration settings under "Network" in the GUI. Make sure you have your correct default gateway and DNS (the two can be the same, assuming your gateway also does DNS like most consumer models do) set. Also a good idea to set the correct timezone there.

Then restart network services (I believe changes to the Global Config will do it for you) and restart the jail. From a console in the jail try to ping out to both an IP (4.2.2.1 is a good one) and FQDN (google.com, etc.). If you can't, something is off with your network config for sure.

As for the jail creation; I use SABNZBD, not nzbget, but I can give you a basic guide - can't guarantee it's step by step so don't blindly cut&paste, but should give you enough to get started:

First, in the Freenas GUI:
A) Create, or pick, the directory where you want the jail's configuration data to reside. I recommend something outside the jail itself. I personally created an "Appdata" dataset on my jail pool and then a sub-dataset called "jailhouse" under it for this. Looks like this:

/mnt/Jails/appdata/jailhouse

Where "Jails" is my pool.

B) Do the same for your downloads directory, where nzbget will store the stuff it downloads. I use a common download path /mnt/Jails/appdata/downloads since it's shared with other jails like Radarr, Sonarr, etc. I imagine you have the same needs.

C) I find, for a "home media NAS" use case, for it to be much easier to use the common "media" user and group for all apps/jails that share media. In newer versions of Freenas that user/group is PID/GID 8675309 (Jeeenny I got your number....if you don't know that song yet, it's about to get stuck in your head forever). Remember those.

Whatever you end up using, from a permissions standpoint it's important that you remember the user & group ids you give the above datasets in Freenas permission to since you'll be replicating those in the jail itself.

So, going by my examples above:

Create /mnt/<JAILS>/appdata/jailhouse and /mnt/<JAILS>/appdata/downloads datasets in the Freenas GUI, where <JAILS> is the name of the pool you want this all to reside on. Or pick something you already have set up.

Assign permissions to the datasets for the media user & group (also in GUI, right click the dataset and select Modify Permissions). Or use your own user/group, just remember the ids.

Now you are ready to create the jail. Let's just start fresh, and blow whatever existing nzbget jail you created away first since you couldn't get it working. I've put basic explanations under each statements starting with # and remember to substitute your paths and users:

From a Freenas shell:

echo '{"pkgs":["nzbget","ca_root_nss"]}' > /tmp/pkg.json
#This will create a temp file with the packages needed in the jail. Not required, just cleaner to do it this way.
#I believe the only other package nzbget needs is ca_root but not positive on this point

Code:
iocage create -n "nzbget" -p /tmp/pkg.json -r 11.2-RELEASE ip4_addr="vnet0|192.168.86.232/24" defaultrouter="192.168.86.1" vnet="on" allow_raw_sockets="1" boot="on"

#This creates the jail, named "nzbget", installing the packages from the temp file we created in the first step. 11.2 is the release you want to use assuming of course you are actually using Freenas 11.2. <IP> is the address you want to assign the jail, <MASK> is the subnet mask, <GATEWAY> is, of course, your default gateway IP. Should look something like this:
Code:
iocage create -n "nzbget" -p /tmp/pkg.json -r 11.2-RELEASE ip4_addr="vnet0|192.168.0.10/24" defaultrouter="192.168.0.1" vnet="on" allow_raw_sockets="1" boot="on"


You should get a success message.

rm /tmp/pkg.json
#Don't need the temp file any more, clean it out

mkdir -p /<APPDATA_PATH/nzbget
#Create the nzbget directory in the dataset you created (not the jail).
#Example: mkdir -p/mnt/appdata/jailhouse/nzbget

Note for the following commands
iocage exec nzbget
is running the command inside the jail itself. You could also
iocage console nzbget
to use a shell inside the jail and run everything directly but let's keep this simple.

iocage exec nzbget mkdir -p /config iocage exec nzbget mkdir -p /downloads
#Create /config and /download directories inside the jail itself. Note: I am not sure if nzbget already creates these, if so you'll get a message they already exist, no big deal

iocage fstab -a nzbget /<APPDATA_PATH> /config nullfs rw 0 0
#Mount the dataset you created for appdata to the directory "config" you created in the step above inside the jail.
#Example: iocage fstab -a nzbget /mnt/appdata/jailhouse/nzbget /config nullfs rw 0 0

iocage fstab -a nzbget /<DOWNLOAD_PATH> /downloads nullfs rw 0 0
#Same as above step, for downloads directory.
#Example: iocage fstab -a nzbget /mnt/appdata/downloads /downloads nullfs rw 0 0

iocage exec nzbget ln -s /usr/local/bin/python2.7 /usr/bin/python iocage exec nzbget ln -s /usr/local/bin/python2.7 /usr/bin/python2
#Link Python2.7 to "Python" and "Python2" because that is what apps usually look for when trying to run Python scripts

Code:
iocage exec nzbget "pw groupadd -n media -g 8675309"

#Adds a group in the Jail called media with an id of 8675309. MAKE SURE YOU USE THE SAME GROUP AND USER ID as the ones you assigned permissions to for <APPDATA> and <DOWNLOADS>

Code:
iocage exec nzbget "pw user add media -c media -u 8675309 -d /nonexistent -s /usr/bin/nologin"

#Adds the media user with same id, adds to media group, sets no shell (not needed) and no login (also not needed).

Code:
iocage exec nzbget chown -R media:media /downloads /config

#Gives the media user/group you just created ownership of the downloads and config directory in the jail, which should match up with your pools.
*NOTE* This is the number one thing new users screw up when creating jails. Make sure the directories and user/group permissions inside the jail match the same of the dataset they are linked to outside of it.

iocage exec nzbget sysrc nzbget_enable=YES
#Enable auto start for nzbget

iocage exec nzbget sysrc nzbget_conf_dir="/config"
#Make sure nzbget knows where to look for its config directory, which you set up in the proceeding steps
iocage exec nzbget service nzbget start
#Pretty obvious what this does


Note: I am not sure if the nzbget pkg includes a startup script though I'm guessing it does. If not you'll need to create one, let me know.

Otherwise you should now be able to browse to
http://<jailipaddress>:6789
and finish setup. Remember, to nzbget, the download path will be "/downloads"

Hopefully this works for you, or at least gets you along the way.


Great Guide Thanks.

Just two additional things I had to do -
iocage exec nzbget sysrc nzbget_conf_dir="/config"

This does not seem to work, I ended up using vi to edit the conf file -
Goto Jails in the freenas gui
click the three dots to the right of nzbget and select 'shell' from the choices (if shell is not an option you will need to start the nzbget service)
in the shell window the prompt should be root@nzbget:~ #

navigate to '/usr/local/etc and vi into nzbget.conf
cd /usr/local/etc vi nzbget.conf

in the config file change the following lines

WebDir=
ConfigTemplate=
ControlUsername=nzbget
ControlPassword=tegbzn6789

to
WebDir=/usr/local/share/nzbget/webui ConfigTemplate=/usr/local/share/nzbget/nzbget.conf ControlUsername= ControlPassword=

Exit vi and restart nzbget from the three dot menu in jails.
You should now have a working nzbget web interface.

I'm just a novice so please let me know if theres a better way.

Now Im off to work out how to link couch potato to nzbget..................
 
Top