How to Install NZBGet Usenet Client on Ubuntu & Linux Mint

NZBGet is a free open-source Usenet client for downloading binary content (image, audio, video, e-book, etc.) on Usenet. It’s cross-platform, available for Linux, macOS, Windows, BSD and Android. This tutorial is going to show you how to install NZBGet on Ubuntu and Linux Mint.

Install NZBGet Usenet Client on Ubuntu & Linux Mint

NZBGet Feature

  • Super lightweight and fast (consumes about 1.5MB RAM on startup).
  • A responsive web interface allows you to configure and control it from a web browser.
  • It also comes with a command-line interface.
  • Multiple Usenet servers (providers) are supported.
  • Fast par-rename helps you restore original file names.
  • Apps like Sonarr, Sickrage, CouchPotato, and Headphones can integrate with NZBGet and automate your download process.
  • NZBGet can also read and process RSS feeds.
  • NZB (Newz Binary) indexer integration. An NZB file is like a torrent file and an NZB indexer is like a torrent site.
  • And many more

Install NZBGet Usenet Client on Ubuntu & Linux Mint

NZBGet is available from the default repository, so you can open up a terminal and install it with apt package manager.

sudo apt install nzbget

To check your NZBGet version, run

nzbget --version

Sample output:

nzbget version: 21.0

NZBGet is started from the command line like below. It will run in daemon mode (in the background) and use the /etc/nzbget.conf configuration file. (Please don’t run it with sudo privilege.)

nzbget --daemon --configfile /etc/nzbget.conf

If you run the following command, you will find it listens on 127.0.0.1:6789. (If your Ubuntu server doesn’t have the netstat command, you can run sudo apt install net-tools command to install it.)

sudo netstat -lnpt | grep nzbget

nzbget ubuntu

NZBGet Web Interface

Now you can enter 127.0.0.1:6789 in the address bar of your web browser to access NZBGet web interface. If you installed NZBGet on a remote server, you need to set up a reverse proxy with Nginx or Apache in order to access the web UI, which is explained later in this tutorial.

When you first visit the web interface, you need to enter the username and password, which can be found in the NZBGet configuration file (/etc/nzbget.conf).  The default username is nzbget and the default password is tegbzn6789.

nzbget username and password

After login, you can change the password by clicking Settings -> Security and then change the ControlPassword. Then save the changes.

nzbget ubuntu 18.04

Note that your user account needs to have write permission on the configuration file in order to save your settings. You can run the following command to grant permission. Replace username with your real username.

sudo setfacl -R -m u:username:rwx /etc/nzbget.conf

Next, you should configure the Usenet account that will be used to download binary files. You need a Usenet account at a Usenet provider in order to access Usenet. I use NewsDemon, which offers 15 days free trial. The server details can be obtained from your Usenet provider.

Once you have a Usenet account, go to Settings -> News-Servers to enter the following details.

  • host address
  • port number
  • username
  • password
  • Enable encryption
  • Maximum number of simultaneous connections to this server

install nzbget on ubuntu 18.04

Then you can scroll down and click the Test connection button. If the connection is successful, save the changes and reload NZBGet.

In order to download content (image, audio, video, e-book, etc.) from Usenet, you need to feed an NZB file to NZBGet. NZB file, which is similar to .torrent file, can be download from Usenet index sites like nzbfinder.ws. Most of these sites are based on a freemium model. You have the option to build your own free Usenet indexer, but now for a Usenet beginner, it’s a good idea to register free accounts with these Usenet index sites to see what’s available to you.

As you can see from the screenshot, the download speed is quite fast. (23 MB/s = 184 Mbit/s) I can download a 1GB file in less than one minute.

nzbget ubuntu repository

How to Change the Download Destination Folder

The default download destination folder is the ~/downloads . If you want to change it to another directory, for example, your external hard drive, click Settings -> Paths and change the value of MainDir.

nzbget ubuntu server

Create a Systemd Service Unit for NZBGet

To enable auto-start at boot time, we can create a Systemd service unit for NZBGet. Use a command-line text editor such as Nano to create a Systemd service for NZBGet.

sudo nano /etc/systemd/system/nzbget.service

Put the following text into the file. Replace username with your real username.

[Unit]
Description=NZBGet Binary News File Grabber
After=network.target

[Service]
Type=forking
User=username
Group=username
ExecStart=/usr/bin/nzbget --daemon --configfile /etc/nzbget.conf
ExecReload=/usr/bin/nzbget --reload
ExecStop=/usr/bin/nzbget --quit
Restart=always
SyslogIdentifier=NZBGet

[Install]
WantedBy=multi-user.target

Save and close the file. (To save a file in Nano text editor, press Ctrl+O, then press Enter to confirm. To close the file, press Ctrl+X.) Then reload Systemd.

