Install NZBGet Stable Ubuntu from PPA

nzbgetNZBGet – the lightweight usenet downloader – enjoys regular updates from its developer hugbug. Usually you have to build NZBGet from source but thanks to Mike and his repo that is no longer necessary. He has precompiled packages on his PPA so you will have NZGet up and running in minutes. Afterwards you can set it up with CouchPotato, Sonarr, SickRage, Mylar and Headphones to automate your usenet experience. This guide will show you how to install NZBGet without having to build from source on Ubuntu. I will assume you are running Ubuntu 14.04 but there is a modification if you are running Ubuntu 12.04 included in the guide.

Update: Use this guide for easy NZBGet updates

Install NZBGet Stable Ubuntu from PPA

Update repo packages

sudo apt-get update

Install working unrar

sudo apt-get install unrar -y

Install NZBGet from Mike’s repo

Add Mike’s keys

sudo apt-add-repository ppa:modriscoll/nzbget

Update your repositories to reflect the changes

sudo apt-get update

Install NZBGet force yes is necessary to avoid the verified key error

sudo apt-get install nzbget -y --force-yes

Copy the NZBGet default configuration

sudo cp /usr/share/nzbget/nzbget.conf ~/.nzbget

Take ownership of the NZBGet configuration file with your user

sudo chown user:user ~/.nzbget

Edit your NZBGet configuration

sudo nano ~/.nzbget

Use Ctrl+W to find DaemonUsername=root and change it to your user


Ctrl+X, Y and Enter to save

Make NZBGet start on boot, you can use the init.d script or the upstart script.

NZBGet init.d Script

Create the init.d script

sudo nano /etc/init.d/nzbget

Paste this NZBGet init.d script, change user to your username, adjust /usr/bin/nzbget to /opt/nzbget/nzbget if you are using the newer guide on Ubuntu 14.x

# Provides:          nzbget
# Required-Start:    $local_fs $network $remote_fs
# Required-Stop:     $local_fs $network $remote_fs
# Should-Start:      $NetworkManager
# Should-Stop:       $NetworkManager
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts instance of NZBGet
# Description:       starts instance of NZBGet using start-stop-daemon

# Source init functions
. /lib/lsb/init-functions
# Start/stop the NZBget daemon.
case "$1" in
start)   echo -n "Start services: NZBget"
/usr/bin/nzbget -D -c /home/user/.nzbget
stop)   echo -n "Stop services: NZBget"
/usr/bin/nzbget -Q
$0 stop
$0 start
*)   echo "Usage: $0 start|stop|restart"
exit 1
exit 0

Ctrl+X, Y and Enter to save

Make the NZBGet init.d script executable

sudo chmod +x /etc/init.d/nzbget

Update the system to start NZBGet on boot

sudo update-rc.d nzbget defaults

Reboot to test, if it will only work once the system has been up you can use a cronjob in conjunction with the init.d script.

This command adds a cronjob to start nzbget every time it boots if the init.d script isn’t doing the job

crontab -l | { cat; echo "@reboot nzbget -D" ; } | crontab -

NZBGet Upstart Script

Install upstart

sudo apt-get install upstart

Create the NZBGet upstart script

sudo nano /etc/init/nzbget.conf

Paste Ben‘s upstart script, replace username in setuid and setgid lines to the user you log on with.

#description "NZBGet upstart script"
#author "Ben Vassie"
setuid username
setgid username
start on runlevel [2345]
stop on runlevel [016]
exec nzbget -D
end script
pre-stop script
exec nzbget -Q
end script

Now you can configure NZBGet and use some of its useful scripts like FakeDetector and FailureLink.

You can also use NZBGet with SickRage, CouchPotato, Sonarr and Mylar.