Home » Home Server » Install Transmission with web interface on Ubuntu

Install Transmission with web interface on Ubuntu

Transmission 2.84

written by Anand June 20, 2012

Transmission bittorrent is probably the most common bittorent client for Linux platforms. Transmission web interface is like a thin client yet feature-rich and aesthetically pleasing. Bittorrent client for Windows and Linux are both available. I have previously written articles on how to install Deluge with webui on Lucid Lynx server and Precise Pangolin server. I initially started with Deluge but Transmission quickly became my favorite due to its simplicity, ease of install, and yet feature-full webui. In this post, I provide instructions on how to setup server running Ubuntu 12.04 with Transmission (with or without gui interface and with web interface). This method works on previous versions of Ubuntu as well (>10.04). While this post explains how to run Transmission web interface on a headless server, if you are running a desktop environment, installing a Gtk or Qt interface is just one step away.

atomic-toolkit-logoLooking for an automated solution? Try our AtoMiC ToolKit, which makes installation and management of Home Server software such as SickBeard, CouchPotato, Torrent clients, etc. easy.

About Transmission

Install Transmission with Web InterfaceTransmission is a completely free open-source application.

Transmission's website describes it as:

Easy: Transmission is designed for easy, powerful use. We've set the defaults to “Just Work” and it only takes a few clicks to configure advanced features like watch directories, bad peer blocklists, and the web interface. When Ubuntu chose Transmission as its default BitTorrent client, one of the most-cited reasons was its easy learning curve.

Lean: In separate benchmarks, Linux Format and Lacrocivious both found Transmission to use less CPU than any other GUI client. It even used less CPU than some non-GUI clients. Transmission also has the lowest memory footprint of any major BitTorrent client.

Native: Unlike many cross-platform applications, Transmission integrates seamlessly with your operating system. The Mac OS X interface is written in Objective-C and uses Growl notifications and dock badging to keep you informed. The GTK+ interface has been carefully written to follow the GNOME Human Interface Guidelines. If your desktop supports popup notifications, desktop sounds, and a system tray, the GTK+ interface will make use of them.

Powerful: Transmission has the features you want from a BitTorrent client: encryption, a web interface, peer exchange, magnet links, DHT, µTP, UPnP and NAT-PMP port forwarding, webseed support, watch directories, tracker editing, global and per-torrent speed limits, and more.

In addition, it has a wealth of addons and other relevant applications.

Step 1: Add Transmission PPA Repository

Transmission is readily available in Ubuntu repository. However, Ubuntu repository is usually a bit slow on updating versions. So if you are like me and would like to have the latest version as soon as possible, then add the PPA repository as described below. If not proceed to step 2.

sudo add-apt-repository ppa:transmissionbt/ppa

Step 2: Install Transmission Web Interface

Then update packages list and install Transmission:

sudo apt-get update
sudo apt-get install transmission-cli transmission-common transmission-daemon

If you want the full desktop gui software then use:

sudo apt-get update
sudo apt-get install transmission-gtk transmission-cli transmission-common transmission-daemon

Step 3: Configure Users and Permissions

It is recommended that Transmission runs under it's own username for security reasons. This creates a few issues with file and folder access by Transmission as well as your account (let us assume it is user). You will have to create a new set of folders for Transmission to read/write/execute (example: transmission folder containing these subfolders: completed, incomplete, and torrents). The account user also needs full control over these folders and their contents. I recommend reading this post to familiarize yourself with safely changing user groups and permissions.

First, cd to the desired folder and create a folder for Transmission to use:

cd /home/user/Downloads
mkdir transmission
cd transmission
mkdir completed incomplete torrents

Then, add the username user to the group debian-transmission:

sudo usermod -a -G debian-transmission user

This will add debian-transmission as a secondary group to the account user, resulting in access to both Transmission and user. Then, change the ownership of the Transmission download folders to the group debian-transmission:

sudo chgrp -R debian-transmission /home/user/Downloads/transmission

Next, change the permissions for the transmission download folders to allow read, write, and execute for Transmission and user:

sudo chmod -R 775 /home/user/Downloads/transmission

