Installing NZBGet on TrueNAS 12

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

  1. iocage exec nzbget mkdir -p /downloads
    # Adds the folder “downloads” in the jail
  2. iocage exec nzbget mkdir -p /incomplete
    # Adds the folder “incomplete” in the jail
  3. iocage 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 jail
  4. iocage 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 jail
  5. iocage exec nzbget "pw groupadd -n media -g 8675309"
  6. iocage exec nzbget "pw user add media -c media -u 8675309 -d /nonexistent -s /usr/bin/nologin"
  7. iocage exec nzbget chown -R media:media /downloads /incomplete
  8. iocage exec nzbget sysrc 'nzbget_user=media'
  9. iocage exec nzbget pkg install unrar
  10. iocage exec nzbget sysrc nzbget_enable=YES
  11. 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!!