Install NZBGet on Ubuntu 14.04

Install NZBGet on Ubuntu Linux

NZBGet is a popular Newsgroup download application. It is similar to SABnzbd but only in a generalized sense. NZBGet is much faster and easier on system resources, it has modern features, is easier to use and simply looks better. NZBGet 12 can be installed from the official repository but unfortunately version 13 needs to be compiled. Installing and configuring version 13 not as simple as it could be but the extra features are worth the effort.

 

Set up credentials

Create a system account that NZBGet will run under.

sudo useradd -r -s /bin/false -m nzbget

 

Create a group that NZBGet will run under.

sudo groupadd download

 

Change the primary group of the user.

sudo usermod -g download nzbget

 

Verify that the group has been added correctly.

groups nzbget

 

Compile & Install NZBGet

Update the package list.

sudo apt-get update

 

Install packages for optional features.

sudo apt-get install par2 rar unrar zip unzip p7zip-full

 

Download NZBGet source files for Linux and place it in the final installation directory. Alternatively you can download it directly.

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

 

Unpack the archive.

tar -zxf nzbget-13.0.tar.gz

 

Remove the downloaded archive.

sudo rm nzbget-13.0.tar.gz

 

Install prerequisite packages for compiling.

sudo apt-get install build-essential libncurses5-dev libssl-dev libxml2-dev libsigc++-2.0-dev libpar2-dev

 

Change the current directory to the unpacked directory.

cd nzbget-13.0

 

Configure NZBGet.

./configure --with-tlslib=OpenSSL

 

Compile NZBGet.

make

 

Install NZBGet.

sudo make install

 

Install default configuration file.

sudo make install-conf

 

Copy default configuration file to the home directory of NZBGet user.

sudo cp /usr/local/share/nzbget/nzbget.conf /home/nzbget/.nzbget

 

Remove the unpacked files.

sudo rm -dR ../nzbget-13.0

 

Set the ownership to the user and group NZBGet will run as.

sudo chown -R nzbget:download /home/nzbget

 

Set permissions to grant full access to NZBGet user.

sudo chmod -R 775 /home/nzbget

 

Run NZBGet daemon manually.

sudo nzbget -D

 

Access NZBGet in your browser on the default port 6789 and the current IP address. For example http://192.168.0.100:6789/. Log in with default username nzbget and password tegbzn6789.

 

Run NZBGet at Startup

Open or create a new upstart configuration file for NZBGet.

sudo nano /etc/init/nzbget.conf

 

Copy the script and save the configuration file.

description "NZBGet upstart script"
author "DominicM @ dominicm.com"

# Run as user
setuid nzbget

# Run as group
setgid download

# When to start the service
start on runlevel [2345]

# When to stop the service
stop on runlevel [016]

# Automatically restart process if crashed
respawn

# Start the process
script
exec nzbget -D
end script

# Run before stopping the process
pre-stop script
exec nzbget -Q
end script

 

Run NZBGet with upstart.

start nzbget

 

Stop NZBGet with upstart.

stop nzbget

 

Restart NZBGet with upstart.

restart nzbget

 

Quick reference

sudo adduser -r -s /bin/false -m nzbget
sudo groupadd download
sudo usermod -g download nzbget
groups nzbget
sudo apt-get update
sudo apt-get install par2 rar unrar zip unzip p7zip-full
wget http://sourceforge.net/projects/nzbget/files/nzbget-13.0.tar.gz
tar -zxf nzbget-13.0.tar.gz
sudo rm nzbget-13.0.tar.gz
sudo apt-get install build-essential libncurses5-dev libssl-dev libxml2-dev libsigc++-2.0-dev libpar2-dev
cd nzbget-13.0
./configure --with-tlslib=OpenSSL
make
sudo make install
sudo make install-conf
sudo cp /usr/local/share/nzbget/nzbget.conf /home/nzbget/.nzbget
sudo rm -dR ../nzbget-13.0
sudo chown -R nzbget:download /home/nzbget
sudo chmod -R 775 /home/nzbget
sudo nzbget -D

http://192.168.0.100:6789/

sudo nano /etc/init/nzbget.conf
start nzbget
stop nzbget
restart nzbget

dom