Turning your Raspberry Pi into a science research station via BOINC

BOINC lets you help cutting-edge science research using your computer (Windows, Mac, Linux) or Android device. BOINC downloads scientific computing jobs to your computer and runs them invisibly in the background. It’s easy and safe. https://boinc.berkeley.edu/

This is the entry paragraph on the Berkely University BOINC website. The BOINC software, short for Berkeley Open Infrastructure for Network Computing, can also be installed on Raspberry Pis, making your Raspberry Pi your own little science research station. This way you can help science projects such as SETI@home, Einstein@Home, Universe@Home, and many more.

tl;dr

Raspbian

  1. Install BOINC: sudo apt-get install boinc-client boinc-manager
  2. Run BOINC manager: boincmgr
  3. Add your project(s)

Oracle Linux

  1. Install the EPEL repository: yum install oracle-epel-release-el7
  2. Install BOINC: yum install boinc-client boinc-manager
  3. Start the BOINC service: systemctl start boinc-client
  4. Create a link to the RPC password file in $HOME: ln -s /var/lib/boinc/gui_rpc_auth.cfg $HOME/
  5. Run BOINC manager: boincmgr
  6. Add your project(s)

Installing BOINC

Installing BOINC on Raspbian

BOINC is easily installed on your Raspberry Pi via apt-get. All you need to do is to type sudo apt-get install boinc-client boinc-manager:

