Install SABNZBD + Transmission + Sickbeard + Couchpotato on Ubuntu 12.04 & 12.10

INSTALLING TRANSMISSION ON UBUNTU SERVER 12.04 LTS / 12.10
Please be aware there a issues with Transmission in Ubuntu 13.04 and higher!

The Transmission bittorrent client is one of the most widely used bittorrent clients for the Linux operating system, especially on Ubuntu servers. I have used it in all of the server incarnations I’ve had installed and have loved it more and more with each little update the software gets. In this guide, I’ll show you the super simple steps at getting a fully functional Transmission client installed on your Ubuntu Server and how you can configure it for your specific needs.

First off, we will need to add the apt-repository for Transmission to our repository list, but before we do that, we’ll need to install a small little application that allows us to add apt repositories directly from the terminal. Type the following:

sudo apt-get install python-software-properties

In Ubuntu 12.10, use the following command:

sudo aptitude install software-properties-common

Now, issue this command:

sudo add-apt-repository ppa:transmissionbt/ppa

That will give you the Transmission apt repository and allow you to automatically keep your Transmission software up-to-date instead of having to build the application by source. Now, update your apt-list:

sudo apt-get update

After your list is up to date, issue this command to install Transmission:

sudo apt-get install transmission-cli transmission-common transmission-daemon

Now, what we need to do is create some folders in our home folder for Transmission to use. Issue the following commands:

mkdir ~/Downloads
mkdir ~/Downloads/Completed
mkdir ~/Downloads/Incomplete
mkdir ~/Downloads/Torrents

The Completed folder will hold all of our torrents that have finished downloading, the Incomplete folder will hold all of our torrents that are still downloading, and the Torrents folder will allow us to drag-and-drop torrent files from our Windows machine to the folder and have Transmission automatically pick up the torrent and begin downloading it. You can add torrents for Transmission to download through the web interface, but doing it this way is sometimes quicker for some folks who may not have browser access.

Now, when Transmission downloads torrents, it automatically sets the rights of the files that it downloads to the Transmission user group. We need to make sure that our username is a part of that group, and we need to set the correct permissions on the Downloads folders. Issue the following commands:

sudo usermod -a -G debian-transmission username
sudo chown -R debian-transmission:debian-transmission /home/username/Downloads
sudo chmod -R 775 /home/username/Downloads

Replace the bold “username” sections with the username of your Ubuntu user that will be accessing the files and folders.

Note: If you want to use the same folders for both transmission and SABNZBD use the following command:

sudo chown -R <user>:debian-transmission /home/username/Downloads

Alright, so, that’s all the deep configuration and installation we need to do. Now, all we have to do is edit the Transmission configuration file so that we can access the WebUI and tweak a couple more settings. Again, I’m using Nano as my text editor, so if you are too, issue the following command:

sudo nano /etc/transmission-daemon/settings.json

That’s going to bring up the big configuration file. I’m only going to give you the settings I tweaked, however you can have a look throughout the entire configuration and tweak whatever you’d like.

“download-dir”: “/home/username/Downloads/Complete”,
“incomplete-dir”: “/home/username/Downloads/Incomplete”,
“incomplete-dir-enabled”: true,
“rpc-authentication-required”: false,
“rpc-whitelist-enabled”: false,

Once you’ve tweaked those settings, add this to the very end of the configuration file (before the ending “}” bracket, but also keep in mind that you will need to change the “utp-enabled” line to have a comma “,” at the end of it):

“watch-dir”: “/home/username/Downloads/Torrents”,
“watch-dir-enabled”: true 

That should do it! Now all you need to do is save that file by issuing a CTRL+X to Nano and then saving when it prompts you. After you’ve saved the file, reload (DO NOT restart) your Transmission server:

sudo /etc/init.d/transmission-daemon reload

Once it has reloaded and if it starts back up, go ahead and go to your browser and navigate to: 0.0.0.0:9091 (where 0.0.0.0 is the IP address of your Ubuntu server). You should be greeted with the Transmission WebUI. Now if you’d like, you can apply over 370,000 IP filters to the blocklist from one of my other posts.

Installing SABnzbd
First lets organize our folders. TV Shows and Movies refers to the location of your TV Shows and movies. For me it is in the Media folder.

