transmission set up new
DESCRIPTION
Raspberry pi as torrent clientTRANSCRIPT
Please before you start commenting about breaking the law etc etc notice that there are
many freeware programs out there which you can download and share freely.
I never download and share movies, music etc.
Thank you
I’ ot a LINUX e pe t so I spe t so e ti e t i g to setup a to e t lie t ith Raspberry Pi. So I know how difficult it is and how much you have to search to set it up
properly. This is the way I did it and it runs smoothly.
First of all these are the things you need to start your project
1. Your Raspberry Pi
2. A USB HUB with power
3. A USB hard disk
The connections we must do are as shown
You need a keyboard to start which you can connect to the HUB
Now we have to go to our windows computer to format our USB Disk and prepare the SD
Card.
I p efe to fo at HDD to e t4 file s ste . It’s faste a d o e sta le. Fo that I use the free Mini tool Partition Wizard. You can get it from here
http://download.cnet.com/MiniTool-Partition-Wizard-Home-Edition/3000-2094_4-
10962200.html
To prepare the SD Card. To do that you need a program called Win32DiskImager and you
can download it for free from
http://sourceforge.net/projects/win32diskimager/files/latest/download
Extract the exe an install it.
Then we have to download the Raspberry Pi distribution. I use the latest distribution from
Pi’s offi ial site. http://www.raspberrypi.org/downloads The image I use is the
2013-05-25-wheezy-raspbian
Extract the image file and start Win32DiskImager
Select your downloaded image, you SDCard device and press Write. Wait until the image is
ready.
Now we are ready to start.
Put the SDCard to your Pi and put the power cable in. In this step toy need to have at list a
keyboard connected to your HUB or your Pi a d a o ito to see hat’s happe ing. I use a
Video cable and I connect it to my monitor
If ou a ’t o e t it to ou monitor you can move to your TV and plug the cable there so
ou do ’t ha e to ess e e thi g a ou d. I this stage ou do ’t eed the HUB a d the disk.
Now you are ready to start. First of all you have to setup your device to run the raspbian.
I the i itial s ee do ’t fo get to e a le ““H. Also as you will use the Pi for torrenting you
do ’t eed the GUI e i o e t so hoose to logi i to the o sole.
Finish all the proper adjustments and press finish.
Your device will restart and you have to log in. The defaults are
USER:pi PASSWORD:raspberry
If you have changed your password use the new password.
You are now logged in. Write down the address of your device so you can connect to it later.
It is something like 192.168.1.24
Key in
sudo shutdown –h now
and wait for the device to shut down. At this point you can remove the keyboard and the
monitor and connect the HDD and the HUB as above. Start the Pi and leave it there.
You can go now to your computer.
To o e t to ou pi’s o sole ou eed a ““H p og a . I use putt hi h ou a download from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
Run putty and write the address of your pi (in my case it is 192.168.1.24)
Log in the Pi using pi as user and your password
I have renamed my device as mypi the default name is raspberrypi
And now it is time to start. What I usually do is that I shutdown the pi and put the SD card
back into the computer. I start Win32DiskImager and save my work to an image file (you can
give to it any name) so if (better is when) I make a mistake I will not lose all my work.
If you press read the program copies the SD Card to an image file which you can write back
late if e essa . do ’t fo get to put .i g at the e d .
We are back logged in the pi.
##TIP## If you don’t like typing you can copy the text from windows and paste it to putty
with a right click
First of all we need to update raspbian
sudo apt-get update
Wait until the update is finished.
The next thing is to get rid of all the unnecessary GUI content
sudo apt-get purge libx11-6 libgtk-3-common xkb-data lxde-icon-theme raspberrypi-
artwork penguinspuzzle
[TIP] If you make a typing mistake you can press the UP ARROW and edit your command
sudo apt-get autoremove
At this poi t s ste if e light. If ou ha e ’t sa ed ou o k I thi k it’s ti e to do it o .
Next we must make our pi to have all times the same network address (static). For this we
must use a text editor names nano to edit the file /etc/network/interfaces.
sudo nano /etc/network/interfaces
We replace all the content of the file
auto eth0
iface eth0 inet static
address 192.168.1.24
netmask 255.255.255.0
gateway 192.168.1.1
We do this when we are plugged into a wired network a d e do ’t use a i eless o e, else we leave wla0 in place.
To write the content of the file to the SD we press Control-O [^O] and then ENTER. To exit
nano [^X] (control and X simultaneously).
In the address toy can put at the fourth number any number between 2 and 255 but I prefer
to use the address it was automatically assigned.
The gateway is usually 192.168.1.1. In my case it is 192.168.1.2 because of the router I use.
In some cases might be 192.168.0.1 because the network address of the DHCP server
(usually the router).
The gateway address is the address of your router which is connected to the internet.
If you change the address you better restart the pi.
If you want to have access from the internet, you should get an address from http://www.no-
ip.org or any other provider. You'll also need to forward your external IP to your Pi's IP
address on your LAN. It depends on your router. Usually there's NAT, or Virtual server or Port
forward. Use port 80.
If ou ha e ’t ha ge the pass o d of the Pi ou a do it o
sudo passwd
Now it’s ti e to see ou pa titio ta le.
cat /proc/partitions
Our disk is sda1.
We need to instruct Pi to mount our Disk at the same position
sudo mkdir /media/USBDisk
Before we can mount the drives, we need to create a directory to mount the drives to.
sudo mount -t auto /dev/sda1 /media/USBDisk
*Note that in LINUX words are case sensitive. USBDisk is not the same
as usbdisk
sudo mkdir /media/USBDisk/shares
sudo mkdir /media/USBDisk/shares/downloading
sudo mkdir /media/USBDisk/shares/completed
sudo nano /etc/fstab
We add the /dev/sda1 line and save it
NOW it’s ti e to i stall the to e t lie t. The e a e uite a fe I ha e used transmission
and deluge. I prefer transmission because I can easily control it from my android phone and
my work computer. Later we will show toy how to install deluge
sudo apt-get install transmission-daemon
Let’s o figu e the pe issio s o
sudo usermod -a -G debian-transmission pi
sudo chgrp debian-transmission /media/USBDisk/shares/downloading
sudo chgrp debian-transmission /media/ USBDisk/shares/completed
sudo chmod 770 /media/USBDisk/shares/downloading
sudo chmod 777 /media/ USBDisk/shares/completed
The pe issio s let us o se ead a d ite to the o pleted di e to ut e a ’t browse the downloading one. If you want you can change the 770 to 777 to have full control
on it.
Reload the transmission
sudo service transmission-daemon reload
Edit transmission settings.json file
sudo nano /etc/transmission-daemon/settings.json
The content of the file is here. Marked are the lines we must edit
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": false,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4,
"dht-enabled": false,
"download-dir": "/media/data/complete",
"download-limit": 100,
"download-limit-enabled": 0,
"download-queue-enabled": true,
"download-queue-size": 5,
"encryption": 1,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/media/data/incomplete",
"incomplete-dir-enabled": true,
"lpd-enabled": false,
"max-peers-global": 200,
"message-level": 2,
"peer-congestion-algorithm": "",
"peer-limit-global": 91,
"peer-limit-per-torrent": 150,
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
"peer-socket-tos": "default",
"pex-enabled": false,
"port-forwarding-enabled": true,
"preallocation": 1,
"prefetch-enabled": 1,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 2,
"ratio-limit-enabled": false,
"rename-partial-files": true,
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "{2dc2c41724aab07ccc301e97f56360cb35f8ba1fGVVrdHDX",
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-username": "transmission",
"rpc-whitelist": "*.*.*.*",
"rpc-whitelist-enabled": false,
"scrape-paused-torrents-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"seed-queue-enabled": false,
"seed-queue-size": 10,
"speed-limit-down": 250,
"speed-limit-down-enabled": true,
"speed-limit-up": 0,
"speed-limit-up-enabled": true,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 18,
"upload-limit": 100,
"upload-limit-enabled": 0,
"upload-slots-per-torrent": 14,
"utp-enabled": true
}
"download-dir": "/media/data/complete",
Becomes
"download-dir": "/media/USBDisk/shares/completed",
"incomplete-dir": "/media/data/incomplete",
"incomplete-dir": "/media/USBDisk/shares/downloading",
"rpc-username": "transmission",
"rpc-username": "myname",
I changed the username because it’s easier to remember. You are not obliged to do that if you don’t want to.
Cross your fingers and open your browser
A d o it’s time to install SAMBA
sudo apt-get install samba samba-common-bin
Open the configuration file
sudo nano /etc/samba/smb.conf
At the end of the file add the following lines
[Torrentbox]
comment = Public Shares
path = /media/USBDisk/shares/completed
writeable = Yes
only guest = Yes
create mask = 0777
directory mask = 0777
browseable = Yes
public = yes
Restart SAMBA
sudo service samba restart
THAT’S IT
YOU CAN NOW ACCESS YOUR FILES FROM WINDOWS EXPLORER
If you want to access transmission from your android phone you can install Remote
Transmission
Hope I helped
NOTE. I face no problems with transmissions stability but other users do, Efstathis Iosifidis
made the following changes and he found that they work OK.
Edit /boot/cmdline.txt a d add smsc95xx.turbo_mode=N to it. Edit /etc/sysctl.conf a d ha ge vm.min_free_kbytes =16384″ f o 8MB to 16MB .
If you want to have access to your files from outside you have to install an ftp server. This is
how we can do it.
Install the ftp program
sudo apt-get install vsftpd
Uncomment (that means delete the # before) the following lines
local_enable=YES
write_enable=YES
Restart the service and you are done
sudo service vsftpd restart
Don’t forget to sa e your ork