How To Install TorrentFlux On Ubuntu 20.04 LTS

How To Install TorrentFlux On Ubuntu 20.04 LTS

If you download regularly and need to access the downloads from anywhere on the internet, TorrentFlux has been designed for you. Torrentflux is an open-source bit-torrent application. In this article, you will learn How To Install TorrentFlux On Ubuntu 20.04 LTS. Primarily developed for Unix-like systems such as GNU and Linux, TorrentFlux is a web interface that is written in the PHP language. It can also view the download progress of all torrents at a glance. You should not choose it to install on your workstation computer because it requires a web server running on the computer for permanent operation purposes. Prepare your own Linux VPS to start installing and using this software.

Tutorial Install TorrentFlux On Ubuntu 20.04

To let this tutorial work better, please consider the below Prerequisites:

A non-root user with sudo privileges.

To set up, follow our Initial server setup on Ubuntu 20.04.

Some packages should be installed such as apache2, php5, php5-mysql, php5-curl, mysql-server.

But if you have installed the LAMP (Linux, Apache, MySQL, PHP) server installed, you just need to install the php5-curl package should be installed.

Recommended Article: How To Configure BeEF On Ubuntu 20.04 LTS

Install TorrentFlux On Ubuntu 20.04

Although it passed a downtime for a long time, was available again in November 2007. As we mentioned, Torrentflux does not run directly on your own computer and you should prepare a server and several clients can access the server at the same time. You can access Torrentflux remotely from anywhere with any conventional browser. While Torrentflux is able to maintain separate directories for everyone, it is helpful in a multi-user environment. Let’s see what is the installation path.

Step 1:

As always, you will start by updating your server to consider the security.

apt-get update
apt-get upgrade

Step 2:

In spite of the added repository to Torrentflux, you can go to the Synaptic package manager and install it.

sudo aptitude install torrentflux

Step 3:

If you have not installed the LAMP stack, you can just install the packages of apache2, php5, and mysql-server. It is possible by Synaptic (Ubuntu) or Adept (Kubuntu) or if you prefer to run the command-line:

sudo aptitude install apache2
sudo aptitude install php5
sudo aptitude install mysql-server
sudo aptitude install php5-mysql

You can check if PHP is working properly or not by creating a simple test page. For example create  file:

sudo nano /var/www/test.php

And put in the below text:

<html>  <head>  <title>Test Page</title>  </head>  <body>  Test page<br />  <?php   echo 'If you can see this text, then PHP is working.';  ?>  </body>  </html>

Step 4:

For security considerations, you should set a password for MySQL since it starts with no one.

mysqladmin -uroot password 'new-password'
Recommended Article: How To Install TorrentFlux On Ubuntu 20.04 LTS

Step 5:

You may face a common stumbling block in getting a LAMP stack fully functional is when port 80 is blocked. ISP or your router’s firewall may have blocked this. You can easily test if you are blocked or not. First, find out your external IP address in a visiting site.

Also, if you have a router you can log into it and open up port 80 by finding your IP address. To do this, run the following command:


Attention to find the ”int addr: This is your internet IP address that is usually in the first block of output, marked ”eth0”. Enter your router username and password to get access to the admin page and find the documentation for your specific router. When you are logged in, find a section marked ”Application & Gaming” or ”Port Forwarding” etc. Now, set up a new rule along the below lines:

name: http  port start: 80  port end: 80  type (TCP/UDP/Both): Both  Forward to:  Enabled: Yes

Note: Remember to replace the ”” in the above example with your current internal IP address. To let the changes take effect do not neglect to restart the router. And again test by visiting your *external* IP address.

In case the above did not work, it means that port 80 is being blocked by your ISP. What should be done? Use a non-standard port. First, edit the configuration for your webserver to do this.

sudo nano /etc/apache2/apache2.conf

Then, add the below line:

Listen 8080

Since the ”8080” port is a non-standard port, you can choose any other one but greater than 1024. To let the changes affect, restart apache.

sudo /etc/init.d/apache2 restart

Now, you should modify your router to allow port 8080 to be forwarded to your computer as you learned recently. And again test your webserver. If you got to your apache page and faced it is not working, go back over the steps and recheck your path. The router may not support port-forwarding, you can ”flash the firmware” on your router to fix the problem.

Step 6:
To download Torrentflux, go to its website. The files are hosted by SourceForge.
Untar the file after downloading.

tar -xvzf torrentflux_2.1.tar.gz

Find the file ”INSTALL” inside the ”torrwntflux_2.1/” directory. It contains the instruction of what you should do in the following in detail.

Step 7:

it is time to copy files to install Torrentflux. Since it is simply a bunch of PHP files, you just need to copy them into your web-folder to let them work:

sudo mkdir /var/www/torrentflux/
sudo chown user:user /var/www/torrentflux/
cd ~/Desktop/torrentflux_2.1/html/
cp -r * /var/www/torrentflux/

While the name of the user is usually the same or the name you log in with, Put your username and group instead of the user: user. The ”cd” in the above command will vary due to the location you untared the files. Also, you need MySQL setup probably. to create a database for Torrentflux, run:

mysqladmin -uroot -p create torrentflux

Previously you set up a password for MySQL, use it to log in, and go into the ”sql” sub-directory in Torrentflux.

