How to torrent on Raspbmc using Transmission

Raspberry Pi can be converted into a capable HTPC by installing Raspbmc on it. It can be further used to download torrents by using Transmission. I mostly used the steps from this guide, though I had make some extra customizations to get it working. I have described the steps that worked for me below.

Setup the hardware

Raspbmc is typically installed on a SD card. Storage left on this card may not be enough to download and store big files. To extend the storage I used a portable harddisk. The Raspberry Pi is not powerful enough to provide power to the harddisk through its USB port.

So, I bought a USB hub that is powered from electricity using a power adapter. I connected this hub with its USB cable to the Raspberry Pi. I connected the harddisk to this hub using another USB cable.

I powered on the Raspberry Pi. After login into the Pi using SSH, I could see that Pi had detected and mounted the harddisk by using the command df. I noted down the mounted path of the harddisk, in my case this was /media/foo-disk.

Note: The USB hub may have many ports, but do this setup connecting only the harddisk. If that works fine, try connecting other additional devices, for say charging, to the hub. If you notice that your harddisk gets unmounted by the Pi after a while, then this might mean that the USB hub can only power one device, i.e., your harddisk. This is what I noticed with my hub and so I only use it to connect the harddisk.

Setup Transmission

  • First, I installed the Transmission daemon on the Pi:
$ sudo apt-get install transmission-daemon
  • After installation, the daemon is automatically started. Since I need to setup the daemon correctly, I stopped it:
$ sudo service transmission-daemon stop
  • I created two directories on the harddisk: one to hold the files whose download is in progress and another to hold the completed downloads. Transmission can be setup to use the former while downloading and move them to the latter when finished.
$ cd /media/foo-disk
$ mkdir downloading
$ mkdir finished
  • I opened the settings file of Transmission to make the changes:
$ sudo vi /etc/transmission-daemon/settings.json

The description of the various configuration parameters in this file can be found here.

  • I edited the following parameters in the file:
"download-dir": "/media/foo-disk/finished",
"incomplete-dir": "/media/foo-disk/downloading",
"incomplete-dir-enabled": true,
"rpc-password": "raspberry",
"rpc-username": "pi",
"rpc-whitelist-enabled": false,

Note that Transmission will replace the text password you typed here with its hash after the daemon is started.

  • As one last step, I setup the daemon to be started whenever Pi boots up:
$ sudo update-rc.d transmission-daemon defaults
  • I now started the daemon with the new settings:
$ sudo service transmission-daemon start
  • The web interface of Transmission can be accessed from any computer in the network using the IP address and port 9091. You might want to configure your Pi with a static IP address to make this easier. For example, my Pi is at address and so I access Transmission by typing in the browser:

  • Note that the web interface is fully configurable. Other than the buttons on top and the bottom, you can also right-click to get context menus. In the settings, you can even configure Transmission to download only at certain times of the day. This is perfect if you do not want your TV viewing in the evening interrupted by torrent downloading in the background.


Permission denied

The daemon needs permission to write to the harddisk. If not, you may see a Permission denied error in the web interface when the daemon tries to write to the harddisk.

  • The daemon writes to disk as the user debian-transmission. One solution is to give this user write permissions to the directories on the hard disk:
$ sudo chmod -R debian-transmission /media/foo-disk/downloading
$ sudo chmod -R debian-transmission /media/foo-disk/finished
$ sudo vi /etc/init.d/transmission-daemon

and edit the line in it to:


Hard disk getting dismounted

The harddisk mounted by Raspbmc might get automatically dismounted if there is no activity for a few minutes. When this happens, Transmission fails with an Input/Output Error. To prevent this, I added a cronjob that creates a file after 4 minutes and deletes it after 5 minutes. To do this run:

$ sudo crontab -e

This opens a cronfile in the nano editor. Go down to the end of the file and add these two lines and save the file:

*/4     *       *       *       *       rm /media/foo-disk/keepMeUp.txt
*/5     *       *       *       *       touch /media/foo-disk/keepMeUp.txt

That is it, this worked fine on my Pi. I hope it does for you too🙂

4 thoughts on “How to torrent on Raspbmc using Transmission”

  1. Hi,

    Great post. One nitpick though. Rather then doing a cron job to touch the disk every few minutes have you tried playing with hdparm -B to set the advanced power management level. (also hdparm -S might help).

    I used hdparm -B 255 /dev/sda which did “setting Advanced Power Management level to disabled” so this should take care of the powering off issue.


  2. Hi. When i have tried install transmission i have got message:

    0 upgraded, 11 newly installed, 0 to remove and 38 not upgraded.
    Need to get 1132 kB/3000 kB of archives.
    After this operation, 6042 kB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Err wheezy/main libssh2-1 armhf 1.4.2-1.1
    404 Not Found [IP: 80]
    Err wheezy/main libcurl3-gnutls armhf 7.26.0-1+wheezy10
    404 Not Found [IP: 80]
    Err wheezy/main openssl armhf 1.0.1e-2+rvt+deb7u13
    404 Not Found [IP: 80]
    Failed to fetch 404 Not Found [IP: 80]
    Failed to fetch 404 Not Found [IP: 80]
    Failed to fetch 404 Not Found [IP: 80]
    E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?

    Do You know what is it? Some problem with repository?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s