Sickbeard Torrent Setup with ruTorrent - All GUI [UPDATED]

If you've made an extra_script, made a 3rd party tool, or just added some functionality in a fork you can post about it here.

Sickbeard Torrent Setup with ruTorrent - All GUI [UPDATED]

Postby xombiemp » Fri Mar 23, 2012 3:45 pm

*Notice* The latest version of this guide is located on github https://github.com/xombiemp/ultimate-torrent-setup/wiki. Please reference the guide on github for the most up-to-date and accurate guide to the Ultimate Torrent Setup.

Updated 1/3/13
  • Updated links to latest libtorrent and rtorrent
  • Changed the rutorrent to rtorrent connection from using the scgi apache module to using the httprpc plugin
  • Apache config is now in a new site in the sites-enabled folder rather than in httpd.conf
  • Use normal user rather than root
  • Other small changes/refinements

Background
This guide will show you how to set up Sickbeard to use torrents using ruTorrent. This has a similar result to my other guide: viewtopic.php?f=9&t=3661 in that it will completely automate the TV downloading process. The difference between this guide and the other one is that this guide makes use of the available ruTorrent plugins to accomplish this, as the other guide relied heavily on the .rtorrent.rc config file and custom scripts. This method of set up is much easier to understand and setup because most of the configuration is done from a GUI instead of in scripts.

How it Works
We will be using the ruTorrent plugins autotools ratio extratio to accomplish what we want. The way these plugins work is best described by an example:
Say you have a directory /torrent for your torrent downloads. What you would do is create three sub dirs in that directory called watch, download and complete. Inside these directories will contain a mirrored directory structure for the different categories of torrents you download. So your structure might look like this:
Image

So if you drop a torrent into /torrent/watch/tv/sickbeard the torrent download is started in /torrent/download/tv/sickbeard. Also a label is automatically applied to the torrent based on the directory: in this example our torrent would receive the label tv/sickbeard. Once the torrent is finished downloading, a hard link will be created in /torrent/complete/tv/sickbeard. A hard link means that a duplicate file is made, but it shares the same data as the original. This is beter than copying because it is instant and you don't have to duplicate the data on your hard drive. So now if we just have Sickbeard watch the /torrent/complete/tv/sickbeard directory it can process the hard linked files and move them to a final TV directory, AND we can continue to seed with the original file in /torrent/download/tv/sickbeard with no problems. Even when we delete the file in the download directory, it won't affect the other hard link in the place where Sickbeard placed it.

Setting it up

Here I will go though installing rutorrent and sickbeard from scratch on Ubuntu 13.10. Scroll down to the GUI config if you don't need any of this. I'm not going to go through setting up SSL for Apache or setting up Samba share. If you need help with that check out those sections in the guide I linked to at the top.

Login as your user and make sure your Ubuntu server is all up to date. Then execute these commands one line at a time.

Download the configs archive, which contain the necessary config files you will need.
Code: Select all
cd ~

wget http://sickbeard.com/forums/download/file.php?id=313 -O configs.tar.gz

tar xvzf configs.tar.gz


rTorrent

Install Prereqs
Code: Select all
sudo apt-get update

sudo apt-get install -y git-core subversion build-essential automake libtool libcppunit-dev libcurl4-openssl-dev libsigc++-2.0-dev libncurses5-dev zip rar unrar apache2 apache2-utils php5 php5-json php5-curl php5-geoip python-cheetah ffmpeg mediainfo


Install xmlrpc from svn
Code: Select all
cd /usr/local/src

sudo svn checkout http://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/advanced xmlrpc-c

cd xmlrpc-c

sudo ./configure

sudo make

sudo make install


Install libtorrent
Code: Select all
cd /usr/local/src

sudo wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.13.2.tar.gz

sudo tar xzfv libtorrent-0.13.2.tar.gz

cd libtorrent-0.13.2

sudo ./configure

sudo make

sudo make install


Install rtorrent
Code: Select all
cd /usr/local/src

sudo wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.9.2.tar.gz

sudo tar xzfv rtorrent-0.9.2.tar.gz

cd rtorrent-0.9.2

sudo ./configure --with-xmlrpc-c

sudo make

sudo make install


Make Directories

