This page is an attempt to document how to put together a complete machine using this distribution. Links are provided to jump to particular sections.

  1. Required hardware
  2. Downloading Fold-Server
  3. Installing
    1. Installing from CD
    2. Configuring network adapters with Web-config
    3. Configuring folding and building the client image
    4. Testing a client
    5. Configuring your router
      1. Linksys
      2. Linux
      3. IPCop
      4. Windows
      5. D-link
      6. Setting up NAT
  4. Reconfiguring
  5. Getting VNC going or removing it
  6. Using the web interface
  7. Using the shell
  8. Miscellaneous stuff
Required Hardware

This distribution is fairly lenient with regard to what hardware is required.

The things to note are the network cards. A list is provided of the ones built into the kernel. I tried to pick cards that were common, or at least that I had heard of. If I guessed wrong and you have a card supported by the kernel but not built into mine, please contact me at the link above and let me know. If I get enough requests for a card, I'll build it into the kernel for future releases. You can also try building your own kernel and repackaging; you'll probably want to start from my kernel configuration.

Downloading Fold-Server

The single file you must download to run Fold-server is an ISO file. It is an image of a CD, which must be burned to CD before use. If you're running Fold-server in a virtual machine, you don't need to burn it, but I'm gonna guess you know what you're doing with respect to that.

Anyways, to burn the CD you will need some CD burning software and an appropriate drive. I suggest that you burn this at a low speed if you're using an old CD-ROM drive, since they can have problems with new media burned at high speeds. It's only 50 MB, anyways, so it won't take long even at slow speeds. With Linux, a line like "cdrecord speed=4 driveropts=burnfree -v" will burn the CD and show you what's going on. In Windows, you're on your own. Nero has a "Burn Image" option under "Recorder" (at least in my version...). I don't have EZ CD creator, but I'd imagine it's fairly eazy. I mean easy. In any case, the goal is to end up with a CD with several files and directories on it, not just one .iso file. If you've burned an image before, you'll be fine; if you haven't, there's an excellent resource for this kind of thing.

Installing Fold-Server
Installing from CD

Pop the brand new CD into the machine you're going to use as a server. It should boot okay; if not take it back to the machine you burned it on and see what's on it. It should have several files on it, not just one. Other than that, make sure it boots other CDs okay and then give up. Or email me. See the link above.

Okay, now you've got the CD booted. A bunch of stuff will scroll by; don't worry about it. This is normal. When it stops, the last few lines should look something like (except the dates):

Jan 18 01:13:05 (none) syslogd started: BusyBox v1.00 (2004.12.08-00 :37+0000) Possible CDROM on hdc? Found the CD-ROM on hdc / #

Now type "/installer". A little secret here: Just type "/i" and hit tab. It will fill in in the rest of the filename, since this is the only file that starts with "/i". Just one of those nice things about Linux. Press enter and the installer will start. Read everything it prints, and you'll be okay.

Folding @ Home server installer Version 1.0 April 4 2005 This program will guide you through the process of installing a server for Folding@Home clients. In order to do this, some data about your hardware is necessary. If you're not sure what to answer for a particular question, google is your friend. Read the questions carefully to make sure you under- stand what is being asked. If you run into problems, there will are shells available on virtual consoles 3, 4, and 5. Hopefully you won't need them. Press Enter to continue.

Just hit enter.

First you must decide where to install to. If you hit Alt-F2 now, you'll see a listing of the hard drives attached to your machine. Hit Alt-F1 to come back, then Enter to continue with instructions.

Hit Alt-F2; you should see something like this:

Press Alt-F1 to return to instructions Disk /dev/hda: 120.0 GB, 120034123776 bytes 255 heads, 63 sectors/track, 14593 cylinders Units = cylinders of 16065 * 512 bytes = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 1 1217 9775521 83 Linux /dev/hda2 1218 1340 987997+ 82 Linux swap

This means I have one hard disk (hda) plugged in and recognized. Figure out which disk you want to install to, and remember it. Hit Alt-F1 to switch back, and then enter to continue configuring.

Did you see the one you wanted? Make sure you get the right one, unplug all except the target disk if necessary to make sure the proper disk is formatted. Please enter the target disk to partition (for example, hda):

