Part 3: USSSCP — Ubuntu, Samba, Sabnzbd+, Sickbeard, Couchpotato and Plex.

This is the third part in a series of tutorials to configure your server to automate your media and serve it to your home devices. Check out the other parts!

What Is Sickbeard?

Sick Beard is a PVR for newsgroup users (with limited torrent support). It watches for new episodes of your favorite shows and when they are posted it downloads them, sorts and renames them, and optionally generates metadata for them. It currently supports NZBs.org, NZBMatrix, NZBs’R’Us, Newzbin, Womble’s Index, NZB.su, TVTorrents and EZRSS and retrieves show information from theTVDB.com and TVRage.com (source)

So why would we want to use something like that to manage our downloads? Isn’t it obvious? The lazier we can be while still managing to get to watch the shows we want to watch, the happier we’ll be, and the more time we’ll have to go hunt down that nasty Joker fella, and put an end to his evil empire of crime. Simple.

Let’s get started.


Install the Pre-Requisites

You could just go to the sickbeard github repo and download the latest version from there, but why would you do that when we can make updating it so much easier by cloning the repo instead? If you don’t have them, install python and git. Also make sure you have python-cheetah installed.

sudo apt-get install git-core python python-cheetah

Install Sickbeard

Next let’s decide where you want to install Sickbeard. I’m going to install it to my home directory. You can install it wherever you want. Just move to that location. If you’re following along, let’s do the following.

cd ~
git clone git://github.com/midgetspy/Sick-Beard.git .sickbeard

This will clone sickbeard and download it to the folder “.sickbeard” in your home directory. The “.” in the front keeps the .sickbeard folder hidden. That’s it! You’ve installed Sickbeard.

Later on, if you need to update, it’s as easy as just navigating to the .sickbeard folder and typing the following:

git pull

The latest version will be pulled and your installation will be up to date.

Start Sickbeard

Let’s first create the autoprocessTV.cfg file before we start Sickbeard for the first time. Navigate to /home/USER/.sickbeard/ and enter the following:

cp -a autoProcessTV/autoProcessTV.cfg.sample autoProcessTV/autoProcessTV.cfg

“cp -a” will copy the file and preserve all the file data. Basically making an entire copy of the file. We are copying the autoProcessTV.cfg.sample file and renaming the new copy to autoProcessTV.cfg.

Now that we’ve made the autoProcessTV.cfg file, let’s go back into SABnzbd and get it to process our TV shows once it’s done downloading them, using the Sickbeard script.

  • Post-Processing Scripts Folder: The only thing that we need to include here is where the autoProcessTV folder is. If you installed it in your home directory, you can simply copy what I have here.

Now head to the Categories section, again in SABnzbd.

Under the tv category, choose Script. Select the sabToSickBeard.py option. Click Save on the end of the row once you’re done. This will automatically process the file once it’s complete and tell SickBeard it’s done.

Now that the dirty work is done, let’s start up Sickbeard and configure our settings.

python ~/.sickbeard/SickBeard.py -q

Sickbeard runs on port 8081 by default. So you can get there 1 of 2 ways.