sudo systemctl daemon-reload

Before starting NZBGet with Systemd, we need to stop the current nzbget process.

nzbget --quit

Now we can use the systemd service to start NZBGet.

sudo systemctl start nzbget

Enable auto-start at boot time.

sudo systemctl enable nzbget

Now check NZBGet status.

systemctl status nzbget

Sample output:

nzbget systemd service linux

Setting Up Reverse Proxy

To access the NZBGet web interface from a remote connection (e.g. outside your LAN) using a domain name, you can set up reverse proxy with Nginx or Apache.

If you don’t have a real domain name, I recommend going to NameCheap to buy one. The price is low and they give whois privacy protection free for life.

Nginx

Install Nginx on Ubuntu.

sudo apt install nginx

Start Nginx web server.

sudo systemctl start nginx

Then create a new server block file in /etc/nginx/conf.d/ directory.

sudo nano /etc/nginx/conf.d/nzbget.conf

Paste the following text into the file. Replace nzbget.your-domain.com with your preferred domain name and don’t forget to create DNS A record for it.

server {
       listen 80;
       listen [::]:80;
       server_name nzbget.your-domain.com;

       location / {
              proxy_pass http://127.0.0.1:6789;
              proxy_set_header Host $http_host;
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Proto $scheme;
        }
}

Save and close the file. Then test Nginx configuration.

sudo nginx -t

If the test is successful, reload Nginx.

sudo systemctl reload nginx

Now you can access the NZBGet Web interface via nzbget.your-domain.com.

Apache

If you use Apache web server rather than Nginx, then follow the instructions below to set up reverse proxy.

Install Apache web server.

sudo apt install apache2

To use Apache as a reverse proxy, we need to enable the proxy modules and we will also enable the rewritemodule.

sudo a2enmod proxy proxy_http rewrite

Then create a virtual host file for NZBGet.

sudo nano /etc/apache2/sites-available/nzbget.conf

Put the following texts into the file. Replace nzbget.your-domain.com with your actual domain name and don’t forget to set DNS A record for it.

<VirtualHost *:80>
    ServerName nzbget.your-domain.com

    ProxyPass / http://127.0.0.1:6789/
    ProxyPassReverse / http://127.0.0.1:6789/
</VirtualHost>

Save and close the file. Then enable this virtual host.

sudo a2ensite nzbget.conf

Reload Apache for the changes to take effect.

sudo systemctl reload apache2

Now you can remotely access NZBGet by entering the domain name (nzbget.your-domain.com ) in browser address bar.

Enable HTTPS

To encrypt the HTTP traffic when you visit the NZBGet web interface from outside, we can enable HTTPS by installing a free TLS certificate issued from Let’s Encrypt. Run the following command to install Let’s Encrypt client (certbot) on Ubuntu.

sudo apt install certbot

If you use Nginx, then you also need to install the Certbot Nginx plugin.

sudo apt install python3-certbot-nginx

Next, run the following command to obtain and install a TLS certificate.

sudo certbot --nginx --agree-tos --redirect --hsts --staple-ocsp --email [email protected] -d nzbget.your-domain.com

If you use Apache, then you need to install the Certbot Apache plugin.

sudo apt install python3-certbot-apache

Next, run the following command to obtain and install a TLS certificate.

sudo certbot --apache --agree-tos --redirect --hsts --staple-ocsp --email [email protected] -d nzbget.your-domain.com

Where:

  • --nginx: Use the Nginx plugin.
  • --apache: Use the Apache plugin.
  • --agree-tos: Agree to terms of service.
  • --redirect: Force HTTPS by 301 redirect.
  • --hsts: Add the Strict-Transport-Security header to every HTTP response. Forcing the browser to always use TLS for the domain. Defends against SSL/TLS Stripping.
  • --staple-ocsp: Enables OCSP Stapling. A valid OCSP response is stapled to the certificate that the server offers during TLS.

The certificate should now be obtained and automatically installed.

nzbget ubuntu autostart

Wrapping Up

That’s it! I hope this tutorial helped you install NZBGet on Ubuntu & Linux Mint. As always, if you found this post useful, then subscribe to our free newsletter to get more tips and tricks. Take care 🙂

Rate this tutorial
[Total: 5 Average: 4.8]

5 Responses to “How to Install NZBGet Usenet Client on Ubuntu & Linux Mint

  • Thanks for the great tutorials…they really are a great Help..Cheers Mc

  • Very nice tutorial, everything works the first time. Thanks a lot.

  • John Doe
    4 years ago

    omg…..thank you!

  • Nice One Linuxbabe. I’ve used your recommended usenet server and everything works well!

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here