Cheap VPS & Xen Server

Residential Proxy Network - Hourly & Monthly Packages

The Perfect Media Server – Ubuntu 11.10 [Sabnzbd+/Sickbeard/Couch Potato/Headphones/Serviio]


This tutorial shows how to install Ubuntu 11.10 (Oneiric Ocelot) and all the programs needed for the perfect media server to download all your media and stream it to your PS3. This setup includes Sabnzbd+ (an Open Source Binary Newsreader written in Python), Sickbeard (a PVR for newsgroup users), Couch Potato (an automatic NZB and torrent downloader), Headphones (automatic music downloader for SABnzbd), and Serviio (a free media server).

1. Requirements

To install such a system you will need the following:

  • the Ubuntu 11.10 Desktop CD, available here http://www.ubuntu.com/start-download?distro=desktop&bits=64&release=latest
  • a fast Internet connection.
  • an account with a usenet provider (your ISP may provide this for free as part of their service)
  • an account with newzbin.com (optional)
  • an account with nzbmatrix.com (optional)

 

2. Preliminary Note

In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100 and the gateway 192.168.0.1. These settings might differ for you, so you have to replace them where appropriate.

 

3. The Base System

Insert your Ubuntu install CD into your system and boot from it. Select your language:

step1

Then select Install Ubuntu.

step2

Tick Download updates while installing and Install this third-party software and click Continue

step3

I will assume you are installing on a clean hard disk, make sure Erase disk and install Ubuntu is selected, click Continue.

step4

Click Install Now.

step5

 

Click your timezone and click Continue.

step6

Choose your keyboard layout and click Continue.

step7

Unter your name, your computers name and pick a username and an appropriate password, I like to choose Log in automatically, but you can choose either option as is your preference, then click Continue.

Go grab a cup of coffee while you wait for the installation to complete.

step8

Click Restart Now.

You will see a bunch of messages scroll on the screen then this:

Please remove installation media and close the tray (if any) then press ENTER:

Remove the CD and press the [Enter] key.

Log into your newly installed Ubuntu.

4. Installing Sabnzbd+

Click Dash Home buton (top icon on the dash). Type term and click the first icon Terminal to open a terminal window.

To install Sabnzbd+ you need to add the jcfp repository. To do so, run the following command in a terminal:

sudo add-apt-repository ppa:jcfp/ppa

After entering your password, you will be greeted with the following notice:

You are about to add the following PPA to your system:
 PPA for jcfp
 This PPA contains packages for the latest and greatest version of the SABnzbd+ binary newsgrabber, allowing for easy installation, dependency tracking, and automatic upgrading of the program.

Everything works just like any other repository; nevertheless, for those who need them, newbie-proof instructions can be found at http://forums.sabnzbd.org/index.php?topic=387.0
 More info: https://launchpad.net/~jcfp/+archive/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

Press the [ENTER] key to continue.

Install Sabnzbd+:

sudo apt-get install -y sabnzbdplus sabnzbdplus-theme-smpl sabnzbdplus-theme-plush sabnzbdplus-theme-iphone

Open the sabnzbdplus config file:

sudo gedit /etc/default/sabnzbdplus

Change the user to run as to your user account, set the host field to 0.0.0.0 and set the port to 8080.Your config file should now look like this:

#
# 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=user
# [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:
EXTRAOPS=

Start the sabnzbdplus service and configure it:

sudo service sabnzbdplus start

* Starting SABnzbd+ binary newsgrabber                                  [ OK ]

Open Firefox web browser and navigate to: http://localhost:8080.

step9

Select your language and click Start Wizard.

step10

Enter your usenet provider details, you should be able to get this information from your provider. Click Test Server to verify your settings. Once you have everything correct, click Next.

step11

If you want to be able to access the SABnzbd interface from other computers on your network, make sure you leave that enabled, but I highly recommend you tick Password protect access to SABnzbd (recommended) and enter an appropriate username and password. Click Next.

step12

Enter your account details for your newzbin and nzbmatrix accounts if you have them.

step13

Setup is now complete, click Go to SABnzbd to launch the SABnzbd interface.

Click the config button to go to the config panel, and choose the categories tab (second from the bottom). Create categories for movies, music and tv as shown below, it is a little counter intuitive, type in the category field just below default and in the folder/path field on the same line and click the add button on the right.

step14

That is all the configuring we are going to do for now, look into all the config options if you like.

Before we go an install the other programs, lets take a few moments to set up our folders. Open a terminal and type the following commands (replace user with your username):

sudo mkdir -p /Media/TV\ Shows
sudo mkdir /Media/Movies
sudo mkdir /Media/Music
sudo chown user:user -R /Media

