PROWAREtech

articles » current » information-technology » linux » setup-and-configure » folding-at-home-linux-server

Folding at Home Linux Server

Install Folding@Home on a Linux Server.

See related: Folding@Home Processor Performance Database

 

This article details installing Folding@Home on a Ubuntu 18.04 Linux server using the command-line interface (CLI). It will work on a Linux GUI from a terminal window, but the point of this article is to install on the Linux server operating system which is more efficient. The Linux server OS will run Folding@Home with just a single GB of RAM!

This article will also install a driver for a modern Nvidia graphics card (GPU).

Install Linux Server

Download Ubuntu server from here and install it.

Update Linux Server

Update the server with the command:

sudo apt update

And this command:

sudo apt upgrade

Install SSH Server

SSH will allow access to the CLI from another computer. This is not a requirement.

sudo apt install openssh-server

Reboot the server.

Install OpenCL

This is optional and only required for folding on GPU's; GPU steps can be skipped if not folding with a GPU.

Issue this command to install OpenCL:

sudo apt-get install ocl-icd-opencl-dev

Reboot the server.

List Available NVIDIA Drivers

This is optional and only required for folding on Nvidia GPU's; GPU steps can be skipped if not folding with a GPU.

Issue a apt search nvidia-driver command to show a list similar to this:

apt search nvidia-driver
user@hostname-or-ip:~$ apt search nvidia-driver
Sorting... Done
Full Text Search... Done
nvidia-384/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-390

nvidia-384-dev/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-390

nvidia-driver-390/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  NVIDIA driver metapackage

nvidia-driver-418/bionic-updates 430.50-0ubuntu0.18.04.2 amd64
  Transitional package for nvidia-driver-430

nvidia-driver-418-server/bionic-updates,bionic-security 418.211.00-0ubuntu0.18.04.1 amd64
  NVIDIA Server Driver metapackage

nvidia-driver-430/bionic-updates,bionic-security 440.100-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-440

nvidia-driver-435/bionic-updates 455.45.01-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-455

nvidia-driver-440/bionic-updates,bionic-security 450.119.03-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-450

nvidia-driver-440-server/bionic-updates,bionic-security 450.142.00-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-450-server

nvidia-driver-450/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-460

nvidia-driver-450-server/bionic-updates,bionic-security 450.142.00-0ubuntu0.18.04.1 amd64
  NVIDIA Server Driver metapackage

nvidia-driver-455/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-460

nvidia-driver-460/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA driver metapackage

nvidia-driver-460-server/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA Server Driver metapackage

nvidia-driver-465/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.1 amd64
  Transitional package for nvidia-driver-470

nvidia-driver-470/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.1 amd64
  NVIDIA driver metapackage

nvidia-driver-470-server/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.3 amd64
  NVIDIA Server Driver metapackage

nvidia-headless-390/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-418-server/bionic-updates,bionic-security 418.211.00-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-450-server/bionic-updates,bionic-security 450.142.00-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-460/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-460-server/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-470/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage

nvidia-headless-470-server/bionic-updates,bionic-security,now 470.57.02-0ubuntu0.18.04.3 amd64 [installed]
  NVIDIA headless metapackage

nvidia-headless-no-dkms-390/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-418-server/bionic-updates,bionic-security 418.211.00-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-450-server/bionic-updates,bionic-security 450.142.00-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-460/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-460-server/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-470/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.1 amd64
  NVIDIA headless metapackage - no DKMS

nvidia-headless-no-dkms-470-server/bionic-updates,bionic-security,now 470.57.02-0ubuntu0.18.04.3 amd64 [installed,automatic]
  NVIDIA headless metapackage - no DKMS

xserver-xorg-video-nvidia-390/bionic-updates,bionic-security 390.144-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-418-server/bionic-updates,bionic-security 418.211.00-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-450-server/bionic-updates,bionic-security 450.142.00-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-460/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-460-server/bionic-updates,bionic-security 460.91.03-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-470/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.1 amd64
  NVIDIA binary Xorg driver

xserver-xorg-video-nvidia-470-server/bionic-updates,bionic-security 470.57.02-0ubuntu0.18.04.3 amd64
  NVIDIA binary Xorg driver