$ sudo apt-get install boinc-client boinc-manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libboinc7 libwxbase3.0-0v5 libwxgtk-webview3.0-gtk3-0v5 libwxgtk3.0-gtk3-0v5
Suggested packages:
boinc-client-opencl boinc-client-nvidia-cuda libgl1-mesa-glx
The following NEW packages will be installed:
boinc-client boinc-manager libboinc7 libwxbase3.0-0v5 libwxgtk-webview3.0-gtk3-0v5 libwxgtk3.0-gtk3-0v5
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,662 kB of archives.
After this operation, 23.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://mirrors.ocf.berkeley.edu/raspbian/raspbian buster/main armhf libboinc7 armhf 7.14.2+dfsg-3 [378 kB]
Get:2 http://mirrors.ocf.berkeley.edu/raspbian/raspbian buster/main armhf boinc-client armhf 7.14.2+dfsg-3 [430 kB]
Get:3 http://mirrors.ocf.berkeley.edu/raspbian/raspbian buster/main armhf libwxbase3.0-0v5 armhf 3.0.4+dfsg-8 [891 kB]
Get:4 http://mirrors.ocf.berkeley.edu/raspbian/raspbian buster/main armhf libwxgtk3.0-gtk3-0v5 armhf 3.0.4+dfsg-8 [3,536 kB]
Get:5 http://mirrors.ocf.berkeley.edu/raspbian/raspbian buster/main armhf libwxgtk-webview3.0-gtk3-0v5 armhf 3.0.4+dfsg-8 [150 kB]
Get:6 http://mirrors.ocf.berkeley.edu/raspbian/raspbian buster/main armhf boinc-manager armhf 7.14.2+dfsg-3 [1,277 kB]
Fetched 6,662 kB in 3s (2,414 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libboinc7:armhf.
(Reading database ... 160201 files and directories currently installed.)
Preparing to unpack .../0-libboinc7_7.14.2+dfsg-3_armhf.deb ...
Unpacking libboinc7:armhf (7.14.2+dfsg-3) ...
Selecting previously unselected package boinc-client.
Preparing to unpack .../1-boinc-client_7.14.2+dfsg-3_armhf.deb ...
Unpacking boinc-client (7.14.2+dfsg-3) ...
Selecting previously unselected package libwxbase3.0-0v5:armhf.
Preparing to unpack .../2-libwxbase3.0-0v5_3.0.4+dfsg-8_armhf.deb ...
Unpacking libwxbase3.0-0v5:armhf (3.0.4+dfsg-8) ...
Selecting previously unselected package libwxgtk3.0-gtk3-0v5:armhf.
Preparing to unpack .../3-libwxgtk3.0-gtk3-0v5_3.0.4+dfsg-8_armhf.deb ...
Unpacking libwxgtk3.0-gtk3-0v5:armhf (3.0.4+dfsg-8) ...
Selecting previously unselected package libwxgtk-webview3.0-gtk3-0v5:armhf.
Preparing to unpack .../4-libwxgtk-webview3.0-gtk3-0v5_3.0.4+dfsg-8_armhf.deb ...
Unpacking libwxgtk-webview3.0-gtk3-0v5:armhf (3.0.4+dfsg-8) ...
Selecting previously unselected package boinc-manager.
Preparing to unpack .../5-boinc-manager_7.14.2+dfsg-3_armhf.deb ...
Unpacking boinc-manager (7.14.2+dfsg-3) ...
Setting up libboinc7:armhf (7.14.2+dfsg-3) ...
Setting up libwxbase3.0-0v5:armhf (3.0.4+dfsg-8) ...
Setting up boinc-client (7.14.2+dfsg-3) ...
Created symlink /etc/systemd/system/multi-user.target.wants/boinc-client.service → /lib/systemd/system/boinc-client.service.
Setting up libwxgtk3.0-gtk3-0v5:armhf (3.0.4+dfsg-8) ...
Setting up libwxgtk-webview3.0-gtk3-0v5:armhf (3.0.4+dfsg-8) ...
Setting up boinc-manager (7.14.2+dfsg-3) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.31.4-3) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
Processing triggers for systemd (241-7~deb10u1+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for desktop-file-utils (0.23-4) ...
$

Installing BOINC on Oracle Linux

To install BOINC on Oracle Linux, you first have to install the EPEL repository which contains the BOINC binaries. This is done via yum install oracle-epel-release-el7:

[root@rpi3 ~]# yum install oracle-epel-release-el7
Resolving Dependencies
--> Running transaction check
---> Package oracle-epel-release-el7.aarch64 0:1.0-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================
Installing:
oracle-epel-release-el7 aarch64 1.0-1.el7 ol7_latest 13 k

Transaction Summary
========================================================================================================================================
Install 1 Package

Total download size: 13 k
Installed size: 18 k
Is this ok [y/d/N]: y
Downloading packages:
oracle-epel-release-el7-1.0-1.el7.aarch64.rpm | 13 kB 00:00:03
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : oracle-epel-release-el7-1.0-1.el7.aarch64 1/1
Verifying : oracle-epel-release-el7-1.0-1.el7.aarch64 1/1

Installed:
oracle-epel-release-el7.aarch64 0:1.0-1.el7

Complete!
[root@rpi3 ~]#

After the repository is installed, you can install the BOINC binaries via yum install boinc-client boinc-manager:

[root@rpi3 ~]# yum install oracle-epel-release-el7
Resolving Dependencies
--> Running transaction check
---> Package oracle-epel-release-el7.aarch64 0:1.0-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================
Installing:
oracle-epel-release-el7 aarch64 1.0-1.el7 ol7_latest 13 k

Transaction Summary
========================================================================================================================================
Install 1 Package

Total download size: 13 k
Installed size: 18 k
Is this ok [y/d/N]: y
Downloading packages:
oracle-epel-release-el7-1.0-1.el7.aarch64.rpm | 13 kB 00:00:03
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : oracle-epel-release-el7-1.0-1.el7.aarch64 1/1
Verifying : oracle-epel-release-el7-1.0-1.el7.aarch64 1/1

Installed:
oracle-epel-release-el7.aarch64 0:1.0-1.el7

Complete!
[root@rpi3 ~]# yum install boinc-client boinc-manager
ol7_developer_EPEL | 2.7 kB 00:00:00
(1/3): ol7_developer_EPEL/aarch64/updateinfo | 4.5 kB 00:00:01
(2/3): ol7_developer_EPEL/aarch64/group | 365 kB 00:00:01
(3/3): ol7_developer_EPEL/aarch64/primary_db | 11 MB 00:00:05
Resolving Dependencies
--> Running transaction check
---> Package boinc-client.aarch64 0:7.14.2-17.el7 will be installed
--> Processing Dependency: libXss.so.1()(64bit) for package: boinc-client-7.14.2-17.el7.aarch64
---> Package boinc-manager.aarch64 0:7.14.2-17.el7 will be installed
--> Processing Dependency: libwx_baseu-3.0.so.0(WXU_3.0)(64bit) for package: boinc-manager-7.14.2-17.el7.aarch64
--> Processing Dependency: libwx_gtk3u_adv-3.0.so.0(WXU_3.0)(64bit) for package: boinc-manager-7.14.2-17.el7.aarch64
--> Processing Dependency: libwx_gtk3u_webview-3.0.so.0(WXU_3.0)(64bit) for package: boinc-manager-7.14.2-17.el7.aarch64
--> Processing Dependency: libwx_gtk3u_core-3.0.so.0(WXU_3.0)(64bit) for package: boinc-manager-7.14.2-17.el7.aarch64
--> Processing Dependency: libwx_gtk3u_html-3.0.so.0(WXU_3.0)(64bit) for package: boinc-manager-7.14.2-17.el7.aarch64
--> Processing Dependency: libwx_baseu_net-3.0.so.0(WXU_3.0)(64bit) for package: boinc-manager-7.14.2-17.el7.aarch64
--> Processing Dependency: libwx_gtk3u_adv-3.0.so.0()(64bit) for package: boinc-manager-7.14.2-17.el7.aarch64
--> Processing Dependency: libwx_baseu-3.0.so.0()(64bit) for package: boinc-manager-7.14.2-17.el7.aarch64
--> Processing Dependency: libwx_gtk3u_qa-3.0.so.0()(64bit) for package: boinc-manager-7.14.2-17.el7.aarch64
--> Processing Dependency: libwx_baseu_net-3.0.so.0()(64bit) for package: boinc-manager-7.14.2-17.el7.aarch64
--> Processing Dependency: libwx_gtk3u_webview-3.0.so.0()(64bit) for package: boinc-manager-7.14.2-17.el7.aarch64
--> Processing Dependency: libwx_gtk3u_xrc-3.0.so.0()(64bit) for package: boinc-manager-7.14.2-17.el7.aarch64
--> Processing Dependency: libwx_gtk3u_html-3.0.so.0()(64bit) for package: boinc-manager-7.14.2-17.el7.aarch64
--> Processing Dependency: libwx_gtk3u_core-3.0.so.0()(64bit) for package: boinc-manager-7.14.2-17.el7.aarch64
--> Processing Dependency: libwx_baseu_xml-3.0.so.0()(64bit) for package: boinc-manager-7.14.2-17.el7.aarch64
--> Running transaction check
---> Package libXScrnSaver.aarch64 0:1.2.2-6.1.el7 will be installed
---> Package wxBase3.aarch64 0:3.0.2-15.el7 will be installed
---> Package wxGTK3.aarch64 0:3.0.2-15.el7 will be installed
--> Processing Dependency: libmspack.so.0()(64bit) for package: wxGTK3-3.0.2-15.el7.aarch64
--> Processing Dependency: libSDL-1.2.so.0()(64bit) for package: wxGTK3-3.0.2-15.el7.aarch64
--> Processing Dependency: libwebkitgtk-3.0.so.0()(64bit) for package: wxGTK3-3.0.2-15.el7.aarch64
--> Running transaction check
---> Package SDL.aarch64 0:1.2.15-14.el7 will be installed
---> Package libmspack.aarch64 0:0.5-0.7.alpha.el7 will be installed
---> Package webkitgtk3.aarch64 0:2.4.11-2.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================
Installing:
boinc-client aarch64 7.14.2-17.el7 ol7_developer_EPEL 583 k
boinc-manager aarch64 7.14.2-17.el7 ol7_developer_EPEL 1.2 M
Installing for dependencies:
SDL aarch64 1.2.15-14.el7 ol7_latest 191 k
libXScrnSaver aarch64 1.2.2-6.1.el7 ol7_latest 23 k
libmspack aarch64 0.5-0.7.alpha.el7 ol7_latest 59 k
webkitgtk3 aarch64 2.4.11-2.el7 ol7_latest 9.5 M
wxBase3 aarch64 3.0.2-15.el7 ol7_developer_EPEL 1.0 M
wxGTK3 aarch64 3.0.2-15.el7 ol7_developer_EPEL 4.5 M

Transaction Summary
========================================================================================================================================
Install 2 Packages (+6 Dependent packages)

Total download size: 17 M
Installed size: 70 M
Is this ok [y/d/N]: y
Downloading packages:
(1/8): SDL-1.2.15-14.el7.aarch64.rpm | 191 kB 00:00:01
(2/8): libXScrnSaver-1.2.2-6.1.el7.aarch64.rpm | 23 kB 00:00:03
(3/8): libmspack-0.5-0.7.alpha.el7.aarch64.rpm | 59 kB 00:00:01
(4/8): boinc-client-7.14.2-17.el7.aarch64.rpm | 583 kB 00:00:04
(5/8): boinc-manager-7.14.2-17.el7.aarch64.rpm | 1.2 MB 00:00:04
(6/8): wxBase3-3.0.2-15.el7.aarch64.rpm | 1.0 MB 00:00:02
(7/8): webkitgtk3-2.4.11-2.el7.aarch64.rpm | 9.5 MB 00:00:04
(8/8): wxGTK3-3.0.2-15.el7.aarch64.rpm | 4.5 MB 00:00:04
----------------------------------------------------------------------------------------------------------------------------------------
Total 1.8 MB/s | 17 MB 00:00:09
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : wxBase3-3.0.2-15.el7.aarch64 1/8
Installing : libXScrnSaver-1.2.2-6.1.el7.aarch64 2/8
Installing : boinc-client-7.14.2-17.el7.aarch64 3/8
Installing : SDL-1.2.15-14.el7.aarch64 4/8
Installing : webkitgtk3-2.4.11-2.el7.aarch64 5/8
Installing : libmspack-0.5-0.7.alpha.el7.aarch64 6/8
Installing : wxGTK3-3.0.2-15.el7.aarch64 7/8
Installing : boinc-manager-7.14.2-17.el7.aarch64 8/8
Verifying : libXScrnSaver-1.2.2-6.1.el7.aarch64 1/8
Verifying : libmspack-0.5-0.7.alpha.el7.aarch64 2/8
Verifying : wxGTK3-3.0.2-15.el7.aarch64 3/8
Verifying : boinc-client-7.14.2-17.el7.aarch64 4/8
Verifying : boinc-manager-7.14.2-17.el7.aarch64 5/8
Verifying : wxBase3-3.0.2-15.el7.aarch64 6/8
Verifying : webkitgtk3-2.4.11-2.el7.aarch64 7/8
Verifying : SDL-1.2.15-14.el7.aarch64 8/8

Installed:
boinc-client.aarch64 0:7.14.2-17.el7 boinc-manager.aarch64 0:7.14.2-17.el7

Dependency Installed:
SDL.aarch64 0:1.2.15-14.el7 libXScrnSaver.aarch64 0:1.2.2-6.1.el7 libmspack.aarch64 0:0.5-0.7.alpha.el7
webkitgtk3.aarch64 0:2.4.11-2.el7 wxBase3.aarch64 0:3.0.2-15.el7 wxGTK3.aarch64 0:3.0.2-15.el7

Complete!
[root@rpi3 ~]#

Once the binaries are installed, start and enable the services via systemctl start boinc-client and systemctl enable boinc-client:

[root@rpi3 ~]# systemctl start boinc-client
[root@rpi3 ~]# systemctl enable boinc-client
Created symlink from /etc/systemd/system/multi-user.target.wants/boinc-client.service to /usr/lib/systemd/system/boinc-client.service.
[root@rpi3 ~]#

As a last step, create a symbolic link for the RPC password file for the user via . Note, this shouldn’t be strictly necessary and on Raspbian the BOINC manager works fine without this step, but on Oracle Linux (and I assume Red Hat and Fedora as well) this step is necessary for the manager to be able to connect to the client.

[root@rpi3 ~]# ln -s /var/lib/boinc/gui_rpc_auth.cfg $HOME/
[root@rpi3 ~]#

Setting up your science project

Once BOINC is installed, you will have to start the BOINC manager, the graphical tool to manage your projects. You can do this either via X11 or directly on your Raspberry Pi desktop. Open a terminal, export your $DISPLAY variable in case you go for the X11 option, and type boincmgr. BOINC manager will automatically ask you to add the project(s) that you want to work on.

Pick the project you would like to contribute to and click through the wizard to add the project to your BOINC client.

Once added, you should soon see the analysis to start.

BOINC also gives you an advanced view where you can see a bit more, you can find that under View/Advanced View...




Uninstalling BOINC

Unfortunately, the BOINC uninstall process is not as clean as I expected, hence I thought it makes sense to cover this part as well.

Uninstalling BOINC on Raspbian

The first step to uninstall BOINC is to remove the packages that have been installed. This is easily done via sudo apt-get remove boinc-client boinc-manager:

$ sudo apt-get remove boinc-client boinc-manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libboinc7 libwxbase3.0-0v5 libwxgtk-webview3.0-gtk3-0v5 libwxgtk3.0-gtk3-0v5
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
boinc-client boinc-manager
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 5,881 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 160373 files and directories currently installed.)
Removing boinc-manager (7.14.2+dfsg-3) ...
Removing boinc-client (7.14.2+dfsg-3) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.31.4-3) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for desktop-file-utils (0.23-4) ...
$