5. Installing Sickbeard

Open up a terminal window and execute the following commands.

wget https://github.com/midgetspy/Sick-Beard/tarball/master -O sickbeard.tar.gz
tar xf sickbeard.tar.gz
ls

After the ls command, you will see something like this:

user@media-server:~$ ls
Desktop    Downloads         midgetspy-Sick-Beard-8d7484d  Pictures  Templates
Documents  examples.desktop  Music                         Public    Videos

We want to move the midgetspy-Sick-Beard-xxxxxx folder to .sickbeard, you can do so with the following command (you will need to alter the command to suit what the folder name):

mv midgetspy-Sick-Beard-8d7484d .sickbeard
sudo mv .sickbeard/init.ubuntu /etc/init.d/sickbeard
sudo gedit /etc/init.d/sickbeard

Edit the APP_PATH to point to /home/user/.sickbeard, where “user” is your username and set RUN_AS to your username, your file should then look something like this:

#! /bin/sh

### BEGIN INIT INFO
# Provides:          sickbeard
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts instance of Sick Beard
# Description:       starts instance of Sick Beard using start-stop-daemon
### END INIT INFO

############### EDIT ME ##################
# path to app
APP_PATH=/home/user/.sickbeard

# path to python bin
DAEMON=/usr/bin/python

# Path to store PID file
PID_FILE=/var/run/sickbeard/sickbeard.pid
PID_PATH=$(dirname $PID_FILE)

# script name
NAME=sickbeard

# app name
DESC=SickBeard

# user
RUN_AS=user

# data directory
DATA_DIR=/home/${RUN_AS}/.sickbeard

# startup args
DAEMON_OPTS=" SickBeard.py -q --daemon --nolaunch --pidfile=${PID_FILE} --datadir=${DATA_DIR}"

############### END EDIT ME ##################

test -x $DAEMON || exit 0

set -e

if [ ! -d $DATA_DIR ]; then
    mkdir -p $DATA_DIR
    chown $RUN_AS $DATA_DIR
fi

case "$1" in
  start)
        echo "Starting $DESC"
        rm -rf $PID_PATH || return 1
        install -d --mode=0755 -o $RUN_AS -g $RUN_AS $PID_PATH || return 1
        start-stop-daemon -d $APP_PATH -c $RUN_AS --start --pidfile $PID_FILE --exec $DAEMON -- $DAEMON_OPTS
        ;;
  stop)
        echo "Stopping $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE --retry 15
        ;;

  restart|force-reload)
        echo "Restarting $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE --retry 15
        start-stop-daemon -d $APP_PATH -c $RUN_AS --start --pidfile $PID_FILE --exec $DAEMON -- $DAEMON_OPTS
        ;;
  *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0

Save your changes, then set sickbeard to run on boot, with the following command:

sudo update-rc.d sickbeard defaults

Start sickbeard for the first time:

sudo service sickbeard start

Open firefox and browse to http://localhost:8081
You will be greeted with the following screen.

step15

At the top of the window you may see Unknown version: If you’ve never used the Sick Beard upgrade system then I don’t know what version you have.–Update Now Click the Update Now link.

Sickbeard will restart, once the page has reloaded, click Config | General.

The configuration is divided into 5 tabs, General | Search Settings | Search Providers | Post Processing | Notifications.

First untick Launch Browser in the General Configuration, since we will be launching sickbeard on boot, and click Save Changes.

Click the Search Settings tab and change NZB Method: to SABnzbd, and set the SABnzbd URL to: http://localhost:8080/

Set the SABnzbd username and password to the settings you used in the SABnzbd configuration. The API key will need to be retrieved from the SABnzbd interface, so open http://localhost:8080 in another browser tab, and go to the config page and under General tab you will see API key, copy the text in there and switch back to the Sickbeard config tab and paste the API ky into the SABnzbd API Key textbox. Click Test SABnzbd to test your settings, then click Save Changes.

Click the Search Providers tab and tick which providers you want to use, If you have signed up for an account with NZBs’R’US, NZBs.org, NZBMatrix or Newzbin, make sure you tick them here. You can also drag the providers around to select what priority you would like them to be searched.

Underneath Provider priorities you will see Configure Built-In Providers, choose the provider you want to configure from the drop down and then enter the appropriate information for that provider., click Save Changes when done.

Click the Post Processing tab. You will need to enter /home/user/Downloads/complete/tv into the TV Download Dir textbox, replace user with your username. This is the folder that Sabnzbd+ will place completed downloads in. We will now configure SickBeard to post-process these files.

Untick Keep Original Files, we don’t want to keep the originals around after we have copied them to our media storage location. Configure what metadata you want to create, by choosing your target from Metadata Type drop down and ticking the appropriate metadata item from the Create listbox, click Save Changes when done.