This gives the group debian-transmission, of which both Transmission and user are members of, full access while others get only read and execute permissions. If you want to further restrict access for others you could use 774 (read only) or 770 (no access).

3 Best Standalone Bittorrent Downloaders:
  1. WD My Cloud 4TB Personal Cloud Storage - NAS
  2. Buffalo LinkStation 210 2 TB NAS Personal Cloud Storage and Media Server
  3. Synology America DiskStation 2-Bay Diskless Network Attached Storage

Finally, as described later, you will also have to set the umask parameter in Transmission's settings file to “2” (default is 18) for the account user to have full access to files/folders created by Transmission.


Continue to next page
to fully install Transmission

Step 4: Starting and Stopping Transmission Daemon

After install Transmission, the daemon will be started automatically (but not accessible yet). Starting and stopping Transmission daemon is pretty straightforward. You can start and stop Transmission daemon using the following commands:

sudo service transmission-daemon start
sudo service transmission-daemon stop

For convenience, you could create bash aliases as described in this post. For example, transstart could execute sudo service transmission-daemon start.

Restarting (or reloading) Transmission daemon can be tricky. Restarting the the daemon (while it is already running) would rewrite the Transmission settings files to its original state. In other words, restarting the Transmission daemon would reset all the custom settings you saved. If Transmission is running, always reload the service:

sudo service transmission-daemon reload

Or, add the following bash aliases to /home/user/.bash_aliases:

alias transstop='sudo service transmission-daemon stop'
alias transstart='sudo service transmission-daemon start'
alias transreload='sudo service transmission-daemon reload'

Step 5: Move Default Settings File

To make the Transmission daemon accessible through the web interface, the configuration files have to be edited and Transmission daemon reloaded. The configuration file is this: /etc/transmission-daemon/settings.json. Edit the file as needed. In order to protect your settings from being accidentally re-written (example: if you accidentally restart Transmission instead of reload), I like to save the actual settings file in a safe location and creating a symbolic link to it inside /etc/transmission-daemon/. This way, even if Transmission accidentally overwrites settings.json all you have to do is re-create the symbolic link.

First, backup the default settings file /etc/transmission-daemon/settings.json:

cd /etc/transmission-daemon
sudo cp -a settings.json settings.json.default

Then create a transmission settings directory in your home folder (example: /home/user/.config/transmission-daemon), copy settings.json into it, and change its permissions to make it accessible to transmission-daemon:

mkdir /home/user/.config/transmission-daemon
sudo cp -a /etc/transmission-daemon/settings.json transmission-daemon/
sudo chgrp -R debian-transmission /home/user/.config/transmission-daemon
sudo chmod -R 770 /home/user/.config/transmission-daemon

Then, remove /etc/transmission-daemon/settings.json, create a symbolic link in the /etc/transmission-daemon folder, and edit it permissions to make it accessible to Transmission and the user account:

cd /etc/transmission-daemon
sudo rm settings.json 
sudo ln -s /home/user/.config/transmission-daemon/settings.json settings.json
sudo chgrp -R debian-transmission /etc/transmission-daemon/settings.json
sudo chmod -R 770 /etc/transmission-daemon/settings.json

You can now start editing /home/user/.config/transmission-daemon/settings.json without worries of losing your settings.

Step 6: Edit Transmission Configuration Files

My recommendations are to set at least the following as a starting point:

"download-dir": "/path/to/downloads/folder",
...
"incomplete-dir": "/path/to/incomplete/folder",
"incomplete-dir-enabled": true,
...
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "password",
"rpc-port": 9091,
"rpc-username": "username",
"rpc-whitelist": "127.0.0.1,*.*.*.*",
"rpc-whitelist-enabled": true,
...
"umask": 2,
...
"watch-dir": "/media/datadrive/downloads",
"watch-dir-enabled": true

The default rpc-username and password is “transmission”.

Change it to whatever you want (any password will work). After next restart the password will be rewritten in SHA1 encrypted format for security reasons. Below is a modified example of my settings.json file.

