<- Jacob Vorreuter

Raspberry Pi Bittorrent Server

This was my first Raspberry Pi project. I thought I’d start with something easy and useful. I ended up with a low power, always on, anonymous bittorrent server that also serves as my media center.

The steps involved were roughly:

  1. Buy the hardware (Raspberry Pi, case, USB external drive, powered USB hub)
  2. Configure the external drive
  3. Install and configure a bittorrent client
  4. Sign up for a proxy service and configure within bittorrent client

External drive

Plugin the drive and format it. Then create the mount point and set the permissions:

1
2
3
sudo mkfs.ext4 /dev/sda1 -L untitled
sudo mkdir /mnt/storage
sudo chown pi:pi /mnt/storage

Edit the fstab file so that your drive will mount automatically on startup:

1
sudo vim /etc/fstab

Add this line:

1
dev/sda1       /mnt/storage    ext4    defaults        0       0

Reboot:

1
sudo reboot

Bittorrent client

I followed the directions from this How-To Geek post when setting up my bittorrent client.

I highly recommend the ThinClient configuration. Originally I tried to do all the configuration and management with deluge-console and directly editing ~/.config/deluge/core.conf. The downside of this is that the config file is not very self explanatory. It’s not clear what the units are for some fields or how numeric values map to different predefinied types. I found it much easier to run the deluge desktop client on my Mac and configure the deluge daemon through the GUI interface.

Proxy service

Configuring a proxy service was really easy once I had the desktop client setup to handle configuration. Follow this lifehacker post to get up and running with a www.privateinternetaccess.com account.

Playing movies

I don’t have a keyboard and mouse plugged into my Raspberry Pi. It’s connected to the television via HDMI and nestled away in my media console. To play a video file, I ssh in and create a screen session so that I’ll be able to close my terminal window without distrupting playback. Then I kick off omxplayer and that’s all there is to it.

1
2
3
ssh pi@192.168.1.104
screen -S movie
omxplayer -r -o hdmi /mnt/storage/torrents/MOVIE.mkv

« Bikes and Code Raspberry Pi surveillance »