1. Home
  2. Linux
  3. Set up transmission bittorrent server on linux

How To Set Up A Transmission Bittorrent Server On Linux

Downloading torrents on the Linux desktop is helpful in a pinch, but those looking to download a lot more data should consider setting up a remote torrent system on a server instead. In this tutorial, we’ll be focusing on setting up a remote system with Transmission, as it is the easiest to set up. The Transmission BitTorrent client is quite popular on desktop Linux and often comes pre-installed. However, as we are focusing on Linux servers and not personal computers, the Transmission software isn’t included and will need to be set up manually.

Install Transmission BitTorrent

Note: this tutorial primarily focuses on server operating systems. However, it is possible to use Transmission remote on desktop Linux operating systems too. Feel free to follow along as the instructions are similar (if not the same).

Ubuntu Server

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

Debian Server

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

RedHat Enterprise Linux server 6 and 7/CentOS 6 and 7

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

yum -y update

yum -y install transmission transmission-daemon

or

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 

subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"

yum -y update

yum -y install transmission transmission-daemon

Other Linux Server Operating Systems

Most Linux distributions (including server ones) will have the correct Transmission packages needed to run a torrent server. To install them open up a terminal window and search for “transmission”, “transmission-daemon”, etc. Additionally, check your operating system’s Wiki pages for any guidance on running a torrent server with Transmission.

It may also be a good idea to check the official website for the software to learn how to install the software in the event that your operating system doesn’t officially support it.

Configure Transmission BitTorrent

Installing Transmission on Ubuntu or Debian server should automatically enable the systemd services and start them up. Using Rhel or CentOS? You’ll need to start the services manually. Open up a terminal shell and gain root access by logging in via Su or using sudo.

su

Then, run the commands below.

Rhel 6/CentOS 6

service transmission-daemon start

Stop the daemon at any time with:

service transmission-daemon stop

Rhel 7/CentOS 7

systemctl enable transmission-daemon

systemctl start transmission-daemon

Stop Transmission Daemon with a systemctl stop.

systemctl stop transmission-daemon

Now that the service is running, it’s time change the default password. Changing the password is critical because leaving it with the default settings means that anyone on the network can access your Transmission UI.

Start off by using the systemctl or service command to stop Transmission Daemon. DON’T SKIP THIS STEP! If you do, Transmission will refuse to save any changes you make.

sudo systemctl stop transmission-daemon

or

sudo service transmission-daemon stop

To ensure that it’s safe, edit the settings file with the Nano text editor.

sudo nano /var/lib/transmission-daemon/info/settings.json

Find “rpc-password”: and change the text in quotes next to it to your desired password.

It’s also a good idea to change the default username from transmission to something else. Find rpc-username and change “transmission” to another username. Be sure not to erase the quotes.

Lastly, use the usermod tool to add your user to the Transmission group. It’s a good idea to do this so that any files downloaded with Transmission can be accessible by your user. Additionally, it’s safer going this route, because running things as root is a bad idea and you should avoid it wherever possible.

Add your user to the group with the following command. Be sure to change “owner” to the default username on the server.

sudo usermod -a -G debian-transmission owner

Whitelisting

Transmission is now configured correctly. When it starts up, users will be able to access it via the web. Unfortunately, if any user on LAN tries to access it, they’ll get a 403 error. This is because of the rpc-whitelist security feature. It disables access to the service if specific IP addresses are not listed. To get around this, users usually disable it. In this guide, we won’t disable the rpc-whitelist feature, as it’s a great tool. Instead, we’ll set up a whitelist so that every user connected to LAN can access Transmission.

To edit the whitelist, open up the Transmission Daemon settings file.

sudo nano /var/lib/transmission-daemon/info/settings.json

Scroll down and look for “rpc-whitelist”. 

After 127.0.0.1 add:

,192.168.*.*"

When everything is written out, the whitelist should look like the example below.

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

Blocklist

Lots of people that download torrent files online use what’s known as a block list. Lists like these deny malicious IP addresses (like known virus/malware addresses, etc) from connecting over torrent. To enable this blacklist, open up the settings file and find “blocklist-url”:.

Change https://www.example.com/blocklist in the quotes to a link to a real blocklist. In this example, we’ll use this one.

When all modifications to the Transmission app are complete, use the systemctl or service commands to start it back up again.

sudo systemctl start transmission-daemon

or

service transmission-daemon start

Using Transmission

Transmission is ready to use! To start downloading, open up a web browser and enter the following IP address into a web browser. As long as your PC is connected to the same network as Transmission and the server, everything should work!

http://server-ip-or-hostname:9091

4 Comments

  1. Looking at your instructions, your final command has https, upon install there is no https, could you tell me if I missed a step?

    • It is a URL, and not a command. However, it was supposed to be HTTP and not HTTPS so it has been updated.

  2. Wow. Definitely not something that can be done by someone who’s new to Ubuntu, like I am. I was hoping to move from Windows/uTorrent to Ubuntu. I can’t even figure out how to share a torrent in Transmission that I already downloaded in Windows, even though I can see the .torrent file and data folder/files.

  3. Good morning dear friend, I would like to have a p2p streeming server, if you can help me I would be grateful. please