Updated guide is published here.
Since FreeNAS has been upgraded to TrueNAS, I am gradually updating the Jails to reflect the changes. One of the task is upgrade from SABNZBd to NZBGet, NZBGet codes run natively on TrueNAS and there should be performance gain by doing so.
Similar to my previous post on installing SABNZBd, the process is more or less similar, and TrueNAS did majority of the hard work already.
Prerequisite:
– A dataset created for the downloads (“Shared” in my example)
– “Shared” is own by default TrueNAS user “media” and group “media” (PID/GID 8675309)
– Downloads goes to /mnt/TrueNAS/Shared/z-complete
– Temporary files goes to /mnt/TrueNAS/Shared/z-incomplete
– SSH is enabled on TrueNAS
Use the Plugin section in TrueNAS to install the NZBGet plugin. Before we start the jail, we want to use terminal to access the console of the jail. For this example, the Jail name is “nzbget”, make note of the IP address
iocage exec nzbget mkdir -p /downloads
# Adds the folder “downloads” in the jailiocage exec nzbget mkdir -p /incomplete
# Adds the folder “incomplete” in the jailiocage fstab -a nzbget /mnt/TrueNAS/Shared/z-complete /downloads nullfs rw 0 0
# Adds a mount point in pool /mnt/TrueNAS/Shared/z-complete to /downloads in jailiocage fstab -a nzbget /mnt/TrueNAS/Shared/z-incomplete /incomplete nullfs rw 0 0
# Adds a mount point in pool /mnt/TrueNAS/Shared/z-incomplete to /incomplete in jailiocage exec nzbget "pw groupadd -n media -g 8675309"
iocage exec nzbget "pw user add media -c media -u 8675309 -d /nonexistent -s /usr/bin/nologin"
iocage exec nzbget chown -R media:media /downloads /incomplete
iocage exec nzbget sysrc 'nzbget_user=media'
iocage exec nzbget pkg install unrar
iocage exec nzbget sysrc nzbget_enable=YES
iocage exec sabnzbd service nzbget start
In the Settings of NZBGet:
Security -> DaemonUsername, change to “media”
Unpack -> UnrarCmd, change to “/usr/local/bin/unrar”
Paths -> MainDir, DestDir to “/downloads”
Paths -> InterDir to “/incomplete”
Save All Changes and enjoy!!