{
    "alt-speed-down": 500, 
    "alt-speed-enabled": false, 
    "alt-speed-time-begin": 540, 
    "alt-speed-time-day": 127, 
    "alt-speed-time-enabled": false, 
    "alt-speed-time-end": 1020, 
    "alt-speed-up": 1, 
    "bind-address-ipv4": "0.0.0.0", 
    "bind-address-ipv6": "::", 
    "blocklist-enabled": false, 
    "blocklist-updates-enabled": true, 
    "blocklist-url": "http://www.example.com/blocklist", 
    "cache-size-mb": 4, 
    "dht-enabled": true, 
    "download-dir": "/home/user/Downloads/", 
    "download-limit": 100, 
    "download-limit-enabled": 0, 
    "encryption": 2, 
    "filter-mode": "show-all", 
    "idle-seeding-limit": 30, 
    "idle-seeding-limit-enabled": false, 
    "incomplete-dir": "/home/user/Downloads/incomplete", 
    "incomplete-dir-enabled": true, 
    "inhibit-desktop-hibernation": false, 
    "lazy-bitfield-enabled": true, 
    "lpd-enabled": false, 
    "main-window-height": 500, 
    "main-window-is-maximized": 0, 
    "main-window-layout-order": "menu,toolbar,filter,list,statusbar", 
    "main-window-width": 467, 
    "main-window-x": 50, 
    "main-window-y": 50, 
    "max-peers-global": 200, 
    "message-level": 2, 
    "minimal-view": false, 
    "open-dialog-dir": "/home/user", 
    "open-file-limit": 32, 
    "peer-congestion-algorithm": "", 
    "peer-limit-global": 240, 
    "peer-limit-per-torrent": 60, 
    "peer-port": 9058, 
    "peer-port-random-high": 9098, 
    "peer-port-random-low": 9026, 
    "peer-port-random-on-start": true, 
    "peer-socket-tos": "default", 
    "pex-enabled": true, 
    "play-download-complete-sound": true, 
    "port-forwarding-enabled": false, 
    "preallocation": 1, 
    "prefetch-enabled": 1, 
    "prompt-before-exit": true, 
    "proxy": "", 
    "proxy-auth-enabled": false, 
    "proxy-auth-password": "", 
    "proxy-auth-username": "", 
    "proxy-enabled": false, 
    "proxy-port": 80, 
    "proxy-type": 0, 
    "ratio-limit": 1.5, 
    "ratio-limit-enabled": true, 
    "rename-partial-files": true, 
    "rpc-authentication-required": true, 
    "rpc-bind-address": "0.0.0.0", 
    "rpc-enabled": true, 
    "rpc-password": "wfsdfasdfwf234sdf28b453906c3wer235sarthtys4usXRA", 
    "rpc-port": 9025, 
    "rpc-url": "/transmission/", 
    "rpc-username": "username", 
    "rpc-whitelist": "127.0.0.1,*.*.*.*", 
    "rpc-whitelist-enabled": true, 
    "script-torrent-done-enabled": false, 
    "script-torrent-done-filename": "", 
    "show-backup-trackers": false, 
    "show-desktop-notification": true, 
    "show-extra-peer-details": false, 
    "show-filterbar": true, 
    "show-notification-area-icon": false, 
    "show-options-window": true, 
    "show-statusbar": true, 
    "show-toolbar": true, 
    "show-tracker-scrapes": false, 
    "sort-mode": "sort-by-name", 
    "sort-reversed": false, 
    "speed-limit-down": 0, 
    "speed-limit-down-enabled": false, 
    "speed-limit-up": 1, 
    "speed-limit-up-enabled": true, 
    "start-added-torrents": true, 
    "statusbar-stats": "total-ratio", 
    "trash-original-torrent-files": false, 
    "umask": 2, 
    "upload-limit": 100, 
    "upload-limit-enabled": 0, 
    "upload-slots-per-torrent": 4, "user-has-given-informed-consent": true, 
    "utp-enabled": true, 
    "watch-dir": "/home/user/Downloads/torrents", 
    "watch-dir-enabled": true
}

In the example settings.json shown in previous page, note that I changed all the ports to non-default ports for security reasons. For further security you may want to allow web interface access only within your local network. If so, change “rpc-whitelist” value to “127.0.0.1,192.168.*,*”.

