Torrentflux — web-based BitTorrent client

[ Friday, 29 February 2008, Katarzyna Myrek ]

The Bittorrent network is becoming increasingly popular and perfectly legal. It allows to download the latest movies, music or, to say the least, almost every Linux distribution available.

Dragonia Magazine

Author: Katarzyna Myrek

TorrentFlux is a free bittorrent client, which requires a webserver for operation. During the last few months it has become popular, especially among users not fond of command line.
To install TF we need:

  • Any Linux distribution
  • Apache server with PHP support
  • MySQL client and server (phpMyAdmin for beginners)
  • Python (at least 2.2)

Figure 1. TorrentFlux 2.3 GUI

TorrentFlux installation

I will run my installation on a newly installed Debian system. In practice everything takes 10-15 minutes depending on the location from which our system downloads packages (this, of course, can be configured) – large hosting companies prepare dedicated internal repositories for their servers. Though sometimes they are – strangely enough – much slower and have older packages. Firstly we need to quickly install Apache2 server with PHP, MySQL and phpMyAdmin (for convenience).
To do it we run the following commands:

apt-get install apache2 apache2-doc \
  apache2-mpm-prefork apache2-utils libexpat1 ssl-cert

The above command installs Apache; to add PHP we run:

apt-get install libapache2-mod-php5 php5 \
  php5-common php5-curl php5-dev php5-gd php-pear php5-mcrypt

On Debian we install MySQL and phpMyAdmin in the following way:

apt-get install mysql-server mysql-common \
  mysql-client php5-mysql

Figure 2. Default web page after installing apache2

Now we add a new user to the MySQL server:

mysqladmin -u root password yourpasswordhere

And then:

cd /etc/apache2/sites-available/
nano default

And we comment out the entry RedirectMatch \^/\$ /apache2-default/. Then we press [Ctrl]+[X] and [Y] (or [T] depending on editor configuration) to save and exit. After all these it’s good to reload apache:

/etc/init.d/apache2 restart

If you get an error message about not being able to determine server domain, do not worry. TorrentFlux doesn’t require advanced configuration and, to be precise, doesn’t need a configured domain. If, however, you wish to have everything done perfectly, consult other articles on www server configuration, already published in the Internet. The latest version of phpMyAdmin during the writing of this article was 2.11.4-rc1. To begin installation we move to the directory where we keep install files to the web server data folder. I always keep them in /home/username. We run the following commands:

cd /home/olivia/
wget \
tar zxvf phpMyAdmin-2.11.4-all-languages-utf-8-only.tar.gz
cd phpMyAdmin-2.11.4-all-languages-utf-8-only
cp -R * /var/www/phpMyAdmin

Then we enter the directory where we copied our files, make a copy of under and edit the file.


In $cfg[’blowfish_secret’] = ’’;, between the apostrophes we enter any string of characters; to turn on logging by cookie we edit section Use for advanced features.

Figure 3. Editing configuration file for phpmyadmin

We save the file and now everything should be configured. PhpMyAdmin will be available under http://your_server_address/phpMyAdmin. Now we download TorrentFlux:


If we choose remote installation, we could also download a package to be able to send a database file to phpMyAdmin. After downloading the archive to the server we unpack it using:

tar -zxvf torrentflux_2.3.tar.gz

It’s high time we create a database for the application. We can do it in phpMyAdmin. We log in as root using the “yourpasswordhere” entered at an earlier stage. We create a database and import its structure – it’s located in the torrent-flux.sql file. Then we simply apply. If everything is added properly, we will see “Import successful, 50 queries executed” message (or something very similar).

Figure 4. Creating new database

Now we have to move TorrentFlux files and edit its configuration file to enable connection with database.

cd torrentflux_2.3/html/
cp -R * /var/www/
cd /var/www/
nano config.php

We edit relevant data and save changes.

Figure 5. Editing config.php

Now we can see the results of our work. We go to the address where TF is supposed to be and log in. We enter login and password we will be using in the future. New user will be automatically created with the status set to main admin.

Figure 6. Logging in

After logging in we will be moved to settings tab. Initially two fields may be marked with red light. One of them signifies wrong file permissions, the other – possibly – lack of Python. As a remedy we go back to the shell and type:

chmod -R 777 downloads

And in case we don’t have Python installed:

apt-get install python

Then we refresh the browser to see TorrentFlux.

Using TorrentFlux

Once installed, we can finally start using our decent BitTorrent client. The user interface is intuitive so you should not have any issues figuring out what to do. Below you can see some screenshots of TorrentFlux in action, from choosing the torrent file to locating the downloaded one on the disk.

Figure 7. Choosing a torrent

Figure 8. Running torrent

figure 9. List of files in the directory of tf user

More information on TorrentFlux:

About the Author

Katarzyna Myrek

Student at AGH Krakw

New AdTaily ads!

Are you a film buff?

film buffs community, movie recommendations and reviews

RSS: Comments

You can follow the comments to this article through a special channel RSS 2.0 .

Related articles: P2P

 more »

PolishLinux Top Content

Become our fan on Facebook! on Facebook

Follow PolishLinux on Twitter!

Follow polishlinux on Twitter

Google Ads