Recently I set up a virtual machine on my VM server to run Folding@Home as a CPU-only worker. I’ll walk through the exact steps I took to set up the VM, and install and configure Folding@Home. These same steps can be used to set up a headless worker node on bare metal as well, such as for running GPU jobs.
I’ll be walking through setting it up from scratch as well. I’m not going to be walking through things bit by bit, so I expect you to have a decent technical understanding to fill in any gaps.
Note that while I’m walking through setting up a clean system or new VM, the below section about installing and configuring Folding@Home can apply to any Linux system.
Installing Fedora Server
Let’s start with installing Fedora.
Download the network installer ISO (off to the side under “Other Downloads), not the full install ISO. It’s significantly smaller (under 500MB) and gives you a lot more flexibility in setting things up. It’ll also only install the latest packages, saving you from having to run updates immediately after installing.
Once you reach the “Installation Summary” screen, select “Software Selection” and change it from “Fedora Server Edition” to “Minimal Install”. And on the right under “Add-Ons”, select “Standard”. If you’re setting up a VM, also add “Guest Agents”.
Set up everything else as you want and begin the installation.
Once installed, follow the procedure for installing the appropriate driver for your graphics card, if applicable.
I’d also recommend installing the package “dnf-plugin-system-upgrade“, which will give you a means of upgrading the Fedora installation in the future to the next latest release. I recently had to do this on several VMs running Fedora 25 to upgrade them in-place to Fedora 26 (latest as of this writing).
Next download and install the Folding@Home client RPM. Installing the RPM will immediately start Folding@Home with a CPU slot and a GPU slot if the GPU is properly configured. The only problem is you’ll be folding as an anonymous user with no team. But it’s easier to configure Folding@Home while it’s running unless you like manually editing XML files.
From the command line, telnet (not SSH) to localhost:36330: “telnet localhost 36330”. This will bring up a command interface for configuring Folding@Home and viewing the status of slots and jobs.
You will use the “option” command to set any options that you want: “option [name] [value]”. You can use the “options” command to view all the options that are not set to defaults.
- user – Folding@Home username (default: anonymous)
- passkey – Passkey for your account
- team – Team number you wish to join (default: 0)
- power – One of [light, medium, full] (default: light)
- gpu – Whether to allow GPU folding [true/false] (should be true if your GPU is properly set up and supported by Folding@Home)
If you want to enable remote access to view the status and modify the worker node remotely with FAHControl, you’ll want the below options as well. Note, you will also need to open port 36330/tcp on the firewall or disable the firewall (not recommended).
- command-allow-no-pass – IP subnet or address (see below screenshot) from which remote access is allowed without a password
- allow – IP subnet or address (see below screenshot) from which remote access is allowed with a password. Note: all IPs and subnets specified in “command-allow-no-pass” must also be specified here.
- password – Password to use for remote access, required for “allow”
Once you’ve set all the needed options, use the “save” command to save it off. Then exit out and restart Folding@Home (as root or using sudo) to make sure the new options take (some don’t apply immediately):
If you’ve configured for remote access, test that access from another system by attempting to telnet to port 36330. If connecting from a Windows system, you will need to have a period after the hostname — e.g. “folding.”, not “folding” — or it likely will fail to find it.
If it connects and disconnects immediately, you don’t have it properly configured to allow remote access from your IP address. Check your options to make sure they’re all correct. You’ll need to restart FAHClient if you change anything.
If it times out trying to connect, you need to open the port on the firewall. Did you remember to restart the firewalld service after adding the port?
Adding worker node to FAHControl
If you’ve properly set up the node for remote access and you can telnet into the Folding@Home system and run commands remotely, then you can add the system to FAHControl from that system. It’s straightforward, so I’m not going to go into detail.