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.
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)
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 http://heanet.dl.sourceforge.net/sourceforge/ \
phpmyadmin/phpMyAdmin-2.11.4-all-languages-utf-8-only.tar.gz
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 config.sample.inc.php under config.inc.php and edit the file.
cp config.sample.inc.php config.inc.php
nano config.inc.php
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:
wget http://www.torrentflux.com/torrentflux_2.3.tar.gz
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.
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.
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 9. List of files in the directory of tf user
More information on TorrentFlux:
- Official TF site
- LinuxTracker.org — a tracker with enormous amounts of various Linux distro torrents
- Official phpMyAdmin website
Warning: include_once(/sites/polishlinux.org/wp-content/themes/jakilinuxorg/google_article_inside.php): failed to open stream: No such file or directory in /sites/polishlinux.org/wp-content/themes/jakilinuxorg/single.php on line 48
Warning: include_once(): Failed opening '/sites/polishlinux.org/wp-content/themes/jakilinuxorg/google_article_inside.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /sites/polishlinux.org/wp-content/themes/jakilinuxorg/single.php on line 48
Subscribe to RSS feed for this article!
11 Comments
- A hyperlink: <a href="polishlinux.org">GNU/Linux for everyone!</a>,
- Strong text: <strong>Strong text</strong>,
- Italic text: <em>italic text</em>,
- Strike: <strike>
strike</strike>, - Code: <code>
printf("hello world");</code>, - Block quote: <blockquote>Block quote</blockquote>














Great article, Olivia. Hope to get a second part about using Torrentflux and advanced options!
I used TorrentFlux for about a year and I agree that it’s a great program. However I noticed that a lot of the newer torrents don’t work so well with BitComet. I believe that’s the backend used to actually do the dirty work of downloading the torrent. I moved over to TorrentVolve which is ran off of Azureus and all has been well. It lacks the configuration options that TorrentFlux has but I’ve not had an issue with not being able to download since.
You may find this small howto I wrote useful. It explains how to setup ipblock in a headless manner for a torrentflux server.
http://www.the-little-things.net/blog/?p=9
cheers!
Zach
I’ve been using TorrentFlux for a couple of weeks now. Pretty sweet. And the FireFox add in so you can right-click on a torrent link and add it into your TorrentFlux is great also.
One problem I’ve noticed so far is that you can’t browse/delete directories (created by torrent downloads) that contain some special characters. So then I’m forced to go in by hand to remove those. Also, it would be nice if other users, non-admins, were restricted in what they can see. For instance a non-user can see all history and downloads, there’s no level of separation there.
But so far I’m finding it pretty sweet. Another use for my fileserver, and to offload these tasks off of my Windows box using bitcomet.
I have tried TorrentFlux but i prefer B4rt’s version located at http://tf-b4rt.berlios.de/
b4rt just rocks
Hi Olivia
Thank you for this howto.
I’ve been trying for the last couple of days to get this thing installed in Ubuntu 7.10 but can’t get past a certain point.
I hope you can help me.
OK, I’ve gotten the database created and the import of the torrent-flux.sql has been successful.
Then I’ve done the editing of the config.php file but I’m not sure if the values I inputted are correct are not. What would help would be if your “Figure 5. Editing config.php” contained your entries after editing rather than what was there originally. This would give me some clues as to how my entries should look.
Now, here’s where I really got stuck.
When you say “We go to the address where TF is supposed to be” I’m lost.
Does TF refer to your database or to TorrentFlux?
I can quite easily go to where my database is, but no login page appears.
Perhaps you could give me some clues as to where this address might be.
Sorry for the newbie questions but I really am trying.
Thanks
Paul
Contact with me:
olivia1990@gmail.com
Are those screenshots from Gnome? What theme is that? It looks great.
No. They are from Leopard.
torrentflux is badly unmantained, using it might pose security problems.
There is a fork in beta, but clutch is the project to look at.
Writing guides should be done only when you really have the right knowledges, since some newbie is going to cut and paste anything he sees on the web.
Why don’t you check out clutch and write something about that, so that it is usable in 2008?
I’m gone to convey my little brother, that he should also pay a visit this website on regular basis to take updated from latest information.