There are many torrent clients available that can be installed on a VPS and you can download files directly to your VPS and later transfer them to your local machine. In this tutorial, I will show you how to install the Transmission torrent client.
Transmission is a free and open-source torrent client with an easy graphic interface so you can add/remove the torrent from any web browser.
Why you may want to install a torrent client on a VPS rather than using a torrent client on your local machine:
- In most cases the bandwidth or the data available in your plan is limited. While downloading a torrent you use that data in both ways i.e. you upload content in addition to downloading. You end up using more data than what you have downloaded. VPSs come with a decent amount of bandwidth so it shouldn’t be a problem.
- The speed of download also depends on the speed of upload. In most cases, a VPS has a better download and upload speed than your local connection. So you get the file on your VPS quickly that can later be transferred to your machine with a download manager. Also, you will get more speed downloading from your VPS.
- You don’t have to keep your computer running for a long time if the download speed from the torrent is slow. With this setup, you start the download on your VPS and turn off your computer. The download will finish in the background. Later you can download at better speed to your local machine.
In this tutorial I am going to install transmission torrent client on ubuntu 16.04 VPS hosted on digitalocean (use this link to signup and you will get $10 to test with).
Steps to Install:
1. Add transmission repository:
Although transmission is available in ubuntu repository but adding transmission repository make it sure that you always have the latest and most secure transmission installed.
sudo add-apt-repository ppa:transmissionbt/ppa
Now update repositories by issuing this command
sudo apt-get update
2. Install transmission:
sudo apt-get install transmission-cli transmission-common transmission-daemon
This will install the transmission on your VPS and you can use it right away but a few other changes are must to make it more secure and function well.
3. Securing transmission:
There are few things to do to secure the transmission installation.
First, stop the transmission-daemon by issuing this command
sudo service transmission-daemon stop
3a. Change default username and password:
For now, the transmission is secured by default username and password and we need to change it. To do this we have to make some changes in /var/lib/transmission-daemon/info/settings.json file. Edit the settings.json file by using this command
sudo nano /var/lib/transmission-daemon/info/settings.json
This will open the file in nano.
Use arrow keys to locate these lines
"rpc-password": "{62b16db87b89a91dd49a5110a7cafc06d20eb4f2wtK6kqPj", "rpc-username": "transmission",
and change the values for username and password to your liking.
Don’t exit nano yet.
3b. Whitelist your IP address:
By default, you can access the transmission user interface via localhost only but we want to access it from your home computer as well so either you need to add your IP address to the whitelist or you can turn whitelist completely off. If your IP address keeps on changing then you will want to turn it off.
To add your IP address you simply need to add your IP address to this line separated with a comma(,). I have highlighted the part to be changed in red.
"rpc-whitelist": "127.0.0.1,192.168.52.45",
Or if you want to disable the whitelist completely locate this line with arrow keys
"rpc-whitelist-enabled":true,
change the true to false. This will disable the whitelist.
3c. Fixing permission issues:
Also, change the unmask parameter to make sure the permission to all folders is right.
Locate this line
"umask": 18,
and change the value 18 to 2
"umask": 2,
Your configuration file will look like this now. I have marked the lines with an arrow where you have changed. See I have disabled white list as I have a dynamic IP address.
4. Save configuration file:
To save the changes press shift+X keys
and then type Y and press enter.
5. Restart transmission:
Now start the transmission-daemon again
sudo service transmission-daemon start
Your transmission torrent client is ready to use now.
Accessing web interface
To access transmission web interface just make sure port 9091 is not blocked and enter visit this web address:
http://server-ip:9091
change the red part with your VPS’s IP address.
You will see a screen like this.
Use the username and password you set in step 3a to login.
You will now see a screen like this
To add a torrent you will need to upload a torrent file or enter a magnet URL of the torrent to start the download. For example, I am using a torrent file for ubuntu-desktop addition.
Click on the file with the green arrow box (labeled 1) at the top left corner and that will open this box
if you have a torrent file select it by clicking on the button saying “Choose Files” (labeled 2)
or if you have a magnet link you can enter it the box labeled 3.
Your files will be downloaded in the folder labeled as 5.
Now click the upload button(labeled 4) and your torrent download will start.
You will not see the right side window initially but if you double click on the torrent it will appear.
You can download the files using any FTP client to your local machine. I use Cyberduck on mac and WinSCP on windows. Both are free.
That’s it.
If you have any questions or suggestion please comment.