Enter the name of the target disk. If you forgot already, press Alt-F1 and Alt-F2 to switch back and forth.

Now switch to console 2 and partition this disk. The optimal setup for fold-server is to have 3 partitions. The first (or hda1) will be for the root, or /, filesystem. The next is the swap partition, similar to Windows' swapfile. The third is for /foldsave, where the progress of the clients goes.

So how do we get here? Here are the detailed steps to set up your disk like this. This will erase all your existing data, be warned.

Disk /dev/hda: 4223 MB, 4223729664 bytes 16 heads, 63 sectors/track, 8184 cylinders Units = cylinders of 1008 * 512 = 516096 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 993 500440+ 83 Linux /dev/hda2 994 1490 250488 82 Linux swap /dev/hda3 1491 8184 3373776 83 Linux

This is (more or less) what it should look like. The important parts are:

On to the next step!

Now I need to know where to put things. Which partition is of type Linux (83)? (For example: hda1):

Whatever partition you made type 83, enter it here. If you didn't make one, switch back to console 2 and do it before answering here.

Should this disk be formatted before use (yes/no)?

Probably a yes, especially if you just made the partition.

Which is of type Linux Swap (82)? (For example: hda2):

Same deal as two questions ago. Change type if necessary.

You seem to have more than one partition of type 83 (Linux) defined. Note that this part of the installer won't format disks. If you want to format disks at this point, switch to another console and type: mke2fs -j /dev/YOURDISK and it will be formatted. Where would you like to mount the next disk (/dev/hda3)?
Now, since we've got 3 partitions, we'll mount the extra one on "/foldsave". This is where all the clients put their saved progress so that it isn't lost when they reboot. This takes up much of the space of a large fold-server installation, so it's put on a seperate partition. This also preserves it in case the next version of fold-server formats everything again.

Note that you'll have to manually format this partition yourself. In future installs, you won't want to format this partition, since it will contain all of your client data.

Now to set the configuration password. This is only for the web interface; the root password is "Fold@on" by default, and may be changed by doing "passwd root" once the machine has rebooted after the install is done. Please enter your password: Please enter it again:

This sets the password for the web interface. This is not the password you use to log in with; you may log in with either user "dsl" and blank password, or user "root" and password "Fold@on". You will want to try this interface out; it provides a set of useful services to your whole LAN.

Okay, that's all the configuration information necessary to install. A quick review of your configuration: Root partition will be on: hda1 Format root partition? yes Swap partition will be on: hda2 LILO will be installed to: hda Other disks will be mounted as follows: /dev/hda3 /foldsave ext3 defaults 1 1 ------------------------------------- Ready to install. Press any key to start. If this isn't the configuration you wanted, press control-C to terminate this script and start over.

