Install Transmission Bittorrent Client on Ubuntu 15.x

transmission-bittorrentTransmission is my favorite client for Linux, Windows and Mac OSX. It is super light and works with all content automation software: Sonarr, SickRage, CouchPotato, Mylar and Headphones. I have found it to be very reliable and easy to set up. This was tested on Ubuntu 15.04 but will work on any Debian system that uses systemd as the default startup service.

When you are done since you are of course using a VPN, you can retain remote access behind the VPN with this guide

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
$6.95
$59.95
($4.16 / month)
IPVanish
Yes
5
$10.00
$77.00
($6.41 / month)

Install Transmission Bittorrent Client Ubuntu 15.x

Update packages

sudo apt-get update

Install the Transmission torrent client daemon

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

Stop Transmission so we can modify the systemd script

sudo service transmission-daemon stop

Modify the transmission systemd script variables to use the right settings.json file (updated and fixed)

sudo mkdir -p /etc/systemd/system/transmission-daemon.service.d
sudo nano /etc/systemd/system/transmission-daemon.service.d/local.conf

Add these lines

[Service]
ExecStart=
ExecStart=/usr/bin/transmission-daemon -f --log-error -g /etc/transmission-daemon

Ctrl+X, Y and Enter to Save

Reload the systemd control daemon so it uses the changes we made

sudo systemctl daemon-reload

Stop the transmission service again

sudo service transmission-daemon stop

Add the Transmission user to your regular user’s group which will prevent permission issues as long as you download to hard drives that are owned by your main group (Raspberry Pi and Banana Pi users, if you follow my hard drive mounting tutorial then it will work).

sudo usermod -aG username debian-transmission

Also add your user to the transmission group

sudo usermod -aG debian-transmission username

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 to avoid permission issues

"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 with the username and password you set.

Your downloads folder should have 775 permissions so the transmission user has the correct permissions.

sudo chmod -R 775 /path/to/downloads

If you find Transmission isn’t starting on boot properly you can fix it by using Monit to make sure Transmission is always running using this guide.

Fix Transmission Permission Issues with systemd

If you have permission problems still you can change the user transmission runs as

sudo service transmission-daemon stop
sudo nano /etc/systemd/system/transmission-daemon.service.d/local.conf

Make sure you have these lines at the top so that the web interface starts after the network is up. This should fix any problems with the Transmission web GUI not being available on boot.

[Unit]
After=network.target

Change the user for Transmission to run as and save with Ctrl+X, Y and Enter.

[Service]
User=htpcguides

Ctrl+X, Y and Enter to save

Change the ownership of the Transmission settings file

sudo chown -R htpcguides:htpcguides /etc/transmission-daemon

Reload the transmission systemd script and restart the service

sudo systemctl daemon-reload
sudo service transmission-daemon restart

Now since you are of course using a VPN, you can retain remote access behind the VPN with this guide

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
$6.95
$59.95
($4.16 / month)
IPVanish
Yes
5
$10.00
$77.00
($6.41 / month)