Skip to content

Exottiiik/BOINC-RPC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BOINC - Discord Rich Presence

A lightweight middleware that connects BOINC distributed computing status to Discord Rich Presence.

It displays your current BOINC workload directly in your Discord profile, including :

  • Number of active tasks
  • Task progress
  • Project metadata (name)
  • Task runtime

This project acts as a bridge between BOINC’s local RPC interface and Discord’s Rich Presence IPC system.


Features

  • Cross-platform support (Linux / Windows)
  • Automatic BOINC RPC authentication (MD5 nonce handshake)
  • Active task monitoring with rotation display (5 tasks running = 5 taks rotation ~15s each one)
  • Real-time progress and elapsed time tracking
  • Multi-Host support (monitor multiple local or remote BOINC nodes (in the same LAN) simultaneously)
  • Automatic reconnection (BOINC / Discord with some latency yeah)
  • Lightweight and low resource usage
  • Fully local (no external API required)

Requirements

this may vary based on your operating system and the used installation method so, don't worry about this right now and skip to Installation !

  • Python 3.8+
  • BOINC client running locally
  • Discord desktop application (Rich Presence enabled)

Python dependencies:

pip install pypresence

BOINC Setup

You should refer to :

Linux

Refer to the official BOINC documentation for installation details.

Windows

BOINC must be installed and running as a service or background process.

Ensure the RPC file exists if you change it, take note of the path :

C:\ProgramData\BOINC\gui_rpc_auth.cfg

Installation

Windows (easy install)

The easiest way to use this tool on Windows is to use the standalone installer. You do not need to install Python, since it is provided by the installer.

  1. Go to the Releases tab on the right side of this GitHub page.
  2. Download the latest BOINC-RPC-Windows-Installer.exe.
  3. Run the installer and follow the setup wizard.
  4. Note: Windows SmartScreen or your Antivirus might flag the installer because it is brand new and not digitally signed by a paid corporate certificate. This is a false positive common with open-source software. Click "More info" -> "Run anyway". On hardened configurations (not default), some errors may occur since specific permissions are needed.

The installer will automatically set up the embedded environment, configure the BOINC paths, and create a silent Scheduled Task so the RPC starts automatically when you log into Windows.

Linux (automated bash script)

For Linux users, an interactive bash script is provided to automate the creation of the Python virtual environment and the setup of the systemd background service.

Prerequisites:

  1. Python venv: ensure you have the virtual environment package installed. On Debian/Ubuntu systems, run sudo apt install python3-venv before executing the script.
  2. Systemd : the auto-start functionality strictly relies on systemd running in user mode. Do not run the installation script as root (do not use sudo), as the Rich Presence IPC socket needs to communicate with your local user's Discord instance.
  3. Flatpak/Snap Users : the script defaults to the standard package manager path for BOINC (/var/lib/boinc/gui_rpc_auth.cfg). If you installed BOINC via Flatpak or Snap, you will need to manually locate this file inside your containerized application folder and provide the custom path when the script prompts you.

Run the installer:

Go to the Releases tab, download the Linux archive, extract it, and run the script:

# Download the latest release or use wget (you may need to replace v1.0.0 with the current version)
wget [https://github.com/Exottiiik/BOINC-RPC/releases/download/v1.0.0/BOINC-RPC-Linux-v2.0.0.tar.gz](https://github.com/Exottiiik/BOINC-RPC/releases/download/v1.0.0/BOINC-RPC-Linux-v2.0.0.tar.gz)
# Once downloaded manually or got via wget
tar -xzvf BOINC-RPC-Linux-v2.0.0.tar.gz
cd BOINC-RPC-Linux
chmod +x install.sh
./install.sh

NOTE : you may need to adapt these lines with your own paths and environment...


Uninstallation

Windows

  1. Open Windows Settings > Apps > Installed Apps.
  2. Search for BOINC Discord RPC.
  3. Click Uninstall. The uninstaller will automatically stop the daemon, remove the background task, and clean up all files, including the embedded Python environment.

Linux

If you used the automated script, run the following commands to stop the service and remove the installation folder or use the provided script :

systemctl --user stop boinc-discord.service
systemctl --user disable boinc-discord.service
rm -rf ~/.config/systemd/user/boinc-discord.service
rm -rf ~/BOINC-RPC
# Optionally remove the config files:
rm -rf ~/.config/boinc-rpc

Manual Installation / Development

If you prefer to run the script from source manually, follow these steps :

1. Install requirements

Requires Python 3.8+.

pip install -r requirements.txt

2. Configuration

The application uses a JSON configuration file. Upon the first launch, the script will automatically create a default config.json file in your user directory.

Linux: ~/.config/boinc-rpc/config.json Windows: %USERPROFILE%\.config\boinc-rpc\config.json

By default, it is configured to listen to your local BOINC client. Open this file to edit your password_path or to add your own discord_client_id.

3. Multi-Host Configuration (Advanced)

To monitor multiple BOINC nodes across your local network, open the config.json file. You can add as many nodes as you want in the "nodes" array.

For remote machines, you must:

  1. Set <allow_remote_gui_rpc>1</allow_remote_gui_rpc> in their BOINC cc_config.xml file.
  2. Provide the raw password directly in the "password" field of the JSON instead of using the "password_path".

Example of a multi-node configuration:

{
  "discord_client_id": "YOUR_CLIENT_ID",
  "update_interval": 15,
  "debug_mode": false,
  "nodes": [
    {
      "name": "Localhost",
      "host": "127.0.0.1",
      "port": 31416,
      "password_path": "C:\\ProgramData\\BOINC\\gui_rpc_auth.cfg",
      "password": ""
    },
    {
      "name": "Ubuntu Server",
      "host": "192.168.1.50",
      "port": 31416,
      "password_path": "",
      "password": "my_remote_secret"
    }
  ]
}

4. Run

python src/boinc_rpc_daemon.py

Note : you need to be in the right folder, depending of you installation path, etc.


Architecture

BOINC RPC Layer

  • TCP connection (31416)
  • XML-based protocol
  • MD5 authentication

Python Middleware

  • XML parsing
  • Task filtering
  • State normalization
  • Safe fallback handling

Discord IPC Layer

  • pypresence integration
  • Rich Presence updates
  • Automatic reconnect

Discord Application

This project uses a Discord Application to display Rich Presence information.

You can customize the appearance (name, images, and assets) by creating your own application on the Discord Developer Portal:

https://discord.com/developers/applications

Once created, replace the default DISCORD_CLIENT_ID in your config.json file with your own Application ID.

This allows you to :

  • Change the application name shown in Discord
  • Customize Rich Presence assets (images, icons, etc.)
  • Personalize the displayed activity layout

You can also modify the source code if you want to adjust what is displayed (task details, progress format, rotation behavior, etc.).


Limitations

  • BOINC XML structure varies across versions
  • Some fields may be missing or reset depending on client state
  • Project names derived from URL (not always clean but did the best)
  • Discord rate limits apply to update frequency
  • GPU reporting depends on BOINC + driver stack behavior Fedora issue with AMD GPU or something I personnaly experienced
  • Alternative Discord clients (like Vesktop) can cause issues with the RPC most probably related to Flatpak installation and permissions.
  • Multi-nodes doesn't mean, multi-LANs. Single LAN configuration only...

Notes

This project was initially developed as a personal middleware between BOINC and Discord. It prioritizes simplicity and real-time feedback over strict enterprise architecture.

Suitable for :

  • personal monitoring
  • BOINC learning
  • Discord IPC experimentation

And maybe it needs some adjustment to work nicely with your installation but in most case, it should work fine.


License

This project is released under the MIT License.

You are free to use, modify, and distribute this software, provided that the original license notice is included.

This project is provided "as is", without warranty of any kind, expressed or implied. The author is not responsible for any issues arising from its use.

About

BOINC Discord RPC is a lightweight, cross-platform middleware that bridges the BOINC distributed computing client with Discord’s Rich Presence. It allows users to automatically showcase their active scientific workloads including : task progress, runtime, and project metadata, directly on their Discord profile in real-time.

Resources

License

Stars

Watchers

Forks

Contributors