$ cd ~
$ sudo mkdir /mnt/mass_storage downloads
$ ln -s /mnt/mass_storage/downloads downloads
$ ln -s /mnt/Media/TV Shows TVShows
$ ln -s /mnt/Media/Movies Movies
This puts shortcuts to the folders in our home folder.

Now to install SABnzbd. You can install from apt-get, but the version in there is out of date. Instead lets add another repo to pull from, then install it from apt.

$ echo "deb http://ppa.launchpad.net/jcfp/ppa/ubuntu $(lsb_release -c -s) main" | sudo tee -a /etc/apt/sources.list && sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net:11371 --recv-keys 0x98703123E0F52B2BE16D586EF13930B14BB9F05F

$ sudo apt-get update
$ sudo apt-get install sabnzbdplus
$ sudo nano /etc/default/sabnzbdplus

Enter your username where it says USER=

Now you can reboot if you want to test that it automatically starts.

You may not be able to access the web interface the first time because it defaults to only allow access from the localhost. Here is how to fix it:

$ cd ~/.sabnzbd
$ nano sabnzbd.ini

Search for host (use CTRL+W to search). Change localhost to 0.0.0.0. Exit and restart sabnzbd.

$ /etc/init.d/sabnzbd restart

Note: DO NOT USE SUDO TO START ANY OF THESE SERVICES! Only start these services as the local user.

Installing SickBeard
We will install SickBeard and CouchPotato with git. First make sure it is installed.

$ sudo apt-get install git

Now lets download the source code.

$ cd ~
$ mkdir tmp
$ cd tmp
$ git clone https://github.com/midgetspy/Sick-Beard.git sickbeard

When it is finished it should look like this:

ryan@services:~/tmp$ git clone https://github.com/midgetspy/Sick-Beard.git sickbeard
Cloning into 'sickbeard'...
remote: Counting objects: 20879, done.
remote: Compressing objects: 100% (6847/6847), done.
remote: Total 20879 (delta 14226), reused 19584 (delta 13111)
Receiving objects: 100% (20879/20879), 7.73 MiB | 859 KiB/s, done.
Resolving deltas: 100% (14226/14226), done.

You can put it in your home folder if you want (mv sickbeard ../.sickbeard) which is where most people put it, but I like to put it in my /usr/share folder. Just remember where you put it.

Now we need to make it start on boot. This startup script and the one for CouchPotato are by daemox over at ainer.org.

$ sudo nano /etc/init.d/sickbeard

Enter the following code in the file:

#! /bin/sh
 
# Author: daemox
# Basis: Parts of the script based on and inspired by work from
#        tret (sabnzbd.org), beckstown (xbmc.org),
#        and midgetspy (sickbeard.com).
# Fixes: Alek (ainer.org), James (ainer.org), Tophicles (ainer.org),
#        croontje (sickbeard.com)
# Contact: http://www.ainer.org
# Version: 3.1
 
### BEGIN INIT INFO
# Provides:          sickbeard
# Required-Start:    $local_fs $network $remote_fs
# Required-Stop:     $local_fs $network $remote_fs
# Should-Start:      $NetworkManager
# Should-Stop:       $NetworkManager
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts and stops sick beard
# Description:       Sick Beard is an Usenet PVR. For more information see:
#            http://www.sickbeard.com
### END INIT INFO
 
#Required -- Must Be Changed!
USER="CHANGEME" #Set Linux Mint, Ubuntu, or Debian user name here.
 
#Required -- Defaults Provided (only change if you know you need to).
HOST="127.0.0.1" #Set Sick Beard address here.
PORT="8081" #Set Sick Beard port here.
 
#Optional -- Unneeded unless you have added a user name and password to Sick Beard.
SBUSR="" #Set Sick Beard user name (if you use one) here.
SBPWD="" #Set Sick Beard password (if you use one) here.
 
#Script -- No changes needed below.
case "$1" in
start)
#Start Sick Beard and send all messages to /dev/null.
cd /home/$USER/.sickbeard
echo "Starting Sick Beard"
sudo -u $USER -EH nohup python /home/$USER/.sickbeard/SickBeard.py -q > /dev/null 2>&1 &
;;
stop)
#Shutdown Sick Beard and delete the index.html files that wget generates.
echo "Stopping Sick Beard"
wget -q --user=$SBUSR --password=$SBPWD "http://$HOST:$PORT/home/shutdown/" --delete-after
sleep 6s
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
 