http://localhost:8081
or
http://192.168.1.182:8081
(This will, naturally, be the IP of the computer you're running sickbeard on.)

Let’s move on to configuring Sickbeard to work with SABnzbd+.


Setting Up and Configuring Sickbeard

When you first get into Sickbeard, it will look much like SABnzbd did when we first opened it; sad and lonely. Let’s wake it up and make it get to work for us.

This is how Sickbeard will look when you first load in.

General Configuration

The first settings we’re going to change are in the Config > General section.

  • It’s good to disable “Launch Browser”. This keeps Sickbeard from trying to launch the browser each time the program is autostarted.
  • It’s also a good idea to change the port that is used to access Sickbeard. 8081 is default.
  • Set a Username and Password if you want to use those.
  • In the API section, enable API and generate a key. We’ll use this to connect to SABnzbd+ so that the two programs can talk to each other. Keep this key a secret.

Let’s move on to Search Settings.


Search Settings

We’ll break this section down a bit.

  • Download Propers: I leave this checked. This will do exactly what it says. If there is a better version of a previously downloaded episode in the future, this will allow Sickbeard to re-download the better version.
  • Search Frequency: I leave this at 40. This is basically just how long between searches for shows. So every 40 minutes Sickbeard will check if any of the shows that you want have any new episodes. If so, it’ll grab the NZB (or torrent) and send it to be downloaded.
  • Usenet Retention: This is dependent on your Usenet provider. Most paid providers have a fairly high retention. Set this to something less than what your provider says their retention is.
“But what the heck is Usenet Retention?”

I’m glad you asked.

Retention is the length of time that a newsgroup article post is available to subscribers. If your provider says they have 1800 days of retention, that means that subscribers can access newsgroup posts that were added up to 1800 days ago, with 99% completion.
  • Ignore Words: This one is pretty simple. This is words that you don’t want to search for. Basically, if a posting lists that it is in French, having the word “french” listed here means that it will skip that file and not consider it for download.

Once you’re satisfied with your settings here, click Save Settings and we’ll move on to the next part.


This is where we finally get to connect Sickbeard to SABnzbd+. Admit it. You’ve been waiting for this the whole time.

  • Search NZBs: Of course! This is the whole reason we’ve been going through this setup! Come on!
  • NZB Method: Change this from Blackhole to SABnzbd. This will allow us to actually talk to SABnzbd and move our downloaded NZBs to be downloaded.
  • SABnzbd URL: This is the URL of your SABnzbd installation.
  • SABnzbd Username: If you created a username for SAB, enter that here.
  • SABnzbd Password: Enter the password for your SAB user here.
  • SABnzbd API Key: Open SABnzbd and go to Config > General and find the API key. Paste that here. Keep this key a secret!
  • SABnzbd Category: This should match the TV category that you set in SABnzbd Config > Categories. If you copied what I did, it should be “tv”.

Once you’ve done all that, hit “Test SABnzbd”. If you get a success message, save your changes.


Sickbeard works better with NZB files, but for the sake of thoroughness, let’s set up the Torrent Search options.

There’s not much to do here. Just tell Sickbeard where to look for the torrent files. That’s it.


Configure Search Providers

The search providers are where you will be telling Sickbeard to go look for NZB files. Wombles Index and Sickbeard Index should both be selected already. All the others will require you to sign up. Some are free, others require a one-time payment to use their index. There are a lot of search providers that you can add here.

My suggestion: Get a Usenet account with a good index provider (google this information) and configure a custom provider. Your searches will be far more reliable, and will give better quality results.

Once you’ve got a good index provider, you can set up a Custom Newznab Provider.

  • Provider Name: This is a name that you will recognize when you look at it. I usually leave it as the name of my provider.
  • Site URL: Some providers have an api url that you need to provide. Enter that here.
  • API Key: This will be given to you by your provider. It’s unique to you, so keep it safe.

I’d like to stress that you CAN use the free providers. You might never run into any issues. I’ve just had far better success with a paid index provider.

Let’s move on.


Post Processing

Remember how in the previous tutorial I mentioned that you shouldn’t have SABnzbd handle post processing of your TV episodes? That’s because we’re gonna give them to Sickbeard to do that. And here’s where we choose those settings.

  • TV Download Dir: This is where you have SABnzbd store the completed files.
  • Keep Original Files: I choose to have Sickbeard remove all the original files after they’ve been processed. This is solely for space purposes. It’s up to you how to choose to handle this.
  • Move Associated Files: Since I don’t have Sickbeard keep the original files, I also don’t need it to move associated files.
  • Filter Associated Files: If you download subtitles, or other metadata, you might want to include those here, so that they don’t get deleted.
  • Rename Episodes: We definitely want this checked. This will allow us to have pretty show names, instead of random numbers and letters.
  • Scan and Process: Let’s leave this off. We already have SABnzbd processing our files when they’re done.

Honestly, I leave this section as is. You can play around with the naming pattern if you want, but I’ve found the default to be more than adequate for my needs.

Since Plex is so similar to XBMC, you can use the XBMC metadata settings. I select everything that’s supported by XBMC. You can do as you wish, of course.


Notifications

We’ll come back to this after we install Plex, but this basically allows Sickbeard to tell Plex that there is new content, and it should re-scan its library.


Auto-Starting Sickbeard

If you’ve been following along exactly how I’ve been doing things, your sickbeard installation is in home/user/.sickbeard . Let’s get it auto-started, so we don’t have to turn it on each time the server starts.

cd ~/.sickbeard/

There are 2 files we need to worry about.

sudo cp ~/.sickbeard/init.ubuntu /etc/init.d/sickbeard
sudo chmod +x /etc/init.d/sickbeard
  • We took the init.ubuntu file and copied it to /etc/init.d/sickbeard. In doing so, we renamed it from “init.ubuntu” to “sickbeard”.
  • We then gave the file execute permissions.

Now, let’s create a new file called sickbeard in /etc/default folder.

sudo nano /etc/default/sickbeard

We’ll then add these parameters to it.

# COPY THIS FILE TO /etc/default/sickbeard
SB_HOME=/home/user/.sickbeard/
SB_DATA=/home/user/.sickbeard/
SB_USER=user

SB_HOME and SB_DATA are usually the same, and refer to where your Sickbeard installation is located. SB_HOME is the folder location for Sickbeard itself, and SB_DATA is the location of the database.

SB_USER should be your Ubuntu username.

Save the file.

Now we need to update the boot sequence.

sudo update-rc.d sickbeard defaults

Now you should be able to start and stop sickbeard with the following commands:

sudo service sickbeard start
sudo service sickbeard stop

To restart Sickbeard just run

sudo service sickbeard restart

You’re good to go! Let’s add some shows!


Adding Shows To Sickbeard

You’re finally there. You’ve configured SABnzbd to pull your shows, you’ve got Sickbeard running and ready to handle retrieving every episode, and now we just need to give it some stuff to look for.

Got to Home > Add Shows

If you already have a bunch of shows on a hard drive, you can have Sickbeard go through them and attempt to add them to your database. If you want to add a new show, just click “Add New Show”.

Enter the name of the show and click “Search”. Sickbeard will return some results with similar names and have you choose from them. Select the correct one and choose Next at the bottom right corner.

Next you will be presented with the location that Sickbeard will store the show. Since you set up a default location earlier, this should look familiar. It will put the show in it’s own sub-folder. If you’re okay with the default, click Next.

Here is where you get to choose whether you want to have Sickbeard try to find shows from the very beginning of the series or skip them. You can also choose to flatten the folders. If you choose to do this, it will store all the files in the same folder instead of breaking them up by season. Finally, you can choose the initial quality of the episodes. Once you’re satisfied with your settings, click “Add Show”.

You’re done! You’ve added your first show!

From here, Sickbeard will start adding shows to the SABnzbd queue to be downloaded.


Next we’ll cover installing and configuring Couch Potato. Coming Soon!

Like what you read? Give Sebastian a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.