Installing BOINC on a server

Most online manuals focus on the installation of the BOINC client on a consumer computer (Windows or macOS) or mobile device (Android). In our case, we’re running BOINC and World Community Grid on dozens of servers and we face issues like a demand for low maintenance, high output and scalability.

This is a document that can evolve over time, depending on changes and new insights we gather from our work on our computing cluster.

Operating System of choice

In our case, we’ve opted for the Linux OS. The reason not to choose for Windows Server is mainly based around the need for scheduled maintenance (updates, reboots, downtime etc.) while on Linux these updates often don’t require a server reboot. For an enterprise like ours, licensing isn’t an issue, but for smaller companies or enthousiasts, licensing fees might be a hurdle to Windows Server as well.

Canonical Ubuntu

The largest part of our cluster is running Ubuntu Server 18.04 LTS. We chose for the long-term support version as this version will receive security patches until 2023, lowering our time investment in the maintenance of the server OS.

Preparation

First off all, the Ubuntu Server image file needs to be downloaded. At the thank you page you can find the SHA256 hash to validate the downloaded .iso file. This is needed to make sure that no corruption has occured during the download process. The command stated there can be run in the Terminal on Linux (or you can use sha256sum), while on Windows you need a separate command (CertUtil) or use the CRC check functionality built in a tool like 7-zip.

Then the .iso image file needs to be transported to the intended server. Depending on the server model and its technical capabilities, you can use one of these options:

  • Burn the .iso file to a CD-R or DVD-R.
    Note: burn the disc as an ‘Image’ and don’t just drop the file on the CD/DVD or else it won’t boot the server once the burn process is finished.
  • Create a bootable USB thumb drive. You can use Rufus on Windows or Unetbootin on Windows, macOS or Linux.
    Alternatively you can use the ‘dd‘ command on both Linux and macOS to write the image file to the USB thumb drive.
  • Use the onboard capabilities of the server to send the .iso image file via the network. Check if your server supports this feature, f.e. remote console, iLO, IPMI or iAMT.

Installing Ubuntu Server

Once the server boots into the Ubuntu Server installation medium, you’ll see this image appear. If this image doesn’t appear or you see a different operating system booting (the one currently on the harddisk) then go into the BIOS of the server and alter the boot sequence. Make sure your installation medium is listed before the harddisk.
After a while you’ll notice that the seeding process starts. Often this completes within 15 minutes.
Select your language.
Select a keyboard layout.
Choose ‘Install Ubuntu’.
Under normal conditions an IP-address will be assigned to the server via DHCP. If that’s not the case, than either there’s no DHCP server available on the current network segment, or you are facing Subiquity bug #1824483.
Depending on your network configuration, you can enter a proxy server for internet connectivity.
You could enter an Ubuntu mirror server close to your physical location (for faster download speeds), or you can opt for the default mirror.
By default we choose for ‘Use An Entire Disk’ when provisioning a new server.
Choose the correct physical disk.
An overview of the file systems is given before they are written to disk.
Confirm that all data on the current disk will be overwritten by new data.
Enter account details like server name (will be the server hostname on the network), username and password.
In our case we skip this step.
Here you can see how the system is being built during the installation of Ubuntu Server.
When everything is done, the system needs a reboot. Don’t forget the extra <enter> key you’ll have to press on the terminal that follows this screen, to indicate that the installation medium has been ejected or unmounted.

Once the reboot is complete, the server will boot up. After some residual installation tasks, a flashing user login will appear. If that is not the case, the <enter> key can be pressed to clear the terminal output.

Updating Ubuntu Server

When the server has rebooted and you’re logged in, it’s time to apply the most recent system- and security patches to the operating system. You can do so as follows.

sudo apt-get update

You’ll need to enter your password once again to validate the use of the super user account for the duration of the current session.

Once the update command has pulled in all the required data, it’s time to actually download and apply the updates.

sudo apt-get upgrade

I personally always give the server a reboot after the patching is done, to make sure that all patches are activated correctly and no old code remains in memory.

Installing BOINC

When installing BOINC there’s two options you can choose from.

  • Choose the BOINC stable version
  • Choose the BOINC bleeding edge development version

Choose the BOINC stable version

Anyone who has tried to install BOINC on Ubuntu Server might have noticed that the package seems missing. This has to do with the fact that the universe repository is not included by default. Luckily, this can be changed pretty easily.

sudo nano /etc/apt/sources.list

A simple text editor will appear.

Simply add the word universe after the first and third line. Follow this by pressing Ctrl+O, when the above screen appears, and press <enter> to write the file to disk.

Alternatively, you could use the following command which will have the same effect.

sudo add-apt-repository universe

A rerun of the update command is needed to pull in all the new package data from the universe repository.

sudo apt-get update

After this, you can simply install BOINC as follows.

sudo apt-get install boinc-client

Note that boinc-manager is not present in the command. Remember that we’re using Ubuntu Server which has no graphical user interface or desktop environment. Thus boinc-client is sufficient to make BOINC run on this server.

Choose the BOINC bleeding edge development version

Should you be interested in the bleeding edge development branch of BOINC (and you’re willing to face the occasional bug), then here’s what to do.

The development version of BOINC isn’t present in the universe repository we discussed in the previous section. To get a hold of that version, we need to add an additional repository in the form of a PPA (Personal Package Archive).

sudo add-apt-repository ppa:costamagnagianfranco/boinc

A rerun of the update command is needed to pull in all the new package data from the ppa repository.

sudo apt-get update

After this, you can simply install the BOINC development version as follows.

sudo apt-get install boinc-client

Attach World Community Grid to BOINC

BOINC is now running on your server, but it’s not yet linked to any project or user. To achieve this, you can simply log into the World Community Grid website and look for your Account Key on your My Profile page.

Using this Account Key, you can enter the following command to link the boinc-client on this server to your World Community Grid account.

sudo -u boinc boinccmd --project_attach http://www.worldcommunitygrid.org 2ad0aa3a2dcc8608675ec10dfb8455d5

When you enter the htop command, you’ll see boinc-client starting to asses the available server processor(s) via a CPU benchmark. And after a while, you’ll see the first actual work-units arrive at your server.

It’s time for a beer, you’ve successfully installed BOINC on a server!

Our servers run at full load 24/7, as you can see at the CPU load bars all being at 100%. The actual CPU load can be altered when you log into you World Community Grid account at the Device Profiles page. This can be useful in case you face issues with cooling or noise near your server(s).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.