( WARNING IF DONE INCORRECTLY – CAN DAMAGE THE NAS (if your doing this on a READYNAS) – HOWEVER IF YOUR VERSED IN LINUX THIS SHOULD BE CAKEWALK – WARNING BREAKING THE NAS THRU SSH ACCESS VOIDS THE WARRANTY)
( If done on a Debian Box this guide should be easy – considering you understand my cryptic way of explaining things) 

First off let me apologize for the bad formatting of this guide – I made this for myself – But I decided to share this on here since Ive seen so many posts on this

As an Alternative which works better than Transmission in my opinion: Check out RuTorrent. It works with rtorrent. There are addons available to get Rutorrent and rtorrent install on the nas. If the addons are not for your architecture check out Rutorrent and rtorrent setup guides on Debian systems and attempt – if you accept the risk/challenge – on the NAS.

I set this up on a Debian Box back home – NOT A READYNAS – but the READYNAS is a DEBIAN box – so if you want here are the steps I followed to get Rtorrent on my Virtual Machine (debian) working – It downloaded torrents to my Host Machine (which ran the Debian VM) – The host machine has a 4tb drive connected to it (Downloads folder that I shared). Everytime my Virtual machine launches it launches RTORRENT/rutorrent and mounts the 4tb drive across the network using CIFS (on windows I had to share the drive to all users, on the nas I had to authenticate with one of the users, and also force that authentication). Alternatively you could mount a NAS share on the Debian box. So basically – If all else fails you could setup a VM running Debian follow my steps but instead of a 4TB drive as I used, you can point it at your NAS.

There are two ways to look at the instructions below:
1- The code you type at your DEBIAN machine that sets up Rutorrent/rtorrent on it – it also points it to a remote share which could be a READYNAS or a NAS – I show you how to write a script that auto mounts these shares upon login – Also I show you how to start Rutorrent and rtorrent
2- Since the READYNAS is a debian box you could attempt this code on it – you could skip all the codes that talk about mounting remote shares as you will be downloading to the NAS most likely. I guarantee a few things will be different if you run this code on the NAS you will come across obstacles that you will have to overcome

###################################################

TRY AT YOUR OWN RISK

BELOW is a rutorrent rtorrent guide versed more
towards Debian Boxes

WHAT WILL BE DIFFERENT ON NAS SYSTEM:

The folders that I make and download at would be different if I set this up on a NAS

On a NAS you have to put your Webserver stuff in a
different folder then /var/www

Also you might need to add entries to your
/etc/apt/sources.list to be able to “apt-get install”
all those apps

###################################################

### INSTALLING ###

apt-get update
apt-get install subversion build-essential automake libtool libcppunit-dev libcurl3-dev libsigc++-2.0-dev unzip unrar-free curl libncurses-dev apache2 php5 php5-cli php5-curl libapache2-mod-scgi

ln -s /etc/apache2/mods-available/scgi.load /etc/apache2/mods-enabled/scgi.load

mkdir ~/install;cd ~/install
svn checkout http://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/stable xmlrpc-c

cd xmlrpc-c

./configure –disable-cplusplus
make
make install

cd ~/install
wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.13.3.tar.gz
tar -xzvf libtorrent-0.13.3.tar.gz
cd libtorrent-0.13.3
./autogen.sh
./configure
make
make install

cd ~/install
wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.9.3.tar.gz
tar -xzvf rtorrent-0.9.3.tar.gz
cd rtorrent-0.9.3
./autogen.sh
./configure –with-xmlrpc-c
make
make install
ldconfig

mkdir /home/kossboss/rtorrent
mkdir /home/kossboss/rtorrent/.session
mkdir /home/kossboss/rtorrent/watch
mkdir /home/kossboss/rtorrent/download

 

Setup .rtorrent.rc file (rTorrent config): 

cd ~/
wget http://vps6.net/src/.rtorrent.rc
cp .rtorrent.rc /home/kossboss/

#####(Edit the settings in .rtorrent.rc, like max upload/download speed, max connected peers, etc, as needed.)#####

cd ~/install
wget https://rutorrent.googlecode.com/files/rutorrent-3.5.tar.gz
tar -xzvf rutorrent-3.5.tar.gz
mv rutorrent /var/www
wget https://rutorrent.googlecode.com/files/plugins-3.5.tar.gz
tar -xzvf plugins-3.5.tar.gz
mv plugins /var/www/rutorrent
rm -rf /var/www/rutorrent/plugins/darkpal
chown -R www-data:www-data /var/www/rutorrent