Make note of the driver that will be installed, in this case: nvidia-driver-470-server.

Install NVIDIA Driver

Make sure the compatible GPU is physically installed in the server.

Issue the command sudo apt install [driver_name] to install the Nvidia driver. For example:

sudo apt install nvidia-driver-470-server

Reboot the server.

It may be necessary to install the nvidia utilities to have nvidia-smi which is for monitoring GPU temperature and power usage. Issue this command for this example:

sudo apt-get install nvidia-utils-470-server

Issue this command to monitor the Nvidia GPU's temps and power usage:

watch -t nvidia-smi

Install Folding@Home Client (FAH Client)

Download FAH Client

To download version 7.6.21:

wget https://download.foldingathome.org/releases/public/release/fahclient/debian-stable-64bit/v7.6/fahclient_7.6.21_amd64.deb
Install FAH Client

To install version 7.6.21:

sudo dpkg -i --force-depends fahclient_7.6.21_amd64.deb

Stopping and Starting FAH Client

To stop FAH Client:

sudo /etc/init.d/FAHClient stop

To start FAH Client:

sudo /etc/init.d/FAHClient start

Data Directory

The cores, logs, and work folder, plus current log file, are located in this directory: /var/lib/fahclient

Edit CONFIG.XML

Stop FAH Client and then edit the configuration file - config.xml - with this command:

sudo nano /etc/fahclient/config.xml
Example CONFIG.XML file

This example will fold on the Nvidia GPU installed in the server.

Get a passkey.

<config>
  <!-- ALZHEIMERS CANCER COVID_19 HIGH_PRIORITY HUNTINGTONS PARKINSONS (SIMPLY REMOVE FOR ANY CAUSE) -->
  <cause v='COVID_19'/>

  <proxy v=':8080'/>

  <!-- password for remote access with FAHControl -->
  <password v='password'/>

  <power v='full'/>

  <!-- User Information -->
  <passkey v='PASSKEY FROM foldingathome.org'/>
  <team v='0'/>
  <user v='USER REGISTERED ON foldingathome.org'/>

  <!-- Folding Slots -->
  <slot id='0' type='GPU'/>

  <!-- CPU Slot w/4 Threads -->
  <slot id='1' type='CPU'>
    <cpus v='4'/>
  </slot>
</config>

Uninstall FAH Client

Stop FAHClient first then enter this command to remove FAHClient.

sudo dpkg -P fahclient

This article details installing Folding@Home on a Fedora 34 Linux server using the command-line interface (CLI). This also covers how to manually install F@H on the desktop as these procedures work for both.

This article will also install a driver for a modern Nvidia graphics card (GPU).

Have Fedora server installed and be logged in as root.

Update Linux Server

Update the server:

yum update

Reboot the server.

Download and Install Nvidia Drivers for Linux

This is optional and only required for folding on Nvidia GPU's; GPU steps can be skipped if not folding with a GPU.

Download the latest Nvidia driver from this site. Secure CoPy (SCP) the downloaded Nvidia driver file to the server, or use wget to download the file directly to the server. For example:

wget https://us.download.nvidia.com/XFree86/Linux-x86_64/510.60.02/NVIDIA-Linux-x86_64-510.60.02.run

Set the downloaded/copied NVIDIA binary to have execute permissions:

chmod +x NVIDIA-*.run

Make sure server is up to date:

dnf update

Reboot the server.

Install required dependencies:

dnf install kernel-devel kernel-headers gcc make dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel pkgconfig

Disable the "nouveau" driver:

echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf

Edit /etc/default/grub:

nano /etc/default/grub

For Fedora 34 BTRFS add the data in red:

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rhgb quiet rd.driver.blacklist=nouveau"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true

Update grub2 conf:

grub2-mkconfig -o /boot/grub2/grub.cfg

Remove xorg-x11-drv-nouveau

dnf remove xorg-x11-drv-nouveau

Backup initramfs:

mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img

Create new initramfs:

dracut /boot/initramfs-$(uname -r).img $(uname -r)

