Installing TorrentFlux on a Linux Server in WinXP/Vista

July 07, 2008 by sharky

Are TorrentFlux Seedbox reseller hosts getting you down? If you want total control over TorrentFlux and your torrents, you’ll need to purchase your own server and install TF yourself. In most cases, it’ll be cheaper anyways, and you’ll be free to share the cost with any number of users (think: resell accounts to your friends). This tutorial is aimed towards WinXP/Vista users who wish to run a TF seedbox through a Linux server. Knowledge of the Linux OS is not required.

What You’ll Need:

There are a variety of combinations in which TorrentFlux can be installed on a Linux server - we couldn’t possibly cover all the known configurations. The most popular (and common) are servers that incorporate cPanel/Apache, MySQL and PHP v4.3 (or higher). The majority of hosts will already support these, although it’s a good idea to ask first. Look for these symbols:

— Choose a torrent-compatible seedbox host from this list.

— TorrentFlux v2.4 or TorrentFlux-b4rt (b4rt is recommended, and used throughout this tutorial).

— Assuming you’re running XP/Vista on your home computer, you’ll also need FTP access to your server (which you can set up in cPanel), and an FTP program.

Getting Started

It would be assumed that you have already signed up for a Linux server (and have web access to it - the URL and login details should have been sent to you). The first thing you’ll need to do is add an FTP account on your server - most likely this is not done by default. Check the email account confirmation to see if it mentions anything about FTP - it may give you login details. Not only is FTP mandatory for uploading files to your server, but you’ll need to do it to access your finished torrents via FTP downloading.

Setting up FTP Access

If your seedbox is at http://myseedbox.com, type in /cpanel after the URL in the browser window:

http://myseedbox.com/cpanel

Login to your server with the given username/password supplied by the host. A screen similar to this will be shown:

You should now see your cPanel main screen, similar to this:

Click on the icon that says FTP Manager (or similar) - see above. You’ll now be brought into the options for your FTP Manager. Click on the "FTP Accounts" option:

In the next screen you’ll be able to add an FTP account to your server. Look for a link that says "Add FTP Account". Here, enter a Login name (username) and password. Click on "Create" and click "Go Back". Your FTP account should have now been correctly set up.

Read the new info - it will likely tell you the FTP address of your new FTP account. Thus, if your seedbox is at http://myseedbox.com, your FTP access will be:

ftp://ftp.myseedbox.com

You’ll need an FTP client to access your server - FileZilla is a free option. You can also use the FireFTP add-on through your Firefox browser, as well.

Uploading TorrentFlux via FTP

NOTE: There are two methods to install TorrentFlux-b4rt, but in either case you’ll need to upload the files found in the /html directory from torrentflux-b4rt_1.0-beta2.tar.bz2 found here. Use UnRAR or 7-Zip and extract to a temp directory, and via FTP, upload the files found in the /html directory to the root of your server (i.e. for this example we’ll use /public_html/ as the root). Don’t just upload the actual /html folder, you’ll need to go into it, select all files and folders and upload it that way to your root. Here’s an example of what the FTP window should look like:

IMPORTANT: After uploading all the files (it should take quite some time, perhaps 15-30 minutes), you’ll need to go into the "/inc/config" directory and make /config ‘writable’. To do this, browse into the inc folder (in FTP) and right click on the config folder, and select "Properties":

Now, in "File Properties", be sure that all read/write checkboxes are filled in, or, enter "777" for the value. Click OK to finish.

Option 1. Use SETUP.PHP to install

This first option is the easiest method to install torrentflux-b4rt (although we’ve found that it doesn’t always work; and a manual MySQL import is required anyways). Launch your browser (i.e Firefox) and run setup.php in the root. For example, if your server is located at http://myseedbox.com, then enter:

http://myseedbox.com/setup.php

You should now see the first screen in the TorrentFlux-b4rt setup. Click Continue twice:

You’ll get to a section where you’ll need to select your database type. Leave it at MySQL, or change it if appropriate. Click Continue.

