Home » Home Server » Transmission Apache proxy setup

Transmission Apache proxy setup

Transmission Apache Proxy

written by Anand November 9, 2011

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. In this post, I will explain how to setup server running Ubuntu 12.04 with Transmission Apache proxy. Technically it is a reverse proxy, that allows you to access transmission web interface without the use of port numbers. I used deluge for 3 years before switching recently to Transmission and I should say that I am impressed. It can be run headless with a great looking transmission web interface. Please follow my previous post on how to install Transmission torrent client, prior to setting up Transmission Apache proxy. 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.

Transmission Apache Proxy

Transmission Apache ProxyTransmission daemon by default works on port 9091. Transmission webui default username and password is transmission.

I usually like to not have anything work on its default port for security reasons. But anyway, to access the web interfaces using port numbers (eg. http://myserver.com:9091) is cumbersome. I like to create Transmission Apache proxy for easier access (eg. http://myserver.com/transmission). Below is a description of how to achieve this on Ubuntu Server.

3 Best Standalone Bittorrent Downloaders

Don’t want to mess with servers? Check these out:

  1. Synology DiskStation 2-Bay (Diskless) DS212 (Black) with Bittorrent Downloader
  2. Synology DiskStation 2-Bay (Diskless) DS212j (White) with Bittorrent Downloader
  3. Buffalo Technology LinkStation Pro 2 TB High Performance (Black)

First enable the proxy modules in Apache:

sudo a2enmod proxy
sudo a2enmod proxy_http
sudo /etc/init.d/apache2 restart

Then you will have to edit /etc/apache2/mods-available/proxy.conf file. But before that backup your proxy.conf file:

cd /etc/apache2/mods-available
sudo mv proxy.conf proxy.conf.default

Now create a new file called proxy.conf using your favorite text editor and add the following lines to it:

<ifmodule mod_proxy.c>
  #turning ProxyRequests on and allowing proxying from all may allow
  #spammers to use your proxy to send email.

  ProxyRequests Off
  <proxy *>
    AddDefaultCharset off
    Order Allow,Deny
    Allow from all
  </proxy>

  ProxyPass /transmission http://localhost:9091/transmission
  ProxyPassReverse /transmission http://localhost:9091/transmission
  # Line below is optional
  Redirect permanent /transmission https://myserver.com/transmission/web/

  # Enable/disable the handling of HTTP/1.1 "Via:" headers.
  # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
  # Set to one of: Off | On | Full | Block

  ProxyVia On
</ifmodule>

The ProxyPass and ReverseProxyPass lines create an Transmission Apache proxy (actually a reverse proxy). The redirect statement (optional) permanently redirects http connections to https connections for security. Then save the file, close it, and restart Apache:

sudo /etc/init.d/apache2 restart

Transmission Web Interface

Now you should be able to access transmission web interface using http://myserver.com/transmission.

Transmission Web Interface

Transmission Web Interface

If you have DHCP server, you may have forwarded the port (9091) to the computer on which transmission daemon is running. You may now disable this cutting access to the transmission daemon using the port. However, there is a disadvantage to doing this. You will not be able to use transmission clients on other computers or phones (eg. transmission-remote-dotnet or Transdroid) to connect and control your transmission daemon. So the decision to forward the port is up to you.

Recommended For You:

There you have it. Setup Transmission Apache proxy and enjoy the easier access to the transmission web interface.

IPVanish VPN Exclusive 20% Off - only $5.19/month:
VPN Guides
Windows, Android, Ubuntu
Kodi OpenVPN
OSMC on RPi
♦ Hide your browsing (no logs), Anonymize Streaming and Downloads
♦ Circumvent Geo/Country Restrictions and access worldwide content
♦ Works on Windows, Mac, Linux, Android, iOS, Router, and more
♦ Money back guarantee - Sign Up Now
Super Hot deal for National Cybersecurity Awareness Month. 2-years premium VPN from IPVanish for $99 (only $4.12 per month)

Related Articles

13 comments

Fight9 July 11, 2012 - 3:14 am

Where you wrote “cd /etc/apache2/sites-available”, I think you meant “mods-available”.

Great guide regardless. You helped me set up remote access to the web interface for machine that connects through a VPN to download. I ran the proxy through my server to local machine with transmission. Without the proxy, I was unable to connect remotely due to the VPN.

Thank you.

Reply
Anand July 11, 2012 - 7:09 am

Great! Glad it helped.

Good catch. I have changed “sites-available” to “mods-available”.

Reply
Lino November 11, 2012 - 8:59 am

Hi and thanks for this nice tutorial.

I want to use the apache proxy method described in this post for Webmin.
I have install Webmin, and I modified the file proxy.conf. I put in the file the same instructions for transmission custom for webmin.

My proxy.conf file is:

ProxyPass /transmission http://localhost:9091/transmission
ProxyPassReverse /transmission http://localhost:9091/transmission

ProxyPass /webmin http://localhost:10000
ProxyPassReverse /webmin http://localhost:10000

# Line below is optional
Redirect permanent /transmission https://localhost.com/transmission/web/

Redirect permanent /webmin https://localhost.com/webmin/

But this not work. Please can you help me to make the same proxy metod for Webmin?
thanks you

Reply
Anand November 16, 2012 - 9:45 am

Hi Lino,
Sorry for the late reply. The above instructions will not work for Webmin. Webmin runs its own version (a mini version) of a webserver. As far as I know, you cannot run Webmin within Apache webserver proxy. I tried to do this few months back with no success. I am in the same situation as you are. I hope other readers have ideas that help both of us. Good luck!

Reply
geekman92 April 24, 2013 - 2:26 pm

Hey, I have to questions with the line to redirect http to https:

Redirect permanent /transmission https://myserver.com/transmission/web/

1) what do you mean by myserver.com? can you just use localhost? like before?

