Install Transmission Raspberry Pi Latest Version with Raspbian

raspberry_pi_transmission-bTransmission is a nice lightweight torrent client that is perfect for the Raspberry Pi. Transmission will work with the major searchers: SickRage, CouchPotato, Mylar and Headphones. This guide was created for Raspbian September 2014 release and is the easiest way to install the latest Transmission 2.84 currently on the Raspberry Pi.

Attention Raspbian and Minibian Jessie users: follow this guide instead

If you are trying to figure out which hardware would work best for you, consider reading the Pi benchmarks.

VPN Service
All Platforms
Number of Connections
Monthly Cost
Annual Cost
Private Internet Access
Yes
5
$6.95
$39.95
($3.33 / month)
Pure VPN
Yes
5
$10.95
$59.95
($4.91 / month)
IPVanish
Yes
5
$10.00
$77.00
($6.41 / month)

Install Transmission Raspberry Pi Latest Version

Warning: this forces some Jessie repositories so it can cause issues with other configurations you may already have on your system, proceed at your own risk.

Attention Raspbian and Minibian Jessie users: follow this guide instead

Add jessie repositories

echo "deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free" | sudo tee -a /etc/apt/sources.list
echo "deb http://archive.raspbian.org/raspbian jessie main contrib non-free" | sudo tee -a /etc/apt/sources.list

Create the jessie preferences file so we can control it

sudo nano /etc/apt/preferences.d/jessie.pref

Paste this code. Pinning forces jessie to be of a lower priority so it doesn't conflict with existing packages, a value of -1 means only packages we specify to be installed from jessie will be installed from there, no other packages should be affected unless they are dependencies.

Package: * 
Pin: release n=jessie 
Pin-Priority: -1

One more change to avoid wheezy packages overriding jessie packages (thank you Thorsten and Joshua)

sudo nano /etc/apt/preferences

Add this information or adjust your pin priority so it matches

Package: * 
Pin: release n=wheezy 
Pin-Priority: 989

Now Ctrl+X, Press Y and then Enter

Update packages

sudo apt-get update

Install the Transmission client daemon forced from the jessie repository

sudo apt-get install -t jessie transmission-daemon transmission-cli -y

It starts automatically, stop it so we can edit some files

sudo service transmission-daemon stop

Add the Transmission user to the pi group which will prevent permission issues as long as you download to hard drives that are owned by the pi group (if you follow my hard drive mounting tutorial then it will work).

sudo usermod -a -G pi transmission-daemon

You may have a different transmission group, then run this command

sudo usermod -a -G pi debian-transmission

Give the settings file write and execute permissions

sudo chmod 775 /etc/transmission-daemon/settings.json

Open up the configuration file for editing

sudo nano /etc/transmission-daemon/settings.json

Change the following values.
rpc-whitelist allows IP addresses to access the Web interface it has been set to all here. You can also change it to your local home network like 192.168.*.* if you want it to be more secure. However, if you want to be able to access transmission outside your local network then it should be *.*.*.* which represents all IPs.

"rpc-whitelist": "*.*.*.*",

May as well disable the whitelist if you are allowing all IPs

"rpc-whitelist-enabled": false,

Change the remote access username and password to your liking

"rpc-password": "password",
"rpc-username": "username",

Change the download directory to where you want to store your torrent downloads

"download-dir": "/var/lib/transmission-daemon/downloads",

Set the number of active downloads, 5 may be a bit too much for the Pi to handle

"download-queue-size": 5,

Set the number of torrents to actively seed

"seed-queue-size": 10,

Set umask to 002 so new files have the right permissions in the download folder

"umask": 002,

Ctrl+X, Y and enter to save and restart Transmission

sudo service transmission-daemon restart

Access the Transmission torrent client at http://ip.address:9091

Note that you may need to install future packages that have dependencies errors like this

sudo apt-get install -t jessie packagename

Alternative Transmission Start up Method

Transmission should autostart on boot but as the debian-transmission user which is not convenient if you want to manage the files from WinSCP as you will get a permission denied error. You can edit the init.d script or use upstart to have all the files downloaded by transmission to be owned by the pi user.

If you are on Minibian you may need to use the upstart script method (not init.d) if you see this error when starting the init.d script

[....] Starting bittorrent daemon: transmission-daemon/usr/bin/transmission-daemon: /lib/arm-linux-gnueabihf/libgpg-error.so.0: no version information available (required by /lib/arm-linux-gnueabihf/libgcrypt.so.20)

Choose only the init.d script or the upstart script.

Editing the init.d script can prevent further permission issues but then your rpc password will be stored in plain-text, this should not be necessary.

Take ownership of the settings file and temporary downloads folder

sudo chown pi:pi /etc/transmission-daemon/settings.json
sudo chown -R pi:pi /var/lib/transmission-daemon

Edit the transmission-daemon init.d script

sudo nano /etc/init.d/transmission-daemon

Find this line

USER=debian-transmission

Change it to

USER=pi

Ctrl+X, Y and Enter to save and exit
Restart the service

sudo service transmission-daemon restart

The upstart method is not necessary unless you have issues with the default init.d script. Upstart can mess with debian based systems so consider yourself warned.

This is the upstart method, install upstart

sudo apt-get install upstart

Enter Yes, do as I say!

Create the upstart file, this will allow the daemon to run as the pi user so you can remotely manage files with WinSCP or using Samba shares

sudo nano /etc/init/transmission.conf

Paste this code for the Transmission upstart script

start on runlevel [2345]
stop on runlevel [016]
# give time to send info to trackers
kill timeout 30
setuid pi
respawn
pre-start script
# stop job from continuing if no config file found for daemon
 [ ! -f /etc/default/transmission-daemon ] && { stop; exit 0; }
# source the config file
 . /etc/default/transmission-daemon
# stop job from continuing if admin has not enabled service in
 # config file.
 [ "$ENABLE_DAEMON" != 0 ] || { stop; exit 0; }
end script
script
 . /etc/default/transmission-daemon
exec /usr/bin/transmission-daemon -f $OPTIONS
end script

Start the service

sudo service transmission start

Access the Transmission torrent client at http://ip.address:9091

Troubleshoot Transmission Performance

To fix performance issues on the Raspberry Pi with Transmission

sudo nano /boot/cmdline.txt

Scroll all the way to the right and add smsc95xx.turbo_mode=N and press Ctrl+X, Y and then Enter

sudo nano /etc/sysctl.conf

Scroll all the way to the bottom and add or change vm.min_free_kbytes =16384 and press Ctrl+X, Y and then Enter.

Happy torrenting on your Raspberry Pi with the Latest Transmission torrent client.

Because you have added the jessie repo you may get future errors when installing packages, they can usually be resolved by specifying to install the package from jessie like this

sudo apt-get install -t jessie packagename