a2enmod ssl
a2enmod auth_digest
a2enmod scgi
openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.pem
chmod 600 /etc/apache2/apache.pem
htdigest -c /etc/apache2/passwords seedbox kossboss

#####(Enter a password of your choice when prompted, you will use this to log in to the ruTorrent web UI.)#######

cd /etc/apache2/sites-available/
rm -rf default
wget http://vps6.net/src/default
a2ensite default-ssl
/etc/init.d/apache2 reload

#### follow the rclocal and dtach script so that it launches when you start the debian box ###

### MY RC.LOCAL SCRIPT === SO THAT rtorrent launches thru a dtach session and also the win8 download folder gets mounted ###

What to put in the rc.local script is the mount commands for what needs to be mounted for rtorrent to save its files to – also rtorrent starts rutorrent. Then in script /etc/rc.local (hopefully the rc.local service is allowed to start on your debian box in the default run levels check by doing sysv-rc-conf or rc-conf OR make sure you see an S##rc.local in /etc/rcN.d where N is the debian default run levels for multiuser and ## is whatever number, that part doesnt matter- it should be among the last on the list – rc.local is a script that starts on boot and init.d tells it to run: the way it works /etc/rc#.d/ is read for scripts in order then rc.local points to /etc/init.d/rc.local which then calls /etc/rc.local – so we tell our scripts to run in /etc/rc.local)

In rc.local put the commands before the exit 0 or else they wont run

cat /etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will “exit 0” on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/sbin/mountrdownwin.sh

start-stop-daemon –start –chuid kossboss –name rtorrent –exec /usr/bin/dtach — -n /home/kossboss/rtorrentdate +%x-%T | tr [/:] -.dtach /usr/local/bin/rtorrent

exit 0

#####################################################################################
The next part ASSUMES YOUR SETTING UP RTORRENT/RUTORRENT ON YOUR DEBIAN VM  and sets up scripts that mounts my remote USB drive  you could do this on your Debian VM and make it mount the READYNAS shares on there
(or)
SKIP THIS NEXT SECTION IF WRITING THESE SCRIPTS IF YOUR JUST ATTEMPTING TO SETUP THE RUTORRENT/RTORRENT ON YOUR NAS (to calirify – you wont be telling rutorrent to save to a remote USB if your using a NAS, you would be telling it to save locally on the NAS the same place where rutorrent is, thus its local – save location and program location of rutorrent/rtorrent is the same – so all the mount commands below you can skip, but the changing .rtorrent file is important, you need to tell the directory variable where to save your files, so if its on a nas, it will be to the directory where your big data volume is mounted )
#####################################################################################

### MADE THIS SCRIPT LAUNCH AT START  ###
* it checks for mounts existing so that you dont have double mounts

### THIS SCRIPT WILL UNMOUNT THAT IF YOU NEED IT ###

#!/bin/bash
umount /mnt/rdownwin

### GIVE kossboss-user to run those PERMISSION ###

chmod 777 mountrdownwin.sh
chmod 777 umountrdownwin.sh

mkdir /mnt/rdownwin/0rtor && chmod 777 -R /mnt/rdownwin/0rtor

 

### IN RUTORRENT INTERFACE: ###

* Log in with password that you set for WebUI uptop

default download directory:
/home/kossboss/rtorrent/download

changed to:
/mnt/rdownwin/0rtor

### ONLY CHANGE TO /home/kossboss/.rtorrent ###

* I include full file below
directory = /mnt/rdownwin/0rtor/
from
directory = /home/kossboss/rtorrent/download
— this just means by default this is the setting but can change it when logged in to the web interface (the web interface doesnt modify the .rtorrent file) 

#### DONT FORGET TO GET RID OF INSTALL ###

cd ~
rm -rf install

#########
#########
######### 

Didnt modify this one, just download as per instructions below

#########
#########
#########

NOTE for NAS and changing port: For your NAS config you will probably want to change the virtual host to not be 80 in <VirtualHost *:80> but set it to <VirtualHost *:N>, where N is a port number you chose to run rutorrent off of,  as that is the default nas web console/gui is run of port 80. Also that will require another change in. by opening /etc/apache2/apache2.conf or /etc/httpd/httpd.conf and adding in Listen # where # is the port number thats not port 80 that you chose for rutorrent. The <VirtualHost *:N>. Note all of these ports are TCP (definitely not UDP as http and https are run off TCP)

 

##################################################################
##################################################################
##################################################################

.rutorrent.rc file 

I let this file know via the “Directory” Directive below to put
all of its downloads into the rdownwin share which and in a folder
called 0rtor

##################################################################
##################################################################
##################################################################

 

Leave a Reply

Your email address will not be published. Required fields are marked *