view · edit · print · history

TorrentFlux (official site) is an web-based system for managing bit torrent file transfers. This page describes the port of TorrentFlux for Optware platforms.

The web application is written in PHP and uses a modified version of BitTornado (a Python application) as a torrent client.


If you want to install it, just update the list of packages available for ipkg and then install it:

ipkg update
ipkg install torrentflux

When you install TorrentFlux, ipkg will take care of the appropriate dependencies, which include PHP, Python and SQLite.

Web Server

TorrentFlux is an web application, so you will also need a working web server with PHP support. So far, it has only been tested with lighttpd, a simple, fast web server well suited for small appliances like the NSLU2 and other Optware targets. You can install lighttpd using:

ipkg install lighttpd

If you have lighttpd installed, you can access TorrentFlux at http://nas_address:8081/torrentflux. Otherwise, you will need to configure your web server to serve pages from the directory at /opt/share/www/torrentflux.

TorrentFlux should work with php-thttpd, too. A previous problem with file permissions, caused by the execute bit being set for all files, has been corrected since version 2.4-3.

PHP Settings

TorrentFlux may require some changes in PHP settings. Check your /opt/etc/php.ini file to make sure that these settings are in place:

  safe_mode = Off
  allow_url_fopen = On
  cgi.fix_pathinfo = 1

You will also need to configure the SQLite extension for PHP. Create a file named /opt/etc/php.d/sqlite.ini with these lines:


After your make these changes, you should restart your web server.

Other utilities

TorrentFlux needs nohup and a full version of ps in order to start and monitor running torrents. These utilities are not installed in a default Unslung setup. However, this dependency problem has been fixed since version 2.4-5, which will add packages coreutils and procps if they are not yet installed in your machine.

Differences from Standard Distribution

This package has some changes from the standard TorrentFlux distribution:

  • TorrentFlux uses a small database to store settings and history logs. The original distribution uses MySQL, but the Optware port uses SQLite and therefore does not need a separate database server. All functions that depend on the database, such as settings and event log, work flawlessly with SQLite, so the overall functionality remains the same.
  • The standard search engine modules shipped with TorrentFlux may have problems listing search results from some sites. This version includes patches for isoHunt and TorrentBox, along with a preset cookie for The Pirate Bay, in order to restore full functionality to these modules (if you want to add your own cookie for The Pirate Bay, please edit the existing one instead of creating another).
  • By default, TorrentFlux will instruct BitTornado to use only encrypted connections. In an NSLU2 or similar NAS device, the use of encryption demands a lot of CPU time, making all torrents to run very slow. It is recommended that you check the Settings page (under Admin) and keep 'Allow encrypted connections' and 'Only allow encrypted connections' set to false. These are the defaults since version 2.4-5, but if you have already installed TorrentFlux it is advised that you change these settings right now.


For a complete description of TorrentFlux and its features, please see the official site.

User Stories

Installed TorrentFlux on two units. Functioned perfectly with lighttpd installed (tried php-thttpd first but could not get the initial login to complete properly). Remember that your initial login sets the super admin username and password (see /opt/doc/torrentflux/INSTALL text file at step 4). Torrents sometimes take a very long time to get past the connecting to peers stage but eventually do. The displayed download rates appear off by a factor of 15 (multiply by 15 for true rate) and the upload rate by a factor of 4. Divide the estimated completion times by these same factors. Other than these annoyances TorrentFlux seems stable and very usable. Another option I've had excellent results is CTorrent (see SetupCTorrent and ConfigureEnhanced-ctorrentWithUnslung). -- SRS 09/21/2008

The problem with wrong upload and download rates under Unslung seems to be related to incorrect rates reported by the BitTornado client used by TorrentFlux. I believe this can be related to some problem with the version of Python or the underlying libraries available under Unslung, but my lack of Python expertise prevents me from getting a full diagnose of the problem. This problem, however, does not prevent the correct operation of TorrentFlux. -- fcarolo December 02, 2008, at 12:25 PM

view · edit · print · history · Last edited by fcarolo.
Based on work by fcarolo, SRS, and Marcelo Vianna.
Originally by fcarolo.
Page last modified on December 02, 2008, at 12:26 PM