Create the session directory for rtorrent
Code: Select all
mkdir -p ~/.config/rtorrent/session


Change directory to where you are going to download all your torrents to. For this guide we are using /data.
Then execute this command which will create the folder structure I illustrated earlier:
Code: Select all
sudo mkdir -p torrent/{complete/{movie,music,tv/sickbeard,game,software,other},download/{movie,music,tv/sickbeard,game,software,other},watch/{movie,music,tv/sickbeard,game,software,other}}


Give these folders full permissions by executing this on the parent directory:
Code: Select all
sudo chmod -R 777 /data
or whatever your path is.


Make Config File and Boot Script
Code: Select all
mv ~/configs/rtorrent.rc ~/.config/rtorrent/


Edit ~/.config/rtorrent/rtorrent.rc and look for where it says /CHANGE/THIS/PATH for the directory and session paths and edit the paths for your setup. In our example, the directory path is the download directory we created previously, /data/torrent/download. The session path is the session directory we created, /home/USER/.config/rtorrent/session. Also look for RUTORRENTUSER at the bottom and change it to the user that you want to use for ruTorrent GUI login (we haven't created the login yet but we will later). Change any other random options that you want.

Code: Select all
sudo mv ~/configs/rtorrentd /etc/init.d/

sudo chmod +x /etc/init.d/rtorrentd

sudo update-rc.d rtorrentd defaults


Edit /etc/init.d/rtorrentd and change user=CHANGEUSER to your user.

Create Apache config
Code: Select all
sudo mv ~/configs/rutorrent /etc/apache2/sites-available/rutorrent.conf

sudo a2dissite 000-default.conf

sudo a2ensite rutorrent.conf


Create password for rutorrent
Replace RUTORRENTUSER in the following command with the same username as you put in the bottom of rtorrent.rc.
Code: Select all
sudo htpasswd -c /etc/apache2/rutorrent_passwd RUTORRENTUSER


ruTorrent

Install ruTorrent
The script update-rutorrent will install rutorrent and any plugins you want automatically. Then when you run it again it will update rutorrent and any plugins that have updates.
Code: Select all
sudo mv ~/configs/update-rutorrent /usr/local/bin/

sudo chmod +x /usr/local/bin/update-rutorrent


Edit /usr/local/bin/update-rutorrent and change the webroot_path if it is different for you.
Edit the plugins variable to include or exclude any plugins that you want. You can leave it as it is to use the plugins that I use. The ones you have to keep are autotools ratio extratio throttle.
Once all the edits are made to the script, run it to install rutorrent and your plugins:
Code: Select all
sudo update-rutorrent


Edit configs
Edit /var/www/rutorrent/conf/config.php
Change $topDirectory to the top directory where your torrents are downloaded. In our example, /data/


Edit /var/www/rutorrent/plugins/autotools/conf.php
The $autowatch_interval variable is how often in seconds it looks in the watch folders for new torrent files. I changed mine to:
$autowatch_interval = 5;


Sickbeard
Code: Select all
cd ~

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

cd .sickbeard/

sudo cp init.ubuntu /etc/init.d/sickbeard

sudo chmod +x /etc/init.d/sickbeard

sudo update-rc.d sickbeard defaults

mkdir ~/.config/sickbeard

sudo mv ~/configs/sickbeard /etc/default/

sudo rm -r ~/configs/

sudo rm ~/configs.tar.gz


Edit /etc/default/sickbeard and change:
SB_USER=YOURUSER to your user name


Code: Select all
sudo ldconfig

sudo service apache2 restart

sudo service rtorrentd restart

sudo service sickbeard start
Attachments
configs.tar.gz
Config files
(4.29 KiB) Downloaded 1400 times
Last edited by xombiemp on Fri Oct 17, 2014 3:09 pm, edited 38 times in total.
xombiemp
 
Posts: 36
Joined: Tue Jan 10, 2012 5:36 pm

Re: Sickbeard Torrent Setup with ruTorrent - All GUI

Postby xombiemp » Fri Mar 23, 2012 3:45 pm

Configure GUIs
First browse to http://IP.OF.UBUNTU.SERVER/rutorrent
Login with the username and password you created earlier.
Click on the gear cog to enter the settings.
Some changes I like to make are:
In General uncheck Confirm when deleting torrents.
In History I only check Deletion. This is nice because sickbeard could download a torrent, seed it to 2.0, and delete it all while you are sleeping. So the History plugin will let you see a record of when it was deleted and what your ratio was, just for your sanity.

In Autotools enable all the options and browse to your complete and watch directories. Also, be sure to select Hard Link for the operation type:
Image

In Ratio Groups set up a default group and a sickbeard group:
Image

Click ok. Then click on the wrench/screwdriver next to the Gear and click on Ratio Rules. Set up a rule for sickbeard:
Image

Now when you add a torrent you just click on the directory button and choose which categorie it is. Then it will automatically receive that label and it will download to the proper directory.
Image

Now browse to http://IP.OF.UBUNTU.SERVER:8081
Click on the Config tab and click General
Image
You can set a username and password if you want. You don’t need an API key for what we are doing but you can generate one if you want. Be sure to click on Save Changes between each page.

Click on Search Settings
Image
You can change the search frequency to a different interval if you want. Check Search Torrents and browse to your watch dir.

Click on Search Providers
Image
Check TvTorrents or BTN (or both) and configure the provider. Configure the provider with the info it asks for, which you will find in your respective rss feed url.

Click on Post Processing
Image
Match my post processing settings. Notice that we don’t use Keep Original Files.
Metadata is up to you. This is how I have mine set up for XBMC.
Image

Now you can add your shows to Sickbeard like normal. This setup has been working great for me and completely automates the Sickbeard process!
Last edited by xombiemp on Mon Aug 12, 2013 10:24 am, edited 5 times in total.
xombiemp
 
Posts: 36
Joined: Tue Jan 10, 2012 5:36 pm

Re: Sickbeard Torrent Setup with ruTorrent - All GUI

Postby invader980 » Fri Apr 13, 2012 11:21 am

Thanx for the tut .... helped me get up and running correctly ... my only issue (correct me if im wrong ) this method pools the download data into one folder without a folder structure ...

e.g ( from ur exsample) all data would be in /torrent/complete/ for any episode of any show and then sickbeard post processing renames everything ...


Rutorrent dose a great job threw autotools of keeping dir structure from watch dir to download dir ( with out move enabled)
eg: /torrent/watch/Show/Season/download.torrent
will download to
/torrent/complete/Show/Season/

on its own without the need for post processing ..... is there any way to mod sickbeard to use the info it already has (show name - season info) and have it download the torrent file to the appropriate dir ? Seems like a usefull option to have and would save alot of heart ache on a rutorrent setup....

Reading the logg file - sickbeard identifies the show and season and even writes them in the log before download the torrent , im sure its an easy mod to add that info into the save dir ( unfortunately i dont have the know how lol ..... wish i did ),

instead of a torrent blackhole ... how about the option for pre processing making the torrent blackhole slightly smarter ..... and u can still post process if needed ... this way sickbeard handles and the sickbeard stuff (rss download and post processing) , rutorrent handles all the torrenting/seeding and data linking this seems like a seamless integration

this program is already so "intelligent " , this would only enhance it .... my first time using sickbeard i must say i am impressed this is the only improvement i would welcome ...
invader980
 
Posts: 5
Joined: Fri Apr 13, 2012 11:07 am

Re: Sickbeard Torrent Setup with ruTorrent - All GUI

Postby xombiemp » Fri Apr 13, 2012 11:49 am

invader980 wrote:my only issue (correct me if im wrong ) this method pools the download data into one folder without a folder structure ...

e.g ( from ur exsample) all data would be in /torrent/complete/ for any episode of any show and then sickbeard post processing renames everything ...


All sickbeard-downloaded tv shows will go to /torrent/complete/tv/sickbeard and then sickbeard will post process them. This is not the final resting place for the tv episodes. When you add a show to sickbeard, you configure the parent folder where the episodes will be stored. For example you would create a new directory called TV Shows somewhere and set that as the parent folder for your shows. Then all shows would be saved in a structure like TV Shows/Show Name/Season #/Episode
Image

Sickbeard not only renames episodes, but also moves them to the correct folder structure based on show and season.
xombiemp
 
Posts: 36
Joined: Tue Jan 10, 2012 5:36 pm

Re: Sickbeard Torrent Setup with ruTorrent - All GUI

Postby invader980 » Sat Apr 14, 2012 3:07 pm

thanx for the reply ....

my only concern is sickbread breaking the data link between rutorrent this is why i would like to keep folder structure .... I hear sickbeard has amazing post processing ( i plan on playing with it to night to see how it functions )... but i seed my shows forever ....

i skimmed over the commands for installing rutorrent in this tut ( i already have it installed and running to my liking so i didnt follow this part) but is it modified in this tut to keep the link ? Ive seen it done in others but its way above my head ...

this is the only reason i would like to mod sick beard to be friendlier with rutorrent lol only so the files will stay linked and seeded ..... im not sure if thats possible after post processing.

p.s.
my work-around right now is semi automated lol .... i let sickbeard do its thing (no post processing) and every other day i changed the location of the data files (threw rutorrent) to there corresponding folders. Ofcourse in a perfect world were i knew linux i could automate this process also lol
invader980
 
Posts: 5
Joined: Fri Apr 13, 2012 11:07 am

Re: Sickbeard Torrent Setup with ruTorrent - All GUI

Postby xombiemp » Sun Apr 15, 2012 12:15 am

invader980 wrote:my only concern is sickbread breaking the data link between rutorrent this is why i would like to keep folder structure .... I hear sickbeard has amazing post processing ( i plan on playing with it to night to see how it functions )... but i seed my shows forever ....


This is actually one of the main points of the guide. Notice in the auto tools configuration picture that the operation type for the auto move feature is Hard Link. When you create a hard link of a file it means that the new file is pointing to the same data as the original, but deleting or modifying one link doesn't affect the other.

So what happens is that rtorrent downloads the episode and when it completes, auto tools will create a hard link of the episode. It will continue to seed from the original file in the downloads directory though. So sickbeard is free to rename and move the hard link how ever it wants and it won't affect your seeding in any way. You can seed forever from the original file and sickbeard can process the hard link however it wants. Even when you delete the original file when you're done seeding the hard link will still be fine.

Hopefully I explained this ok and you realize how great hard links are in this situation.
xombiemp
 
Posts: 36
Joined: Tue Jan 10, 2012 5:36 pm

Re: Sickbeard Torrent Setup with ruTorrent - All GUI

Postby invader980 » Sun Apr 15, 2012 7:21 pm

ahhh i see that now ... this is were the confusion comes in ( i should have followed the guide from scratch) my version of autotools dose not have this feature ... lol :

Image

Now everything makes sense

thanks for taking the time to clarify that ... guess i need to do some updating :roll:

i assume this is a autotools 3.4 function as im still running 3.3 (and rutorrent)
invader980
 
Posts: 5
Joined: Fri Apr 13, 2012 11:07 am

Re: Sickbeard Torrent Setup with ruTorrent - All GUI

Postby ZaPHoN » Mon Jun 11, 2012 2:28 pm

I seem to get stopped at

mv rtorrent.rc .rtorrent.rc
mv: cannot stat `rtorrent.rc': No such file or directory

Could someone help out please?

My directories to download to are in Sickbeard in the home directory.
ZaPHoN
 
Posts: 2
Joined: Mon Jun 11, 2012 2:24 pm

Re: Sickbeard Torrent Setup with ruTorrent - All GUI

Postby xombiemp » Mon Jun 11, 2012 3:10 pm

ZaPHoN wrote:I seem to get stopped at

mv rtorrent.rc .rtorrent.rc
mv: cannot stat `rtorrent.rc': No such file or directory

Could someone help out please?


Basically that's just telling you how to rename a file in linux. Make sure you've downloaded the configs.zip that's attached to the first post, and place the rtorrent.rc file in your home directory and name it .rtorrent.rc.
xombiemp
 
Posts: 36
Joined: Tue Jan 10, 2012 5:36 pm

Re: Sickbeard Torrent Setup with ruTorrent - All GUI

Postby ZaPHoN » Tue Jun 12, 2012 6:06 am

Will this only work on server? My 12.04 is not server.
ZaPHoN
 
Posts: 2
Joined: Mon Jun 11, 2012 2:24 pm

Next

Return to Mobile Apps, Extra Scripts, Supplementary Tools

Who is online

Users browsing this forum: No registered users and 4 guests

cron