Next, run sudo apt autoremove to remove packages that are installed but no longer needed:

$ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
libboinc7 libwxbase3.0-0v5 libwxgtk-webview3.0-gtk3-0v5 libwxgtk3.0-gtk3-0v5
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 17.5 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 160270 files and directories currently installed.)
Removing libboinc7:armhf (7.14.2+dfsg-3) ...
Removing libwxgtk-webview3.0-gtk3-0v5:armhf (3.0.4+dfsg-8) ...
Removing libwxgtk3.0-gtk3-0v5:armhf (3.0.4+dfsg-8) ...
Removing libwxbase3.0-0v5:armhf (3.0.4+dfsg-8) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
$

Next, you will have to clean up the files that BOINC left behind, such as your project files and preferences.

sudo rm -r "$HOME/BOINC Manager-pi"
sudo rm -r "$HOME/.BOINC Manager"
sudo rm -r "$HOME/.BOINC"
sudo rm -r "$HOME/.cache/boincmgr"
sudo rm -r /etc/boinc-client
sudo rm -r /etc/init.d/boinc-client
sudo rm -r /etc/default/boinc-client
sudo rm -r /etc/rc0.d/K01boinc-client
sudo rm -r /etc/rc1.d/K01boinc-client
sudo rm -r /etc/rc2.d/S01boinc-client
sudo rm -r /etc/rc3.d/S01boinc-client
sudo rm -r /etc/rc4.d/S01boinc-client
sudo rm -r /etc/rc5.d/S01boinc-client
sudo rm -r /etc/rc6.d/K01boinc-client
sudo rm -r /etc/systemd/system/boinc-client.service
sudo rm -r /etc/systemd/system/multi-user.target.wants/boinc-client.service
sudo rm -r /etc/X11/Xsession.d/36x11-common_xhost-boinc
sudo rm -r /var/lib/boinc-client
sudo rm -r /var/lib/systemd/deb-systemd-helper-masked/boinc-client.service
sudo rm -r /var/lib/systemd/deb-systemd-helper-enabled/boinc-client.service.dsh-also
sudo rm -r /var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/boinc-client.service