This is the configuration I use, in case you care; in any case, it makes a reasonably sane configuration. Next comes a bunch of output, hopefully with no errors in it. You can use Shift+Page Up and Shift+Page Down to scroll through it. Below is a nominal run (this is what's expected to happen).

This run is from version 0.8; newer versions have slightly different output.

Formatting hda1: mke2fs -m 0 /dev/hda1 mke2fs 1.35 (28-Feb-2004) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 403200 inodes, 806392 blocks 0 blocks (0.00%) reserved for the super user First data block=0 25 block groups 32768 blocks per group, 32768 fragments per group 16128 inodes per group Superblock backups stored on blocks: 32768,98304,163840,229376,294912 Writing inode tables: done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 36 mounts or 180 days, whichever comes first. Use tune2fc -c or -i to override. Making swap: mkswap /dev/hda2 Setting up swapspace version 1, size = 920711168 bytes Turning on swap: swapon /dev/hda2 Adding 899128k swap on /dev/hda2. Priority:-1 extents:1 Mounting root partition on /mnt/system: mount -t ext3 /dev/hda1 /mnt/system EXT2-fs warning (device hda1): ext2_fill_super: mounting ext3 filesystem as ext2 Uncompressing tar file: /bin/grzip d /mnt/cdrom/server.tar.grz /mnt/system/syste m.tar This is GRZipII, yet another BSLDCA compressor. Version 0.2.4, 12-Feb-2004. CopyRight (c) 2002-2004 by Grebnov Ilya <>. Decompressed 54979524 into 139315200 in 167.230 seconds. Uncompressing system: tar xvf /mnt/system/system.tar (progress on console 2) Creating config files: made sed script...done making config files. Running lilo: /sbin/lilo -r /mnt/system Added dsl * Done installing! Ready to reboot, type reboot to do so or Shift+PgUp/PgDn to check for any errors in previous commands...

And your system is installed. Now let's see how it works. Eject the cdrom, and type "reboot" to finish the install. After the computer comes back up, log in as "root" with password "Fold@on". The username and password are case sensitive. Then you can work on configuring your new fold-server.

Setting up network

On one of the computers on your "normal" network, go to "https://" plus the default address of the server ( and click on the "Change Configuration" link. You set the password during the install pricess. If you'd like to change this password, you'll need to do the following:

root@1[root]# cd /root root@1[root]# ./ This script will set the web interface password. Press Ctrl-C now if you don't want to change the password. Please enter your password: Please enter it again: root@1[root]#

You may also configure the server by starting X and using the firefox installed there. It will start automatically if you log in as "dsl", with no password. See more on this topic down at the section about the web-based interface.

Configuring folding and building the client image

When the system comes up again, log in as "dsl" (there's no password); it'll start X. If it gets this far, it probably means everything will work. First we'll set up your username and team for FAH. As usual, there's two ways to do this. First, you can run "/root/" and follow the instructions. Second, log into the web interface, and click on the "Configure Folding@Home username/team" option. Just in case you couldn't guess.

Next we'll retrieve the Folding@Home client. This will require that your internet connection is active. Below is a complete log of what is output; if you need help getting this to run, skip over the next section and go down one.

root@0[root]# ./ Please make sure to run the web-config script to set up the username and password that will be used for Folding! This will take a while, and if you change the setup before it finishes, it'll work. Hurry it up ;) Figuring out what's the latest client... Retrieving F@H client... Retrieving cores.......... Uncompressing cores.......... Okay, now generating fold.tar.gz... Moving fold.tar.gz to /foldsave...Okay, done, removing temp directory...Updatin g local configuration file...Writing bigpacket config file for instance 1 Started 1 instance(s), estimated memory free at peak usage 90176. Okay, now running /etc/fold start to get it going on this machine. fold start called Retrieving latest stats file: Ok! If you discover that there are new cores, please just rerun this script to regenerate the fold.tar.gz file. Done making fold.tar.gz, exiting successfully!

If you can't get this going from the above output, here it is step by step.

This script makes all the stuff it downloaded, along with the client configuration file, into a single package for easy distribution to the clients. To make sure that this worked, first let's do "ls -s /foldsave".

root@fold-server:~# ls -s /foldsave/ 5460 fold.tar.gz root@fold-server:~#

Okay, the file exists. Now let's see what's in that file.

root@fold-server:~# tar -ztvf /foldsave/fold.tar.gz -rwxrwxr-x root/root 2264152 2005-01-19 09:28:47 FahCore_65.exe -rwxrwxr-x root/root 3402604 2005-01-19 09:28:48 FahCore_78.exe -rwxrwxr-x root/root 2809372 2005-01-19 09:28:49 FahCore_79.exe -rwxrwxr-x root/root 2367380 2005-01-19 09:28:50 FahCore_82.exe -rwxrwxr-x root/root 2179408 2005-01-19 09:28:51 FahCore_c9.exe -rwxrwxr-x root/root 2057360 2005-01-19 09:28:51 FahCore_ca.exe -rwxrwxr-x root/root 249236 2005-01-19 09:28:45 fold.exe root@fold-server:~#

Okay, we've got the FAH client, and a bunch of cores. Looks good.

Now that we've got Folding@Home ready to go, it's time to generate the client image.

root@fold-server:~# /tftp/update myroot Reading from myroot Done with cp rm: cannot remove `/tftp/myroot.gz': No such file or directory Done with gzip root@fold-server:~#

The warning from rm is normal, that file doesn't exist on this first run-through. Let's see what we've got:

root@0[root]# ls -s /tftp/ 10 BUILD 3531 fold-boot 12 pxelinux.0 1513 bzImage 0 initrd.current 1 pxelinux.cfg 0 bzImage.current 2012 myroot.gz 1 update root@0[root]#

This is a normal listing. Some files may be added or removed based on release, but what's important is that there exist:

Also, the myroot.gz and bzImage files are what is used to generate fold-boot, and are used directly for PXE. Don't delete them. BUILD shows a history of when the "update" script was run and what number build that was. As you can see, there's a lot of 'em. (1.0 has 247 builds in its log!)

Testing a client

Now try booting one of your clients. A PXE client will probably be easier to get going, so if you have any of those try them first. If all you have is Etherboot clients which you're going to use floppies for, there are two ways to write the images to floppies so you can boot from them. If you want to write the images from the server, do the following:

cd /www/etherboot dd if=YOUR_DISK_IMAGE_NAME.zdsk of=/dev/fd0

This will write to the floppy in the A: drive. If you happen to have a B: drive, substitute "fd1" for "fd0".

To write the images on another machine, go to it and type in the External IP in a web browser. Then click on the "Etherboot floppy images" link and download the one you want. Get Rawrite for Windows too (it's at the top), unzip it and run it. Follow the instructions. If you have another Linux machine you'd like to write the images with, download them from fold-server and follow the same procedure as with writing them from the server.

Now it's time to try the client. If you're using PXE, make sure the BIOS is set to boot from LAN; if you're using Etherboot, boot from floppy (make sure you insert the disk, too). Try it. Good luck.

FIXME: troubleshooting client problems?
Configuring your router

One thing people seem to be having problems with is dealing with routing. Routing is indeed a complicated thing, and since fold-server is a router, you'll have to deal with this at least a little. The problem is that everyone in the connection chain has to know how to get to the people on both sides, or data can't flow. Makes sense? Well, the effect of this is that you'll have to add something to your existing router. I have examples for a Linksys router, a Linux machine and a Windows machine, so if your router is any of these, you're all set.

Why do you need static routes? Here's why. Imagine you're sending a simple ping from one of your client machines to Here's the path on the way out:

So it works okay. The client knows how to get to fold-server, fold-server knows about the router, and the router knows how to talk to the internet. So the packet goes out to the destination, a response is generated, and sent back along the same path. This time, though, we hit a snag.

So the packet knows how to get back to the router fine, it's sent to your external IP. But then the router gets the packet. It sees it's bound for (for example) " I don't know who that is!" it says, and to the great Bit Bucket in the sky that packet goes. This causes the client machine,, to never see a response and give up. So what the static route does is to let the router know that all the packets bound for the 10 network can be sent via that guy over there, the fold-server.


Adding a static route to a Linksys "blue box" is fairly easy. Log into the Linksys router, click on advanced, and enter the information as in the third screenshot. Then hit submit.

Logged in


Static route information filled in


Many people have a machine with m0n0wall, smoothwall, ipcop, or a similar linux- or BSD-based firewall distribution on it. I am only sure of how Linux works with routes, so that's all I'll talk about here. Routes are added at bootup, so you'll need to find what starts up your network. On my Gentoo box, the file to look at is /etc/init.d/networking. On redhat, it is /etc/init.d/networking. A good way to find this file is to go to /etc and do `grep -R "route add" *`. This will probably return quite a few matches, so how do we know which one is important? First, it's likely to be one of the first results. Second, it's likely the same line or lines will appear several times in a row with filenames like 'rc.d/rc5.d/S10network' or something similar. Editing any of these files will work, as they are all symlinked to the same file, so changing one changes all of them.

Okay, so now we've got the right file to edit. What do we put in it, and where? First, check if there's a section dedicated to static routes already. If there is, we'll add our stuff in there. Note that there may be distro-centric methods of setting up static routes; I'm just going to ignore them. They may change in the future, this method of setting up static routes will always work. However, I'd suggest you put the changes in the static route section so you can find them later if it's necessary. So what do we add? Here's my original contents:

# Set static routes if [[ -n ${routes_IFACE} ]]; then einfo " Adding routes" for ((i = 0; i < ${#routes_IFACE[@]}; i = i + 1)); do ebegin " ${routes_IFACE[i]}" /sbin/route add ${routes_IFACE[i]} eend $? done fi

And here it is after my changes:

# Set static routes if [[ -n ${routes_IFACE} ]]; then einfo " Adding routes" for ((i = 0; i < ${#routes_IFACE[@]}; i = i + 1)); do ebegin " ${routes_IFACE[i]}" /sbin/route add ${routes_IFACE[i]} eend $? done fi route add -net netmask gw

and that's it! At this point, you can reboot your machine to see the changes take effect, or just run that last line as root to apply it.


This page contains instructions on how to do this. Basically, add this:

route add -net netmask gw

to /etc/rc.d/rc.netaddress.up . Then reboot, or just run that command to get it to apply to the current session.

As an Administrator:
route -p add mask

and that's it!


The D-Link router I tried to add a static route to (d-link 514) DID NOT SUPPORT static routing. You may be SOL on these. Sorry. I am working on a single-subnet version of fold-server. This will eliminate the problem, but until then, buy a cheap Linksys box. The 54g models are particularly nice, I hear.

Want to see your router here? Give me a sequence of screenshots or instructions, similar to the ones for Linksys for hardware routers or Linux if it's a computer. If for some reason you've only got text for your blue box or graphics for your OS, those are fine too. Hit that Contact link to the left and email them to me. Make sure to modify the address as necessary.


There's a way around all this garbage, Network Address Translation or NAT. This makes it appear to the outside world that there's only one computer, while really there are many machines making requests and having them fulfilled. This works by having fold-server look at incoming packets, and "take over" the ones going to the outside, and keeping track of what connections it's got going. This is planned to be on by default for fold-server 1.1, but right now it takes a bit of patience to set up. First get these two files:

wget -O /usr/sbin/iptables mkdir -p /usr/local/lib/iptables/ wget -O /usr/local/lib/iptables/ chmod +x /usr/sbin/iptables chmod +x /usr/local/lib/iptables/

If you just copy/paste these into a PuTTY terminal (or type them in), that'll get the job done.

Then we activate it:

iptables -t nat -A POSTROUTING -o eth1 -j SNAT --destination --to-source

Then we'll add it to the bootup script so that it'll get started every time fold-server boots. Run "nano /opt/"; this will give you a menu-driven editor which changes the bootup script. Move down to the end, and put that last line in again. Hit ctrl-X to exit, y to save changes, and enter to accept filename.

This makes it appear to the outside world that there's only one computer, while really there are many machines making requests and having them fulfilled. This works by having fold-server look at incoming packets, and "take over" the ones going to the outside interface by writing its own address on the "source" machine, and keeping track of what connections it's got going.

This assumes that you've got the default IP for fold-server; if you don't, that's the only item you'll need to change.

Configuring various aspects of your system
Getting VNC going or removing it

Getting VNC going is fairly simple. All you need to do is set the password for access to the desktop, and tell it to start once. It is configured to start on boot by default. To configure the password and start it:

root@fold-server:~# vncpasswd Password: Verify: root@fold-server:~# vncserver New 'fold-server:1 (root)' desktop is fold-server:1 Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/fold-server:1.log root@fold-server:~#

Now you can connect to your machine in two ways. First, visit the external IP in a web broswer from one of the machines on your network. There are two links which pertain to VNC: "Login via VNC" and "Get VNC viewer for Windows". If you click on the first link, a Java applet will load and ask you for a password. Enter the correct password and you will be logged in. If you click on the second of these links, your browser will download "vncviewer.exe". Run this (or save it, up to you) and enter "YOUR_EXTERNAL_IP:1" for the server name and whatever your password is and you will also be logged in. The Windows viewer is nicer than the browser one; it supports high color (if your network is fast enough (odds are it is)) and other nice features like full screen.

Configuring what VNC does is also fairly simple, but a bit more advanced. There are two files which may need changing: /usr/bin/vncserver and /home/dsl/.vnc/xstartup. In vncserver, you can change the resolution and bit depth that the server runs at; 800x600x24 bit is the default. In xstartup, you can change what programs run when VNC starts. The defaults are to run xtdesk to start icons, run dillo (a web browser), start the monitoring program, and use fluxbox. You may change these, but I suggest strongly that you leave "exec fluxbox" last.

Configuring VNC not to run is easy. Edit /opt/ and remove the lines in red:

#!/bin/bash # put other system startup command here syslogd /etc/init.d/networking start dnsmasq /etc/init.d/portmap start /etc/init.d/nfs-kernel-server start /etc/init.d/nfs-common start /etc/init.d/ssh start tftpd -a -l -s /tftp/ echo -n "Starting HTTP server: " httpd -c /etc/httpd.conf -h /www && echo "OK" echo -n "Starting inetd: " inetd && echo "OK" mount /mnt/build echo "Starting NFS: " rpc.mountd rpc.statd rpc.nfsd rpc.lockd echo "Starting VNC: " vncserver /etc/fold start

It is also possible (and very easy!) to do this with the web interface.

Using the web interface

The web-based interface is designed to be easy to use and complete in terms of functionality. It is new in release 0.8. To get to this interface, either:

  • enter "https://" followed by the IP address of fold-server (default is in a web browser from one of the machines on your network. This assumes that your network configuration is set up correctly. If you have an unusual network configuration, choose the next option instead - it'll work even if the network interfaces are down.
  • start X on the local machine (type su - dsl, and it'll go from there) and run "firefox https://localhost".

With Release 0.9, there is now SSL turned on by default. You will have to accept my SSL certificate in order to use the web interface. This certificate is not used for anything else, so there's no security risk in accepting it. I suggest you choose the "accept always" option.

Details of the SSL Certificate

Then click on the "Change Configuration" link. Enter the password (the default is "Fold@on", if you want to change it look at this part of the documentation.

Using the shell

When X starts, it starts Firefox, but you can just minimize that (click on the minus sign in the upper right, like in Windows). Right-click on a blank space on the desktop, and a menu will pop up. Go to XShells, and click on "Root Access".


You'll get a prompt like this:


This is a "bash prompt" or "shell". If you've used DOS or Windows command line, the principles are fairly similar. A few things of note:

This is by no means a complete list of features, but some are available on the Web for free. (From, From, From Googling will turn up countless results on this topic, I suggest you pursue the topic.

Stuff that didn't fit anywhere else

WinSCP is a Windows SCP (secure copy) client. You can copy files to and from your fold-server using this. It has an interface similar to CuteFTP or Norton Commander, and it easy to use.

AliensBashTutorial is a fairly advanced tutorial on a bunch of the common UNIX utilities with respect to scripting with them. You probably don't need to write any scripts to use fold-server, but if you're interested in Linux (especially as an administrator) these commands will serve you well. I recently took a class on this sort of thing, and learned a lot of little tiny utilities that do obvious things. You know how you sometimes try to do something simple, and it takes 50 lines of script? Someone else has probably had that problem, and written a program to solve it that does it much simpler (and nicer) than your way. As an example, look at seq and rename. Powerful (simple!) tools, but how to find them? Look through this if you're interested in improving fold-server, helping me with bugs, or whatever.

If you want to shut down Folding, run:

root@fold-server:/fold# /etc/fold stop

If you don't want folding to start on boot, there are two places you probably want to change. First, in /opt/, remove the line marked in red:

#!/bin/bash # put other system startup command here syslogd /etc/init.d/networking start dnsmasq /etc/init.d/portmap start /etc/init.d/nfs-kernel-server start /etc/init.d/nfs-common start /etc/init.d/ssh start tftpd -a -l -s /tftp/ echo -n "Starting HTTP server: " httpd -c /etc/httpd.conf -h /www && echo "OK" echo -n "Starting inetd: " inetd && echo "OK" mount /mnt/build echo "Starting NFS: " rpc.mountd rpc.statd rpc.nfsd rpc.lockd echo "Starting VNC: " vncserver /etc/fold start

This means folding itself doesn't start: your processor won't be working on anything in particular.

Second, in /home/dsl/.xinitrc (this is a hidden file, do "ls -a" to show all the hidden files), remove the line marked in red here:

#! /bin/sh -xv # put X windows programs that you want started here. # Be sure to add at the end of each command the & if egrep -qv noicons /proc/cmdline 2>/dev/null; then enhance &>/dev/null & fi firefox localhost & cd /fold rxvt -e tail -f FAHlog.txt & cd ~ exec fluxbox

This means that the monitor window won't pop up when X (the graphical environment) starts up.