You should get a message "OK: Your PHP installation supports MySQL". Click Continue, and enter a database name, username and password.

NOTE: If you run into a problem with the SQL Database (see image below), you’ll need to configure your MySQL and import the TorrentFlux-b4rt database script manually. Refer to the INSTALL file located in the torrentflux-b4rt_1.0-beta2.tar.bz2 for additional info. Or, skip to Option 2 below.

Option 2. Manual Installation

Follow the above FTP instructions to upload the torrentflux-b4rt "/html" files to the root of your server.

1. You’ll need to set up your server to run PHP and MySQL. This is no simple task, although here’s a small crash course on setting up PHP, and here’s one to set up MySQL. Once you’ve completed those steps, you’ll need to manually import the TorrentFlux database script (called "mysql_torrentflux-b4rt-1.0.sql") into your MySQL database. This file is located in the torrentflux-b4rt_1.0-beta2.tar.bz2 file, and inside the /sql/mysql directory. Extract mysql_torrentflux-b4rt-1.0.sql to a temporary location on your hard drive.

2. Go back to your cPanel and click the "MySQL® Databases" icon, and look for a link that says "PhpMyAdmin". Often, it’s at the bottom of the window.

On the left side, you should see your database that you created in this step, and it will likely have a (0) next to it. Click it to open its properties.

Now click the Import tab to the right, and click Browse… - now browse to the mysql_torrentflux-b4rt-1.0.sql file that you extracted in Step 1. (Configurations may vary due to different cPanel versions, although the idea is the same).

After adding the file, click the "Go" button. If all went well, you should now see your database tables have been updated on the left side:

OK, go back to FTP and browse into your /inc/config folder. You’ll see 4 files. Rename the file "config.db.php.dist" to "config.db.php". You can accomplish this either by right-clicking it and select Rename or just single-click it, and then remove the ".dist" part of the file.

Next, you’ll need to open (and manually change) the newly renamed "config.db.php" file (this can be done in FTP - it will appear just like a Notepad *.txt file). You’ll need to change three things:

  • 1. The name of the database that you used in MySQL.
  • 2. Your database "username" that you used when setting up the database.
  • 3. Your password that you used.

Thus, looking at the file below, here’s where the three criteria need to be changed to reflect your specific MySQL info. Be sure to leave the quotation marks intact.

Once edited, close the file and be sure to overwrite it with the saved changes (through FTP).

Now, go back to your TorrentFlux setup (i.e. "/setup.php") in the browser, and click "Continue". You should be taken to this screen, where you’ll be asked to delete the setup.php file:

Lastly, if it all worked out well, delete the setup.php file from your root directory — Your installation will not run with setup.php in the root folder (you can also simply rename it to something other than setup.php). Click ‘Continue’ a couple of times, or type in /login.php in the browser window, i.e.:

http://myseedbox.com/login.php

Congratulations! You should now see a login screen - note - this has nothing to do with the username / password that you used when setting up MySQL - this is the new Super Admin username/password that you’ll now set up to login to TorrentFlux. Enter whatever you like, and remember it.

Once logged in, you should see a blank TorrentFlux-b4rt page - ready for torrents! You now have a server / seedbox with total control over TorrentFlux.

You’ll also notice a "superadmin" tab when you enter the Admin settings. You won’t see this unless you install it yourself! Woot!

If you run into an error such as the screenshot below, this means that one (or more) of the 3 criteria are not correct in the config.db.php file (as set up in your MySQL database in cPanel). Be sure that your selected database, username and password are identical to the ones you used when originally setting up the database in MySQL.

Troubleshooting TIP: Verify that you’ve properly connected a user to your MySQL database, and entered a password. You can always go back and delete the MySQL database (and user) and start over - although you’ll need to import the mysql_torrentflux-b4rt-1.0.sql file again in phpMyAdmin for the new database. Again, you’ll also need to change the config.db.php file to reflect the changes.