And as the last step, you have to remove the boinc user from your system.

sudo userdel boinc

Uninstalling BOINC on Oracle Linux

Just like with Raspbian, the first step it to remove the binaries via yum remove boinc-client boinc-manager:

[root@rpi3 ~]# yum remove boinc-client boinc-manager
Resolving Dependencies
--> Running transaction check
---> Package boinc-client.aarch64 0:7.14.2-17.el7 will be erased
---> Package boinc-manager.aarch64 0:7.14.2-17.el7 will be erased
--> Finished Dependency Resolution
Dependencies Resolved

=============================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================
Removing:
boinc-client aarch64 7.14.2-17.el7 @ol7_developer_EPEL 1.9 M
boinc-manager aarch64 7.14.2-17.el7 @ol7_developer_EPEL 5.0 M

Transaction Summary
=============================================================================================================================
Remove 2 Packages

Installed size: 6.9 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : boinc-manager-7.14.2-17.el7.aarch64 1/2
Erasing : boinc-client-7.14.2-17.el7.aarch64 2/2
Verifying : boinc-client-7.14.2-17.el7.aarch64 1/2
Verifying : boinc-manager-7.14.2-17.el7.aarch64 2/2

Removed:
boinc-client.aarch64 0:7.14.2-17.el7 boinc-manager.aarch64 0:7.14.2-17.el7

Complete!
[root@rpi3 ~]#

Next, you will have to clean up the files that BOINC left behind, such as your project files and preferences.

rm -rf "$HOME/.BOINC"
rm -rf "$HOME/BOINC Manager-root"
rm -rf "$HOME/.BOINC Manager"
rm -rf "$HOME/gui_rpc_auth.cfg"
rm -rf /var/lib/boinc

And as the last step, you have to remove the boinc user from your system.

userdel boinc

Now you have successfully removed BOINC from your Raspberry Pi.

4 thoughts on “Turning your Raspberry Pi into a science research station via BOINC

  1. Is this an application that turns your device into a node in a distributed research network? Sounds neat I guess, but I’d like it better if it allowed you to start your own research projects. A home scientific computing suite, if you will.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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