Install and configure Transmission Bittorrent client on Ubuntu
Last updated:
linux ubuntu nas transmission
Overview
Transmission enables you to download Bittorrents. These torrents make it easy to download large files from multiple sources all at once. And each download can be paused, stopped or restarted.
Install Transmission
Transmission may already be installed. Let's check this first.
whereis transmission-daemon
If it is not installed, let's install it now.
sudo add-apt-repository ppa:transmissionbt/ppa
sudo apt-get update
sudo apt-get install transmission-cli transmission-common transmission-daemon
Now that Transmission is installed, we can configure our set-up.
User access
Transmission should run under it’s own username for security reasons. But this can create issues when accessing files and folders created by Transmission. Adding your user to the Transmission group will help with this.
Make sure you change your_user to your own Ubuntu user login name.
sudo usermod -a -G debian-transmission your_user
Log out and back in for this group change to take effect.
Folder access
You may want to choose your own folders to process your downloads and store the completed downloads in.
If so, then you must make sure they have the correct permissions.
My download processing directory will be /Downloads/Transmission/Processing. My directory for completed downloads will be /Downloads/Transmission/Complete.
Therefore, I will make sure the parent directory /Downloads/Transmission has execute permissions.
sudo chmod 775 /Downloads/Transmission
Change the group for my download directories to debian-transmission.
sudo chgrp debian-transmission /Downloads/Transmission/Processing /Downloads/Transmission/Complete
Grant write access for my download directories to the group.
sudo chmod 770 /Downloads/Transmission/Processing /Downloads/Transmission/Complete
Configure Transmission
The transmission-daemon will start automatically each time you start your server, with the settings defined in /var/lib/transmission-daemon/info/settings.json.
Make sure the transmission-daemon is stopped before making any changes to the settings file.
sudo service transmission-daemon stop
Now we can edit the settings file.
sudo nano /var/lib/transmission-daemon/info/settings.json
Username and password
The default Remote Procedure Call (RPC) username and password is transmission.
For security, after the next transmission-daemon restart, the password will be rewritten in SHA1 encrypted format.
"rpc-password": "my_new_password",
"rpc-username": "transmission",
Whitelist
Access to Transmission is defined by rpc-whitelist. Localhost, 127.0.0.1, is defined by default. I will add 192.168.*.* to allow access to any device on my local network.
"rpc-whitelist": "127.0.0.1, 192.168.*.*",
"rpc-whitelist-enabled": true,
Blocklist
Security and privacy are enhanced by using blocklist-url. This helps prevent known anti-P2P IP addresses from connecting to your client, and so protects your downloads from potential interference or monitoring.
There are many torrent blocklist providers. A popular one is https://raw.githubusercontent.com/Naunter/BT_BlockLists/master/bt_blocklists.gz.
"blocklist-enabled": true,
"blocklist-url": "https://raw.githubusercontent.com/Naunter/BT_BlockLists/master/bt_blocklists.gz",
Folder locations
You may want to change the default download and processing locations.
"download-dir": "/Downloads/Transmission/Complete",
"incomplete-dir": "/Downloads/Transmission/Processing",
"incomplete-dir-enabled": true,
File permissions
To ensure you can have write permission on downloaded files and folders, change umask from 022 to 002.
"umask": "002",
Restart Transmission
Restart Transmission to save these configuration settings.
sudo service transmission-daemon start
Bash Aliases
We can add some bash alias shortcuts to make it easier to run some common Transmission commands.
sudo nano ~/.bash_aliases
Add the following shortcuts to the file.
alias t-start='sudo service transmission-daemon start'
alias t-stop='sudo service transmission-daemon stop'
alias t-reload='sudo service transmission-daemon reload'
alias t-list='transmission-remote -n 'transmission:my_new_password' -l'
alias t-basicstats='transmission-remote -n 'transmission:my_new_password' -st'
alias t-fullstats='transmission-remote -n 'transmission:my_new_password' -si'
Change my_new_password to the password you set earlier.
Now allow these aliases to be used from the commandline.
source ~/.bash_aliases
We can now use the following to restart Transmission.
t-reload
Known issues
Hanging after restart
When restarting transmission on Ubuntu 24.x the system may appear to hang and a timeout warning shown.
sudo service transmission-daemon start
Job for transmission-daemon.service failed because a timeout was exceeded.
See "systemctl status transmission-daemon.service" and "journalctl -xeu transmission-daemon.service" for details.
We can query systemctl to see more details. Here is an example.
sudo systemctl status transmission-daemon.service
sudo systemctl status transmission-daemon.service
× transmission-daemon.service - Transmission BitTorrent Daemon
Loaded: loaded (/usr/lib/systemd/system/transmission-daemon.service; enabled; preset: enabled)
Active: failed (Result: timeout) 1min 14s ago
Docs: man:transmission-daemon(1)
Process: 3462 ExecStart=/usr/bin/transmission-daemon -f --log-level=error (code=exited, status=0/SUCCESS)
Main PID: 3462 (code=exited, status=0/SUCCESS)
CPU: 418ms
systemd[1]: Starting transmission-daemon.service - Transmission BitTorrent Daemon...
transmission-daemon[3462]: ERR utils.cc:139 Couldn't read '/var/lib/transmission-daemon/.config/transmission-daemon/queue.json': No such file or directory
systemd[1]: transmission-daemon.service: start operation timed out. Terminating.
transmission-daemon[3462]: Closing transmission session... done.
systemd[1]: transmission-daemon.service: Failed with result 'timeout'.
systemd[1]: Failed to start transmission-daemon.service - Transmission BitTorrent Daemon.
This is a known issue which is discussed here.
The simple fix is to edit the Transmission service file.
sudo systemctl edit --full transmission-daemon.service
In the service section, change Type=notify to Type=simple. Then save and exit the file.
Successfully installed edited file '/etc/systemd/system/transmission-daemon.service'.
Restart Transmission to check that the issue has been resolved.
sudo service transmission-daemon start