Install NZBGet 14 Stable on Debian Linux

nzbgetNZBGet is a super lightweight usenet downloader written in C++. It is preferred by some over sabnzbd because it runs on weaker machines with less processing power so it can run on a NAS or Raspberry Pi. Actively developed and with an array of post-processing scripts it is a viable usenet downloader. If you want to install the latest development build from source with my other guide

Update: you should now use this newer and updated guide

Usenet Provider
Backbone
Retention
Speed
Connections
VPN
Monthly
Annual
UsenetServer
UsenetServer
2265
Unlimited
20
Yes
$10
$95.40
Usenetlink
Cloudgate
2000
100 Mbit
30
No
$15
$140
Astraweb
Astraweb
2264
Unlimited
20
No
$7.50
$96.00
UsenetBucket
XS News
1100
40 Mbit
25
No
€4.95
€60.00
Frugal
Blocknews
600
Unlimited
60
No
$4.99
$50.00

Install NZBGet Debian

Update and upgrade

apt-get update
apt-get upgrade -y

Install dependencies

apt-get install build-essential libsigc++-dev sigc++ libncurses5-dev libssl-dev libxml2-dev libpar2-0-dev unrar unzip p7zip-full -y

Grab NZBGet 14 source

wget http://sourceforge.net/projects/nzbget/files/nzbget-14.2.tar.gz

Unpack the source and enter the folder it creates

tar -xvf nzbget-14.2.tar.gz && cd nzbget-14.2

Grab updated libpar2 which nzbget needs to par check rar files

Note: This fixes the ‘nzbget: error while loading shared libraries: libpar2.so.1: cannot open shared object file: No such file or directory’. Run apt-get install libpar2-dev first and then run the following which will solve the problem so you can compile nzbget without errors.

wget http://launchpad.net/libpar2/trunk/0.4/+download/libpar2-0.4.tar.gz

Unpack libpar 2 and enter its folder

tar -xvf libpar2-0.4.tar.gz && cd libpar2-0.4

Compile libpar2

./configure && make && make install

Go to nzbget directory

cd ..

Compile, install and create the configuration file for nzbget 14

./configure && make && sudo make install && sudo make install-conf

Run the nzbget daemon

nzbget -D

Now try and access NZBGet at http://ip.address:6789 username:nzbget password:tegbzn6789

Let’s make it autostart on boot using an init.d script

Fire up WinSCP browse to and create /etc/init.d/nzbget or nano to create the empty file

nano /etc/init.d/nzbget

Paste this code and save the file

#!/bin/sh
# Start/stop the NZBget daemon.
#
case "$1" in
start)   echo -n "Start services: NZBget"
/usr/local/bin/nzbget -D
;;
stop)   echo -n "Stop services: NZBget"
/usr/local/bin/nzbget -Q
;;
restart)
$0 stop
$0 start
;;
*)   echo "Usage: $0 start|stop|restart"
exit 1
;;
esac
exit 0

Make the configuration file executable and update the init.d to be used at boot

chmod +x /etc/init.d/nzbget && update-rc.d nzbget defaults

Create /downloads folder or you will get errors that looks like this during the boot sequence

Start services: NZBgetnzbget.conf(49): Invalid value for option "InterDir" (/downloads/inter/): could not create directory :
nzbget.conf(70): Invalid value for option "TempDir" (/downloads/tmp/): could not create directory :
nzbget.conf(67): Invalid value for option "QueueDir" (/downloads/queue/): could not create directory :
nzbget.conf(61): Invalid value for option "NzbDir" (/downloads/nzb/): could not create directory :

These nzb.conf errors can be solved by creating the /downloads directory

mkdir /path/to/downloads

Now NZBGet will start automatically on boot.