Set Up a Streaming Media Server – Pt. 3 – Install SABnzbd
You’ve might have heard about this thing called Usenet. Back in the day in the early days of the internet (80′s and 90′s), it was essentially a message board system where you could post stuff for people to see. Eventually people figured out how to post binary data (aka files). Today it’s one of the best ways to get pirated material.
It works a little differently than torrents. The way it works is you subscribe to a Usenet service provider. These providers actually host the files you want to download. Then you use a website to search for NZB files, which contain the information about where to download the files. So instead of being decentralized, like torrents, it’s more centralized. You would think this would be a bad thing, and it is in some ways. Many Usenet service providers are very compliant with DMCA takedown requests. On the plus side, the Usenet service provider servers are VERY fast and when you’re downloading the file it will download as fast as your little internet connection can take it. This way the speed of the download isn’t dependent on how many people are seeding the file.
Another plus side of using Usenet is you’ll be connecting to the Usenet servers using SSL. This creates a secure connection between your computer and the Usenet provider, so your ISP or anyone in-between can’t see what’s going on.
Because Usenet service providers comply with DMCA takedown notices, it’s harder to find older stuff on Usenet, but for our purposes, it’s perfect. We’re downloading episodes of TV shows that have just aired, so we’ll have the file downloaded long before the file is taken down.
SABnzbd is a service that runs on your media sever that has a web front end. It opens the NZB files, processes them, downloads the right files, then puts everything together. Let’s start installing!
We need to create a few folders to store and organize all our files. From your home directory, we’ll create a Downloads folder, and several folders inside for organization purposes.
mkdir Downloads mkdir Downloads/Completed mkdir Downloads/Incomplete mkdir Downloads/NZBs mkdir Downloads/Torrents mkdir Downloads/Movies
Once this is done, we’ll install a few prerequisites, as well as SABnzbd.
Install and Configure
sudo apt-get install git-core python python-cheetah python-software-properties sabnzbdplus
Now let’s do a little configuring.
cd /etc/default sudo vim sabnzbdplus
You’ll want to change a few settings here, mainly the USER=, which would be the username used on the server. HOST=0.0.0.0 means that anyone can connect from any IP. The 0 acts as a wildcard.
# This file is sourced by /etc/init.d/sabnzbdplus # # When SABnzbd+ is started using the init script, the # --daemon option is always used, and the program is # started under the account of $USER, as set below. # # Each setting is marked either "required" or "optional"; # leaving any required setting unconfigured will cause # the service to not start. # [required] user or uid of account to run the program as: USER=server # [optional] full path to the configuration file of your choice; # otherwise, the default location (in $USER's home # directory) is used: CONFIG= # [optional] hostname/ip and port number to listen on: HOST=0.0.0.0 PORT=8080 # [optional] extra command line options, if any: EXTRAOPTS=
Once you’ve saved this file, you’ll want to start the SABnzbd service
service sabnzbdplus start
Now we need to edit another configuration file.
cd ~/.sabnzbd/ sudo vim sabnzbd.ini
This is a pretty long file, but we’re only interested in a few different parts. Dirscan_dir is where SABnzbd will look for new NZB files to process. This will be set to Downloads/NZBs. We want to make sure everything is writable so we don’t run into any weird permissions issues. We want to make sure we’re able to connect from any IP. We also want to specify where we will be downloading the files as they’re coming in, and where to put them when they’re finally done.
dirscan_dir = /home/server/Downloads/NZBs permissions = 777 host = 0.0.0.0 download_dir = /home/server/Downloads/Incomplete complete_dir = /home/server/Downloads/Completed
Once these changes have been made and the file is saved, we’ll restart SABnzbd.
service sabnzbdplus restart
You’ll need to subscribe to a Usenet service and put that information into SABnzbd. One such provider is Giganews, but there are several of them out there. Log into your SABnzbd web interface by going to http://192.168.1.10:8080. After completing the setup wizard, you’ll need to put in the information given to you by your Usenet provider.
Once this is done, click the “General” tab. Copy what you see under API Key (if there’s nothing there, click “Generate New Key“) and paste it into notepad or something. We’ll need that later on.
Now you’ll be ready to start downloading NZB files.