Whatbox Logo
Login for certain variables to be updated with your slot's information

Wiki > SABnzbd

SABnzbd is an Open Source Binary Newsreader written in Python.

SABnzbd now uses Python 3. If you are using an older version of SABnzbd, you will need to follow the installation instructions again to start SABnzbd with Python 3.

Installation

virtualenv

Follow the instructions in the virtualenv article to install and activate a Python 3 virtual environment. If you have previously set up a virtualenv, you may choose to re-use it or create a new one with a different name.

SABnzbd (stable release)

  1. Create the directory for SABnzbd:

     mkdir -p ~/SABnzbd
    
  2. Download SABnzbd from GitHub

     git clone --branch master https://github.com/sabnzbd/sabnzbd.git ~/SABnzbd
    
  3. Activate virtualenv (if not activated)

     source ~/virtualenv3/bin/activate
    
  4. Install Python dependencies for SABnzbd

     cd ~/SABnzbd; pip3 install -r requirements.txt; pip3 install feedparser==5.2.1; find . -name '*.pyc' -delete
    
  5. With your virtualenv activated, run SABnzbd in daemon mode. Port 12618 has been automatically generated for you, but you may use another 5 digit port between 10000 and 65535.

     python ~/SABnzbd/SABnzbd.py -d -b0 -f ~/.sabnzbd/sabnzbd.ini -s :::12618
    
  6. Open your browser and go to http://server.whatbox.ca:12618 and complete the setup wizard.

Once finished, go to http://server.whatbox.ca:12618/sabnzbd/config/general/ and set a username and password in the Security settings. Click Save Changes and then OK.

At the login screen, log in to SABnzbd using the username and password you set. Go to http://server.whatbox.ca:12618/sabnzbd/config/switches and click the Advanced box in the top right. Scroll down to Extra PAR2 Parameters and add -t4 then click Save Changes.

Usage

  • Open your browser and navigate to http://server.whatbox.ca:12618 to access the SABnzbd WebUI

  • If your SABnzbd stops, execute this command with your virtualenv activated to restart it (replacing 12618 if you chose your own port).

      python ~/SABnzbd/SABnzbd.py -d -b0 -f ~/.sabnzbd/sabnzbd.ini -s :::12618
    
  • Should you need to manually edit your config, it will be located in /home/user/.sabnzbd if you used the -f ~/.sabnzbd/sabnzbd.ini CLI option, otherwise it will be in the SABnzbd program directory

  • If you need to update SABnzbd, this command will update to the latest version

      cd ~/SABnzbd; git pull
    

Automatically Restart

Below are steps to take to have your SABnzbd instance automatically restart if it crashes, or if the server is rebooted.

  1. Make a file to be used for the script. touch ~/sabnzbd_restart.cron

  2. Edit the file and enter the text below. nano -w ~/sabnzbd_restart.cron

     #!/bin/bash
     if pgrep -fx "python /home/user/SABnzbd/SABnzbd.py -d -b0 -f /home/user/.sabnzbd/sabnzbd.ini -s :::12618" > /dev/null
     then
         echo "SABnzbd is running."
     else 
         echo "SABnzbd is not running, starting SABnzbd"
         /home/user/virtualenv3/bin/python /home/user/SABnzbd/SABnzbd.py -d -b0 -f /home/user/.sabnzbd/sabnzbd.ini -s :::12618
     fi
     exit
    
  3. Save the file with Ctrl+x and the "y" and Enter to accept overwriting.

  4. Make the script executable. chmod +x ~/sabnzbd_restart.cron

  5. Open your crontab. EDITOR=nano crontab -e

  6. Enter the following text

     @reboot /home/user/sabnzbd_restart.cron >/dev/null 2>&1
     */5 * * * * /home/user/sabnzbd_restart.cron >/dev/null 2>&1
    
  7. Save the crontab with Ctrl+x and the "y" and Enter to accept overwriting.

Browser Plugins

Google Chrome

Mozilla Firefox

Apple Safari