Run BOINC on a headless Linux server

Last edited on 2024-08-29 Tagged under  #boinc   #debian   #linux   #homeServer 

BOINC is installed on my home server running Debian. I elect to use the latest stable *.deb packages from the project's repository vs the (older) packages provided by Debian.

To monitor/manage the service I either SSH into the server and use the command line tool boinccmd or access remotely from my desktop using the graphical BOINC Manager.

This is how I do it...

1. Prepare the system

Before installing BOINC:

  • Add GPG key from keyserver
  • Add the BOINC repository to package sources
  • Set a preference for installing BOINC's own packages over the default package in Debian

This is outlined in Steps 1 through 3 in Install BOINC on Debian.

2. Install

sudo apt install boinc-client

Installation creates a new user and group, both labelled boinc. All created files and running processes belong to this user.

Add your username to the boinc group:

sudo adduser <your_username> boinc

3. Account key

Example: I crunch data for Einstein@Home. There are many to choose from: Choosing BOINC projects

To attach BOINC to a project I've already registered with requires the account key.

Either login to my account and go to Account->Credentials, or lookup using the boinccmd command:

boinccmd --lookup_account https://einsteinathome.org <email_used_with_account> "<password>"
status: Success
poll status: operation in progress
account key: <long_alphanumeric_string>

Note: Be sure to put "<password>" in quotes or command will fail.

4. Attach project

Attach to project with --project_attach URL account_key:

$ boinccmd --project_attach https://einsteinathome.org <long_alphanumeric_string>

Check tasks:

$ boinccmd --get_tasks
$ boinccmd --get_task_summary

5. Manage from command line

See boinccmd --help or Boinccmd tool for options.

6. Preferences

By default, BOINC runs on 100% of the CPUs at 100% capacity. Global preferences are maintained on a project's server, edited via a web interface, and downloaded from the server.

To edit BOINC preferences locally, modify the "preferences override file" located at /var/lib/boinc/global_prefs_override.xml. This file is read by boinc-client after it reads the preferences from the server, and it overrides those preferences.

Example global_prefs_override.xml:

  • Do not run the client when system is powered by the battery
  • Run the client when user is active
  • Client allowed to use 25% of the CPUs, and run them at 100% capacity
  • If non-BOINC CPU usage >=25%, suspend the client
<global_preferences>
  <run_on_batteries>0</run_on_batteries>
  <run_if_user_active>1</run_if_user_active>
  <max_ncpus_pct>25.0</max_ncpus_pct>
  <cpu_usage_limit>100.0</cpu_usage_limit>
  <suspend_cpu_usage>25.0</suspend_cpu_usage>
</global_preferences>

Load the new preferences into the client:

boinccmd --read_global_prefs_override 

For a complete list of options:

7. Manage remotely using the graphical BOINC Manager

7.1 On the server

Add the IP address of the remote desktop that will be running BOINC Manager to /var/lib/boinc/remote_hosts.cfg (example: 192.168.1.23):

# This file contains a list of remote host names or IP addresses (one per line)
# that are allowed to connect to the BOINC client via the GUI RPC interface.
# Only the hosts listed in this file will be allowed to connect.
# Lines starting with '#' and ';' are comments and are ignored.
192.168.1.23

Restart:

sudo systemctl restart boinc-client.service

7.2 On the desktop

Note: BOINC password is stored in /var/lib/boinc/gui_rpc_auth.cfg and is blank by default.

Launch BOINC Manager and go to File->Select computer....

Enter the server's IP address (omit password unless one has been set). BOINC running on the server can now be monitored/managed identical to a BOINC setup running on localhost.

You can like, share, or comment on this post on Mastodon 💬

Thanks for reading! Read other posts?

» Next: Minimal Debian Bookworm

« Previous: Volunteer Distributed Supercomputer: Install BOINC on Debian