exit 0

Change USER=”ChangeMe” to your username.

Make the file executable so it will actually run.

$ sudo chmod +x /etc/init.d/sickbeard
sudo update-rc.d sickbeard defaults

To start:

/etc/init.d/sickbeard start

or reboot

 sudo reboot

Installing CouchPotato

We are going to install from the source on GitHub and create an autorun.

cd ~/tmp
$ git clone https://github.com/RuudBurger/CouchPotatoServer.git
$ mv couchpotato ../.couchpotato
$ cd ~/.couchpotato
$ python CouchPotato.py to start
$ sudo cp CouchPotatoServer/init/ubuntu /etc/init.d/couchpotato
$ sudo nano /etc/init.d/couchpotato

Now make the auto run file.

$ sudo nano /etc/init.d/couchpotato

Change the path of couchpotato to:
/home/<your_username>/.couchpotato
Again, change USER=”ChangeMe” to your username.

Make the file executable.

$ sudo chmod +x /etc/init.d/couchpotato
$ sudo update-rc.d couchpotato defaults

Open your browser and go to: http://localhost:5050/

Sources:

 

 

20 thoughts on “Install SABNZBD + Transmission + Sickbeard + Couchpotato on Ubuntu 12.04 & 12.10

  1. In the last line of installing sabnzbd, where it says

    $ /etc/init.d/sabnzbd restart

    i think the service should be called sabnzbdplus

  2. Pingback: J&M Computers | Install SABNZBD + Transmission + Sickbeard + Couchpotato on Ubuntu 12.04 lefoxdufue

  3. Thanks you for your awesome turotial… Very helpful… I have had problems here are there however, mostly with CouchPotato… I do not see the paths/user that i need to change…
    I can see the following…
    CP_APP_PATH=${APP_PATH-/usr/local/sbin/CouchPotatoServer/}
    CP_RUN_AS=${RUN_AS-root}

    My couchpotato is in /home/john/.couchpotato and username is john.. i changed these to
    CP_APP_PATH=${APP_PATH-/home/john/.couchpotato/}
    CP_RUN_AS=${RUN_AS-john}

    When i start i get
    rm: cannot remove ‘/var/run/couchpotato.pid’: Permission denied

    Did i miss something? Thanks!

    • You can start CouchPotato while logged into your ‘john’ account. The program will start fine, but controlling it’s running state isn’t possible, because that requires root / sudo access. That’s why you’re getting the ‘Permission denied’ error.

      As long as you have your username in the CP_RUN_AS (and it looks like you do), then it’s safe to do ‘sudo /etc/init.d/couchpotato start’. CouchPotato will run under your account. Check by doing a ‘ps -ef | grep john’ in the terminal to find the CouchPotato.py in the program arguments.

      • i’m having the same issue. this is what I get when i run the grep.

        downloader@downloader:~$ sudo /etc/init.d/couchpotato startps -ef | grep downloader
        Usage: /etc/init.d/couchpotato {start|stop|restart|force-reload|status}

      • correction:
        i get this:
        downloader@downloader:~$ sudo /etc/init.d/couchpotato start/etc/default/couchpotato not found using default settings.
        Starting CouchPotato

        but when I edit:
        if [ -f /etc/default/couchpotato ]; then

        to /home/downloader/.couchpotato, THEN I get the error i said previously

  4. Hi,
    I have downloaded and installed the files as you have instructed, and placed them in my user directory.
    Now, I am unable to access the web UI. Have you any suggestions? I have tried manually changing the config.ini file, but no luck.
    Does the /etc/init.d/sickbeard file need to make a mention of another *.py file?

  5. My spouse and I absolutely love your blog and find a lot of your post’s to be what precisely I’m looking
    for. Do you offer guest writers to write content for you?
    I wouldn’t mind writing a post or elaborating on a number of the subjects you
    write in relation to here. Again, awesome blog!

  6. Does your website have a contact page? I’m having problems locating it but, I’d like to shoot you
    an e-mail. I’ve got some suggestions for your blog you might be interested in hearing.
    Either way, great blog and I look forward
    to seeing it improve over time.

  7. Hey there just wanted to give you a brief heads up and let you know a few of
    the images aren’t loading correctly. I’m not sure
    why but I think its a linking issue. I’ve tried it in two different browsers and both show the same outcome.

Leave a comment