cd ~/Desktop/torrentflux_2.1/sql

Then, upload the Torrentflux structure to MySQL:

mysql -uroot -p torrentflux < mysql_torrentflux.sql

In case you do not prefer to use MySQL on the command-line, install ”phpmyadmin” to help you access the web-browser and all of the functionality in MySQL easily. Next, tell Torrentflux the password you set for your MySQL system. Edit the file by running:

sudo nano /var/www/torrentflux/config.php

You will see the lines near the top of the file:

cfg["db_user"] = "root"; // username for your MySQL database  cfg["db_pass"] = ""; // password for database

Modify the ”db_pass” line with the password you selected before.

To consider more security and control, you can give Torrentflux a ”non-root” MySQL access. If you have a lot of different applications all using MySQL, do not neglect to do this. Use ”phpmyadmin” or enter the following commands one at the same.

mysql -uroot -p  mysql> use mysql;  mysql> INSERT INTO user (Host,User,Password) VALUES('localhost','torfluxuser',PASSWORD('secret'));  mysql> FLUSH PRIVILEGES;  mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON torrentflux.* TO 'torfluxuser'@'localhost';  mysql> exit;

Try to use a better password instead of ‘secret’. To edit the Torrentflux configuration, type:

sudo nano /var/www/torrentflux/config.php

And to update the lines:

cfg["db_user"] = "torfluxuser"; // username for your MySQL database cfg["db_pass"] = "secret"; // password for database

You can call your Torrentflux user whatever you wish, and test the password to whatever you like. The entry in MySQL and in Torrentflux should match. Now, you should be able to open the Torrentflux website using a web browser.

The username and password you supply during the first login will be the ”administration account” for Torrentflux. Remember the password carefully. You are not forced to choose the same one with the password of MySQL you already created.

Then, you will be directed to a page where you would be able to configure Torrentflux. The first line will be marked with an error: ”path is not writable — make sure you chmode +w this path”. So, you should change the permissions on the download fold.

sudo chmod 777 /var/www/torrentflux/downloads/

While checking the rest of the settings, please consider that ”Port Range” is an important parameter for efficient bit-torrent. Pick some range, for example, 45000-46000, and open up the corresponding range on your router. In this way, you can connect to a larger swarm during downloading when you allow connections on that range and finally you would experience a higher download speed.

Learn Install TorrentFlux On Ubuntu 20.04 LTS

Step 8:

You can skip this step if you have a static IP address. Home users usually have a dynamic IP and they would change it every so often or even every day or even a couple of months depending on their ISP. You will not know what IP address to go to when you want to connect to your Torrentflux remotely. So, a suitable solution is to use a ”domain redirect” service. This service is able to get you to your machine easily as it can remember the alias, like ””. However, there are programs that can update your domain redirect automatically to help you have the IP updated.

Here are two companies that offer free domain redirection services:

While the real problem with a dynamic IP is that it changes without notice, No-IP provides a piece of software. You can go to the ”Download” section and select ”Linux/BSD/Unix.

Again you should untar the file, and enter the new directory.

tar -xvzf noip-duc-linux.tar.gz
cd noip-2.1.3/

In case you are running a standard desktop PC like ”i686 machine”, then do this:

cp binaries/noip2-Linux noip2
sudo make install

Using the email/password of the noip account, answer the questions. The update time could be about 30 minutes. Compile the program if you are running an i686 machine. If you do not have any compiler, use the command below to install:

sudo aptitude install build-essential

And if you are in the ”noip2-2.1.3/” direction, compile by running:

sudo make install

Run noip by typing:

sudo noip2

You can edit the file ”rc.local” in the ”/etc/” directory to ensure that noip starts every time the computer boots.

sudo nano /etc/rc.local

Then, add a line:

/usr/local/bin/noip2 &

Attention to put this line *before* the ”exit 0” line at the end. Once the computer is turned on, noip will be running and will update your domain name frequently. In this way, when you go to ”” you would get to your own personal Torrentflux application.

Step 9:

Centralizing your torrent searching is another neat feature of Torrentflux. By adding modules to Torrentflux, you can enable it to use the search facilities on a number of different trackers.

You can add a new module by downloading the file, and move it into the ”searchEngines” folder:

mv module.php /var/www/searchEngines/

How to uninstall Torrentflux

To uninstall/remove Torrentflux, run the command below:

sudo apt-get remove torrentflux

Use the following command to remove the Torrentflux package along with its dependencies:

sudo apt-get remove --auto-remove torrentflux

And if you need to remove all configurations files and data, type the command below carefully:

sudo apt-get purge torrentflux

Also, the following command can do the same as the above

sudo apt-get purge --auto-remove torrentflux

Do not forget to use the above commands with care, because they will remove all configuration files and data associated with the Torrentflux package and the deleted data never could be recovered.



In this article, you learned How To Install TorrentFlux On Ubuntu 20.04 LTS. It will manage all of your BitTorrent downloads from anywhere through a convenient web interface.

How useful was this post?

Click on a star to rate it!

Average rating 1 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

View More Posts
Marilyn Bisson
Content Writer
Eldernode Writer
We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave a Reply

Your email address will not be published. Required fields are marked *

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way


7 days a week, 24 hours a day