Save the settings and exit. You will now have to reload transmission-daemon to apply the new settings.

sudo service transmission-daemon reload

Do not forget to setup port forwarding on your router to divert Transmission traffic to the right computer running Transmission daemon on your home network (if you are behind a router).

Transmission Web Interface Screenshot

Transmission Web Interface Screenshot

Transmission GTK Desktop Interface

Transmission GTK Desktop Interface

If you do decide to install the Desktop GTK interface, then most of the settings, including enabling web interface, can be set from within the gui interface (pictures below):

Transmission Download Folders Settings

Transmission Download Folders Settings

Transmission Web Client Settings

Transmission Web Client Settings

If you like to be able control your deluge daemon through android phone, refer to this post.

Step 7: Apache proxy for Transmission Web Interface (optional)

To access the web interfaces using port numbers (eg. http://myserver.com:9091) is cumbersome. When possible, I like to create proxies for easier access (eg. http://myserver.com/transmission). If you are interested in setting up this please refer to this post.

If you SSL is enabled on your server you could redirect Transmission web interface to a secure HTTPS connection, thereby all information is encrypted during transfers. Below is an example of /etc/apache2/mods-available/proxy.conf on a LAMP server:

ProxyRequests Off
<proxy *>
     AddDefaultCharset off
     Order Allow,Deny
     Allow from all
</proxy>
ProxyPass /transmission http://localhost:9025/transmission
ProxyPassReverse /transmission http://localhost:9025/transmission
Redirect permanent /trans https://myserver.com/transmission/web/

Don't forget to enter the correct port number. The last line is optional (to redirect to a secure HTTPS connection), and automatically redirects http://myserver.com/trans to https://myserver.com/transmission/web (you have to have SSL enabled on your server).

3 Best Standalone Bittorrent Downloaders:
  1. WD My Cloud 4TB Personal Cloud Storage - NAS
  2. Buffalo LinkStation 210 2 TB NAS Personal Cloud Storage and Media Server
  3. Synology America DiskStation 2-Bay Diskless Network Attached Storage

Step 8: Setting up Dynamic DNS (optional)

If you would like to be able to access your Transmission web interface from the internet then it might be easier to setup Dynamic DNS service. This way you can reach your server with a nice URL (example: http://mytransmission.dyndns.org) instead of the http://ipaddress:port. You can get free domain names through services like DynDns.com. For a guide to setup DDNS autoupdate client on Linux, refer to this post.

That is it. Enjoy your transmission and do share your experiences in the comments section.

Related Articles

34 comments

albanyeye December 27, 2012 - 11:19 am

Hi
thanks for the great write up.
I am getting permission errors
Error:Permission denied in /home/user/Downloads/transmission/centos

The folder centos was created by transmission-debain but it is unable to write to it.
ls -l
drwxr-xr-x 2 user user

debian-transmission belongs to user group but the folder being created does not have write permissions group.
Any suggestons

Reply
Anand January 2, 2013 - 8:57 am

If I am right shouldn’t the download folders be owned by user:debian-transmission instead of user:user? Both users “user” and “debian-transmission” have to be members of the group “debian-transmission”. Your output above shows that the folder is owned by user:user to which the user “debian-transmission” cannot write to. I see that you the user “debian-transmission” to the group “user” as well. While theoretically this should give the user “debian-transmission” write previleges to the folder owned by “user” there are other folders involved (under /var and ~/.config). I am not sure the ownerships of those other folders are causing problems.

I had several such problems with transmission. For this reason, I recently moved to qBittorrent and have been very happy since. Take a look at this post if you are interested:

https://www.smarthomebeginner.com/install-qbittorrent-webui-ubuntu/

good luck!

Reply
AtariBaby October 6, 2013 - 1:40 am

Your codes for apt-get install above both contain html links, for example ,the one says these cause errors when copypasta

Reply
AtariBaby October 6, 2013 - 2:08 am

sorry for example they contain “em” html links.

Reply
Anand October 6, 2013 - 11:25 am

Thanks AtariBaby….stupid auto-formatting plugins. Fixed the codes.

Reply
facter July 30, 2014 - 4:47 am

Okay, so I thought I’d followed everything okay … but when I get to the @edit the configuration file@ .. you dont actually specify where that file is. I thought I figured it out, but although the settings are saved, it doesnt seem to be doing anything and I cant connect to the web interface on the port 9025 … can you let me know exaclty where the file I am supposed to be editing is located? Im pretty new to linux, and have to say this was a very long process .. I tried with rutorrent, and ran into issues, now on my second go I find this one is just as difficult.

Anyways, which config am I editing? I did get lost int he whole “you can now edit this withoutr losing settings” but when i went to edit it … no idea where the file actuaqlly was I was supposed to haha.

Reply
Anand July 30, 2014 - 8:26 am

facter, I am in the process of revamping this post. Meanwhile try my transmission installer script. It automatically does the basic configuration for you:

1-Step AtoMiC Transmission WebUI install script for Ubuntu

Here is a video of what the script does for you:
Video: Setup Transmission on Ubuntu 14.04 in one step

Reply
Anand July 30, 2014 - 8:53 am

Yes, I did specify where the configuration files are but like mentioned in my other comment, one of the plugins is causing issues. It may be due to a recent change I made.

Reply
facter July 30, 2014 - 8:38 am

Okay, i tried that but where the line says “then download the install script” there is no link nor command on that page.

I have got ranmsmission working, however it does not have the right file path. Ive edited the config file, both of the ones I can find, and yet it doesnt seem to apply these settings to it. its driving me a bit crazy.

What is the link/command to install the script after installing git?

Reply
Anand July 30, 2014 - 8:51 am

Here is the missing line:

git clone https://gist.github.com/3676fb68081369dbffa1.git transmission-webui-installer

The missing line is due to a plugin (I am looking into the issue).

Reply
CRAIG FORD August 11, 2014 - 10:31 pm

When I made it to this line
sudo chmod -R 770 /etc/transmission-daemon/settings.json
I ended up getting this message
chmod: cannot operate on dangling symlink ‘/etc/transmission-daemon/settings.json’

I’m on Ubuntu 14.04 and copy/pasted everything (so as to not mistype) through putty. Any thoughts?

Reply
Lee Ennis October 26, 2014 - 12:14 am

Did you ever find a solution for this problem? I’m having the same one.

Reply
Ryan November 15, 2014 - 8:18 pm

anyone get an answer to this yet?

Reply
Martin March 27, 2016 - 10:46 am

This is where I’m stuck as well.

Reply
Η ιστορία της αναβάθμισης του HTPC σε XBMC 13 « Adreas.K August 19, 2014 - 12:24 pm

[…] για το transmission (as a service) εδώ και για το couchpotato […]

Reply
Zot September 5, 2014 - 11:49 am

Clear & useful, thanks !

Reply
ubunter September 25, 2014 - 8:39 am

User/Pass encryption does not work. I can easily enter transmission without logging in.
After system reboot all setting in settings.json are default again.
Any ideas ?

Reply
Alongxp October 9, 2014 - 4:20 am

hi,
i has succeed in installing the webui, and i’ve download a file. the question is, is there any way to download the file from transmission webui directly to my local computer, without using sftp or scp or transmission GUI software?

Reply
Felix Brändli January 13, 2015 - 1:02 pm

Thanks a lot for the nice tutorial. I have to say that i’m really new to linux.
You describe under point Step 3: Configure Users and Permissions to add a new user, with a link to Safely change primary group of a user in Linux.
From this i was thinking, that i just have to make an new user, so i did with “sudo adduser xy”. Then i went on with your tutrioal and gave like u described all the permission to that user.
Now at the end of the tutorial, i cannot find code, on how to start from that user. Everything works finde, if i run it with “sudo and my main user”, but with the new created user i didn.t worked. So i added to the new created user “xy” the group “sudo”. I don’t know if thats the correct way, to have it more secure?
my question. Whats the correct way to build that new user?
and whats the correct way to launch/start “transmission-daemon” under that user.
thanks a lot
best regards
Felix

Reply
Anand January 13, 2015 - 4:30 pm

Felix, I recommend that you use my AtoMiC script which automates everything: https://www.smarthomebeginner.com/atomic-transmission-webui-install-script/

It is bit time consuming to explain everything. Also you do not have to create a new user. Use the script (ideally on fresh Ubuntu) and it will care of everything for you.

Reply
Ken January 21, 2015 - 10:27 pm

Using version 2.84-0ubuntu0.14.04.1 of transmission-daemon.
I could not get the port-change working with a symlinked settings.json mapped to my home directory.
Everything seemed fine, and I could force-reload those settings, but after a reboot it just would load the default settings for some strange reason, thus the rtc was staying available/starting on the 9091 port…
Permissions were fine…

I have removed the symlink and used a real file instead, like intended upon install.
I still can’t get my head around why the init.d would load the daemon on the original port…
There were no permission errors in syslog either.

Oh well. It works ^^

Reply
ehhh March 16, 2015 - 12:23 am

why would you make settings.json executable?!

Reply
Anand March 16, 2015 - 8:59 am

No it is not required. I just have not gotten around to fixing it. My focus on has been on a new project that I am working on.

Reply
Ian March 27, 2015 - 6:09 pm

Thanks for the guide above, everything works great. The only thing I’ve noticed is that everyone I boot up the PC, although transmission starts, the web UI is unreachable op IP:custom port until I reload transmission again. Have I missed something or do I have to work a reload into the system startup script?

My intention is the pc will run most of the time so shouldn’t be an issue but just wondered about a fix.

Reply
Anand March 28, 2015 - 7:16 am

Ian, It could be a permissions issue. I am developing an automatic installer for transmission. May be you could beta test it for me?

If interested, send me an email using the Contact form https://www.smarthomebeginner.com/about/contact/

Reply
MarkDk2 April 6, 2015 - 7:05 am

Having the same issue I just reload and all is good and since this media server rarely turns off it ls not that big of a problem I just have to remember to reload after reboot. A solution as to why this happens would be nice.

Reply
Anand April 6, 2015 - 11:51 am

Please try the AtoMiC ToolKit. I believe it should solve your issues.

AtoMiC ToolKit – Automate your Media Center

Reply
rtochip September 22, 2015 - 7:02 pm

I also had the problem of not being able to access through the web(apache) from another computer without “reloading” the service after bootup. I edited the init file (/etc/init/transmission-daemon.conf) and added sleep 15 just before exec line.

sleep 15
exec /usr/bin/transmission-daemon -f $OPTIONS

There is a bug that transmission tries to setup before the network is setup thus you cannot access. This way transmission is delayed 15seconds enough for the network to be up and running before transmission is started.

Reply
Joe mont August 1, 2015 - 7:09 pm

Thanks to your guide I knew to avoid transmission, talk about a pain to setup a simple torrent application.

Reply
mrgrey1 November 20, 2015 - 5:00 am

Anyone trying this I advise to proceed with caution. I initially tried this guide and had problems with permissions. After mucking with it for sometime I discovered that the default transmission install creates ~/.config/transmission/* without the need to manually add it. In fact manually adding that file and the link was causing my problems as the permissions were messed up. So just ‘apt-get install transmission -y’. reboot then stop the service, ‘service transmission-daemon stop’, edit ~/.config/transmission-daemon/settings.json as desired and then ‘service transmission-daemon start’… all done. Debian 8.

Reply
Anand November 20, 2015 - 3:41 pm

If you install transmission GUI with webui then everything will be autoconfigured correctly. Installing just the webui is a bit trickier. I am in the process of updating this guide.

Reply
Jonathon Sunshine June 7, 2016 - 1:00 am

I’m sorry, but in this guide, does USER refer to MY useraccount, IE “jonathon” or the account transmission runs under?

Reply
Anand June 7, 2016 - 9:19 am

Your account name. We are making transmission download files to Downloads folder under your home directory.

Reply
Mehdi F August 30, 2017 - 7:59 am

mkdir /home/user/.config/transmission-daemon
should be
mkdir -p /home/user/.config/transmission-daemon

and you should add then cd /home/user/.config/transmission-daemon

Reply

Leave a Comment