Lets add a show to test it out.

Click Home on the Home menu, and then click Add Show button, Click Add New Show button, type in the Show name and click Search. If Sickbeard comes back with multiple matches, choose the correct show and then click Next. Click the New button, navigate to the /Media/TV Shows folder and click OK
Click Next, Choose the initial status of missing episodes (if you want to download all the episodes, change Skipped to Want), place a tick in Season Folders. Select your prefferred download quality. I would also recommend clicking the Save Defaults button before clicking Add Show.

The Show will then be added to your show list with (loading) against it, after some time, hit refresh until you see the display change it should load all the relevant info and display the number of episodes under the Downloads column, if you click the show name, it will drill down into the show and display all the episodes and seasons, from this screen you can change the status of any episodes you want to download, from Skipped to Want and then they will be downloaded for you.

 

6. Installing Couch Potato

Open up a terminal window and execute the following commands.

wget https://github.com/RuudBurger/CouchPotato/tarball/master -O couchpotato.tar.gz
tar xvf couchpotato.tar.gz
ls

After the ls command, you will see something like this:

user@media-server:~$ ls
couchpotato.tar.gz  Downloads         Pictures                        Templates
Desktop             examples.desktop  Public                          Videos
Documents           Music             RuudBurger-CouchPotato-2344e1a
user@media-server:~$

We want to move the RuudBurger-CouchPotato-xxxxxxx to .couchpotato, you can do so with the following command (you will need to alter the command to suit what the folder name):

mv RuudBurger-CouchPotato-2344e1a .couchpotato
sudo mv .couchpotato/initd.ubuntu /etc/init.d/couchpotato
sudo mv .couchpotato/default.ubuntu /etc/default/couchpotato
sudo gedit /etc/default/couchpotato

Change APP_PATH to /home/user/.couchpotato, where user is your username, and change ENABLE_DAEMON to 1, and RUN_AS to your username, your file should then look something like this:

# This file is sourced by /etc/init.d/couchpotato
#
# When couchpotato is started using the init script
# 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] set path where couchpotato is installed:
APP_PATH=/home/user/.couchpotato

# [optional] change to 1 to enable daemon
ENABLE_DAEMON=1

# [required] user or uid of account to run the program as:
RUN_AS=user

# [optional] change to 1 to enable updating from webinterface
# this changes ownership of /opt/couchpotato to user set @ RUN_AS
WEB_UPDATE=0

# [optional] full path to the configuration file of your choice;
# otherwise, the default location (~/.couchpotato) is used:
CONFIG=

# [optional] full path to the folder to store data (databases/thumbs) in;
# otherwise, the default location (~/.couchpotato) is used:
DATADIR=

# [optional] Force port number to listen on, otherwise the one set in config.ini is used:
PORT=

# [optional] full path for the pidfile
# otherwise, the default location /var/run/couchpotato/couchpotato.pid is used:
PID_FILE=

Now we can set couchpotato to run on boot, and start it running

sudo update-rc.d couchpotato defaults
sudo service couchpotato start

You should see a message letting you know that the service has started, time to flick back to Firefox and open up the Couch Potato interface, the default port is 5000, so browse to http://localhost:5000 and you should see a pretty plan looking screen with No movies added, click here to add a movie, but first we need to configure Couchpotato, so click the gear icon at the top to get to the config screen.

If you see a message like this: Update (diff) available: update now, then click the Update now link to get the latest version, after a little while couchpotato will restart and you will be back at the config page.

Click General, and set a username and password if you like and untick launch browser, click Save.

Click the Downloaders tab and enter your Sabnzbd Host, Apikey, Username, Password. Also enter movies as the Category, then click Save.

Next is the Providers tab, enable all the providers that you want to use and enter the appropriate info, and click Save.

You can stop at the Quality tab if you want to modify any of the built-in profiles or create your own, but for now, the built-in ones will suffice, so onto the Renaming tab.

We want to enable renaming, so tick the Enable checkbox, and enter /home/user/Downloads/complete/movies as your SABnzbd movie Download folder, replace user with your user name. Enter /Media/Movies as your Movie destination and If you want to change the naming options, do so, I prefer the default naming, then click Save.

Click the Extras tab, the only thing I use the Extras tab for is to tick the Save Metadata check box, but you can add details for Blu-Ray.com, Kinepolis.com, Trailers, Subtitles, Trakt and IMDB Watchlists, to that your movie want list can be populated automatically from these other sources. I prefer to add movies manually to couchpotato.

We are done, so click the About tab and click Restart to apply the password changes.

7. Installing Headphones