2) I have tried with localhost and my server’s web address (e.g. xxxxxx.no-ip.org) but neither seem to redirect my http requests to https

Thanks

Reply
Anand April 29, 2013 - 8:44 am

geekman92, sorry for the delay in responding.

1) You are correct, you could use localhost.
2) I am not sure what is going on in your case. I have it exactly that way on my server and it redirects well. Is your SSL setup and working well?

Reply
Ben December 13, 2013 - 9:24 am

Thank you very much for this guide. I am a Apache2 beginner and I just have two remaining question. Can the lines:

ProxyRequests Off

AddDefaultCharset off
Order Allow,Deny
Allow from all

be omitted? (Isn’t it the default configuration?)

What does mean “ProxyVia On” exactly ? Why is it turned on in this case?

Thank you for any help you can provide.

Reply
DrPepper March 25, 2014 - 4:29 am

Hi,

Great, the only crystal clear setup howto that I found working ‘out-of-the-box’ !!!

Thanks

Reply
Anand March 25, 2014 - 9:34 am

Thanks! Glad it worked for you.

Reply
PC Hulp Joost September 20, 2014 - 11:12 am

Thank you! After a long search, your solution worked!

Reply
Talat February 17, 2015 - 4:33 pm

Hello,

I have two transmission instances on port 9091 and 9092 and they are running ok. I can access them in local network with port numbers. And i did set up reverse proxy for both.. Now i can access transmission on 9091 but cant do same with running on 9092. When i type my server ip /second it redirects me to instance running port 9091.
How could i set up a reverse proxy for two transmission daemon running same time.

# First instance
ProxyPass /transmission http://localhost:9091/transmission
ProxyPassReverse /transmission http://localhost:9091/transmission

#Second Instance
ProxyPass /second http://localhost:9092/transmission
ProxyPassReverse /second http://localhost:9092/transmission

Reply
TimmyC June 30, 2015 - 9:07 pm

The easiest way around this would be to update your ‘settings.json’ file for your second transmission instance. Change the ‘rpc-url’ directive to match the directory you are proxying from (in your case ‘second’

Reply
Federico Ponzi March 11, 2015 - 4:56 am

Hi,
How to do this using lighttpd?
Thanks

Reply

Leave a Comment