Reboot to runlevel 3:

systemctl set-default multi-user.target

Reboot the server.

Run the Nvidia binary (NVIDIA-Linux-x86_64-510.60.02.run in this case):

./NVIDIA-Linux-x86_64-510.60.02.run
  1. Yes to register the Kernel Source Modules with DKMS.
  2. OK the "WARNING: nvidia-installer was forced to guess the X library path '/usr/lib64' and X module path '/usr/lib64/xorg/modules'; these paths were not queryable from the system. If X fails to find the NVIDIA X driver module, please install the `pkg-config` utility and the X.Org SDK/development package for your distribution and reinstall the driver."
  3. Yes to install 32-bit compatibility libraries.
  4. Yes to run the nvidia-xconfig utility to automatically update your X configuration file.

Reboot back to runlevel 5:

systemctl set-default graphical.target

Reboot the server.

Issue this command to monitor the Nvidia GPU's temps and power usage:

watch -t nvidia-smi

Install Folding@Home Client (FAH Client)

Download FAH Client

To download version 7.6.21:

wget https://download.foldingathome.org/releases/public/release/fahclient/centos-6.7-64bit/v7.6/fahclient-7.6.21-1.x86_64.rpm
Install FAH Client

To install version 7.6.21:

rpm -i --nodeps fahclient-7.6.21-1.x86_64.rpm

Stopping and Starting FAH Client

To stop FAH Client:

/etc/init.d/FAHClient stop

To start FAH Client:

/etc/init.d/FAHClient start

Data Directory

The cores, logs, and work folder, plus current log file, are located in this directory: /var/lib/fahclient

Edit CONFIG.XML

Right now, the FAH Client is configured for Anonymous use and to fold on a CPU.

Stop FAH Client and then edit the configuration file - config.xml - with this command:

nano /etc/fahclient/config.xml
Example CONFIG.XML file

This example will fold on the Nvidia GPU installed in the server.

Get a passkey.

<config>
  <!-- ALZHEIMERS CANCER COVID_19 HIGH_PRIORITY HUNTINGTONS PARKINSONS (SIMPLY REMOVE FOR ANY CAUSE) -->
  <cause v='COVID_19'/>

  <proxy v=':8080'/>

  <!-- password for remote access with FAHControl -->
  <password v='password'/>

  <power v='full'/>

  <!-- User Information -->
  <passkey v='PASSKEY FROM foldingathome.org'/>
  <team v='0'/>
  <user v='USER REGISTERED ON foldingathome.org'/>

  <!-- Folding Slots -->
  <slot id='0' type='GPU'/>

  <!-- CPU Slot w/4 Threads -->
  <slot id='1' type='CPU'>
    <cpus v='4'/>
  </slot>
</config>

Autostart FAH Client at Boot

Use cron to autostart FAHClient at boot. To open the crontab editor:

crontab -e

Create a new line starting with @reboot like this:

@reboot /etc/init.d/FAHClient start

Reboot the server and FAHClient should be started automatically.

Install PowerChute to Safely Shutdown Server Upon Power Failure

This is optional and requires an American Power Conversion (APC) UPS.

  1. Download PowerChute Business Edition for Linux. At the time of this writing, PowerChute Business Edition v10.0.2 is current. If this link is broken, search for the latest version of this software.

  2. Use SCP to copy the PowerChute file (apcpowerchute.tar.gz in this example) to an empty directory on the server.

  3. Expand PowerChute with this command:

    tar xzf apcpowerchute.tar.gz
  4. Install PowerChute with this command:

    ./install_pbeagent_linux.sh

This article details installing Folding@Home on a CentOS 7 Linux server using the command-line interface (CLI). This also covers how to manually install F@H on the desktop as these procedures work for both.

This article will also install a driver for a modern Nvidia graphics card (GPU).

Have CentOS server installed and be logged in as root.

Update Linux Server

Update the server:

yum update

Reboot the server.

Install Nvidia Drivers for Linux

This is optional and only required for folding on Nvidia GPU's; GPU steps can be skipped if not folding with a GPU.

Issue these commands to install dependencies/prerequisites for the Nvidia driver:

yum groupinstall "Development Tools"
yum install kernel-devel epel-release
yum install dkms

Download the latest Nvidia driver from this site. Secure CoPy (SCP) the downloaded Nvidia driver file to the server, or use wget to download the file directly to the server. For example:

wget https://us.download.nvidia.com/XFree86/Linux-x86_64/510.60.02/NVIDIA-Linux-x86_64-510.60.02.run

Set the downloaded/copied NVIDIA binary to have execute permissions:

chmod +x NVIDIA-*.run

Edit grub:

nano /etc/default/grub

Disable the "nouveau" driver by adding "nouveau.modeset=0" to grub, such as in this example:

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet nouveau.modeset=0"
GRUB_DISABLE_RECOVERY="true"

Reboot the server.

Issue this command to stop Xorg server:

systemctl isolate multi-user.target

Run the Nvidia binary:

bash /NVIDIA-Linux-x86_64-*
  1. Yes to register the Kernel Source Modules with DKMS.
  2. Yes to install 32-bit compatibility libraries.
  3. Yes to run the nvidia-xconfig utility to automatically update your X configuration file.

Issue this command to monitor the Nvidia GPU's temps and power usage:

watch -t nvidia-smi

Install Folding@Home Client (FAH Client)

Download FAH Client

To download version 7.6.21:

wget https://download.foldingathome.org/releases/public/release/fahclient/centos-6.7-64bit/v7.6/fahclient-7.6.21-1.x86_64.rpm
Install FAH Client

To install version 7.6.21:

rpm -i --nodeps fahclient-7.6.21-1.x86_64.rpm

Stopping and Starting FAH Client

To stop FAH Client:

/etc/init.d/FAHClient stop

To start FAH Client:

/etc/init.d/FAHClient start

Data Directory

The cores, logs, and work folder, plus current log file, are located in this directory: /var/lib/fahclient

Edit CONFIG.XML

Right now, the FAH Client is configured for Anonymous use and to fold on a CPU.

Stop FAH Client and then edit the configuration file - config.xml - with this command:

nano /etc/fahclient/config.xml
Example CONFIG.XML file

This example will fold on the Nvidia GPU installed in the server.

Get a passkey.

<config>
  <!-- ALZHEIMERS CANCER COVID_19 HIGH_PRIORITY HUNTINGTONS PARKINSONS (SIMPLY REMOVE FOR ANY CAUSE) -->
  <cause v='COVID_19'/>

  <proxy v=':8080'/>

  <!-- password for remote access with FAHControl -->
  <password v='password'/>

  <power v='full'/>

  <!-- User Information -->
  <passkey v='PASSKEY FROM foldingathome.org'/>
  <team v='0'/>
  <user v='USER REGISTERED ON foldingathome.org'/>

  <!-- Folding Slots -->
  <slot id='0' type='GPU'/>

  <!-- CPU Slot w/4 Threads -->
  <slot id='1' type='CPU'>
    <cpus v='4'/>
  </slot>
</config>

Autostart FAH Client at Boot (Optional)

Use cron to autostart FAHClient at boot. To open the crontab editor:

crontab -e

Create a new line starting with @reboot like this:

@reboot /etc/init.d/FAHClient start

Reboot the server and FAHClient should be started automatically.

Install PowerChute to Safely Shutdown Server Upon Power Failure

This is optional and requires an American Power Conversion (APC) UPS.

  1. Download PowerChute Business Edition for Linux. At the time of this writing, PowerChute Business Edition v10.0.2 is current. If this link is broken, search for the latest version of this software.

  2. Use SCP to copy the PowerChute file (apcpowerchute.tar.gz in this example) to an empty directory on the server.

  3. Expand PowerChute with this command:

    tar xzf apcpowerchute.tar.gz
  4. Install PowerChute with this command:

    ./install_pbeagent_linux.sh
  5. Follow the onscreen prompts.


PROWAREtech

Hello there! How can I help you today?
Ask any question

PROWAREtech

This site uses cookies. Cookies are simple text files stored on the user's computer. They are used for adding features and security to this site. Read the privacy policy.
ACCEPT REJECT