Open up a terminal window and execute the following commands.

wget https://github.com/rembo10/headphones/tarball/master -O headphones.tar.gz
tar xvf headphones.tar.gz
ls

After the ls command, you will see something like this:

user@media-server:~$ ls
Desktop    examples.desktop   Pictures                    Templates
Documents  headphones.tar.gz  Public                      Videos
Downloads  Music              rembo10-headphones-514844e
user@media-server:~$

We want to move the rembo10-headphones-xxxxxxx to .headphones, you can do so with the following command (you will need to alter the command to suit what the folder name):

mv rembo10-headphones-514844e .headphones
sudo mv .headphones/init.ubuntu /etc/init.d/headphones
sudo chmod +x /etc/init.d/headphones
sudo gedit /etc/init.d/headphones

Change APP_PATH to /home/user/.headphones, where user is your username, and change RUN_AS to your username, your file should then look something like this:

#! /bin/sh

### BEGIN INIT INFO
# Provides:          Headphones application instance
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts instance of Headphones
# Description:       starts instance of Headphones using start-stop-daemon
### END INIT INFO

############### EDIT ME ##################
# path to app
APP_PATH=/home/user/.headphones

# path to python bin
DAEMON=/usr/bin/python

# startup args
DAEMON_OPTS="Headphones.py -q"

# script name
NAME=headphones

# app name
DESC=headphones

# user
RUN_AS=user

PID_FILE=/var/run/headphones.pid

############### END EDIT ME ##################

test -x $DAEMON || exit 0

set -e

case "$1" in
  start)
        echo "Starting $DESC"
        start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background --pidfile $PID_FILE  --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
        ;;
  stop)
        echo "Stopping $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE
        ;;

  restart|force-reload)
        echo "Restarting $DESC"
        start-stop-daemon --stop --pidfile $PID_FILE
        sleep 15
        start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background --pidfile $PID_FILE  --make-pidfile --exec $DAEMON -- $DAEMON_OPTS
        ;;
  *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0

Now we can set headphones to run on boot, and start it running

sudo update-rc.d headphones defaults
sudo service headphones start

You should see a message letting you know that the service has started, time to flick back to Firefox and open up the Headphones interface, the default port is 8181, so browse to http://localhost:8181 and you should see the headphones interface, if you see You’re running an unknown version of Headphones. Click here to update, click the link to update, and after a little while Headphones should update and restart, You may need to hit refresh.

If headphones doesn’t start back up again, go back to the terminal and restart it.

sudo service headphones start

Click settings to get to the settings page, unlike SABnzbd+ / SickBeard and Couchpotato, all the settings are on one page for Headphones.

Set a username and password for the web interface.

Enter your SABnzbd details:
SABnzbd Host name http://localhost:8080, SABnzbd username, SABnzbd password and SABnzbd API key.

For the SABnzbd Category, enter music.

For the Music download Directory enter /home/user/Downloads/complete/music replace user with your username.

Enable the Search providers you would like to use and enter the appropriate info and move down to the Quality and Post Processing section.
Leave the quality settings alone, but place tick marks against all the post processing options.

Set your Path to Destination folder: to /Media/Music, and save your changes. You are now done, you have Downloads automated, TV Shows, Movies, Music, now the final step is how to view all this content from your PlayStation 3.

 

8. Streaming to your PS3

There are a number of different options for streaming media to your PS3, I used to use MediaTomb, but development seems to have halted on that, so I switched to PS3MediaServer, and it is OK, but sometimes displays my shows out of order, and won’t refresh the folders until i restart it which is a pain. I have recently started using Serviio, which so far seems very good. It even scrapes metadata and displays your movies by actor / director / etc. if that is your desire.

First step is downloading and installing serviio, open a terminal and type these commands:

wget http://download.serviio.org/releases/serviio-0.6.2-linux.tar.gz
tar xvf serviio-0.6.2-linux.tar.gz
mv serviio-0.6.2 .serviio
sudo gedit /etc/init/serviio.conf

gedit will open with serviio.conf blank document, paste the following in:

start on started networking
script
   /home/user/.serviio/bin/serviio.sh
end script

The save your changes.

Now we can start serviio running and then open up the configuration console.

sudo start serviio
.serviio/bin/serviio-console.sh

The main thing you need to do in the console is switch to the Library tab and add your folders /Media/TV Shows, /Media/Movies, /Media/Music. Make sure you add a tick against what type of content the folders contain, the Video tickbox against the Movies and TV Shows, and the Music tickbox against the Music folder. You can also tick the Retrieve Metadata checkbox if you wish, make sure you save your changes.

Then that’s it, enjoy your movies, tv shows and music.

 

 

Comments

comments