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.
Also, I would have posted more links for the software you need to do this, but I do not have enough reputation
First of all these are the things you need to start your project
- Your Raspberry Pi
- A USB HUB with power
- A USB hard disk
...and a keyboard to start with
Now we have to go to our windows computer to format our USB Disk and prepare the SD
Card. I prefer this free Mini tool Partition Wizard. You can get it from here
To prepare the SD Card. To do that you need a program called Win32DiskImager
Extract the exe an install it.
Then we have to download the Raspberry Pi distribution. I use the latest distribution from
Pi’s official site. The image I use is the
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 you need to have a keyboard connected to your Pi and a monitor to see what’s heppening.
Now you are ready to start. First of all you have to setup your device to run the raspbian. Also as you will use the Pi for torrenting you don’t need the GUI.
Finish all the proper adjustments and press finish.
Your device will restart and you have to log in.
The defaults are
If you have changed your password use the new password.
You are now logged in. Write down the IP address of your device so you can connect to it later, It is something like 192.168.1.24.
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 back to your Windows computer.
I use PuTTY to connect via SSH on Windows. It is freeware and you can download it online.
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
Now 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 raspberrypiartwork
[TIP] If you make a typing mistake you can press the UP ARROW and edit
sudo apt-get autoremove
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:
iface eth0 inet static
We do this when we are plugged into a wired network and we don’t use a wireless, else
we leave wlan0 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 you 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.noip.
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 you haven't yet changed the default password, do the following:
Now it’s time to see our partion table
For me, the 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
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 time to install the torrent client, transmission,
sudo apt-get install transmission-daemon
Now to configure permissions:
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
If you want you can change the 770 to 777 to have full control on it, go ahead.
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
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.
now 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
comment = Public Shares
path = /media/USBDisk/shares/completed
writeable = Yes
only guest = Yes
create mask = 0777
directory mask = 0777
browseable = Yes
public = yes
sudo service samba restart
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
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
Restart the service and you are done
sudo service vsftpd restart