grid-node
The node half of GridKeeper. Runs on each machine that has BOINC and/or Folding@home (FAHClient) installed, reports their status to GridKeeper, and executes start/stop commands issued from the hub's dashboard.
See ../docs/REQUIREMENTS.md for the full design.
Install (Ubuntu)
cd node
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
Make sure your user can control BOINC locally:
sudo adduser "$USER" boinc # lets boinccmd talk to the local BOINC client
# log out/in (or `newgrp boinc`) for the group change to take effect
FAHClient (fah-client 8.x)'s local API is open to any local user by
default, so no extra group is needed for Folding@home.
Run + pair (LAN, the normal path)
grid-node run works before this machine has ever been paired: if there's
no config yet, it enters pairing mode automatically instead of erroring.
grid-node run
It will print a 6-digit code and advertise itself on the local network via mDNS:
=== Pairing code: 482913 (valid 10 min) -- enter this in the GridKeeper dashboard ===
On the hub's dashboard, the machine shows up under "Discovered on your
network" within a few seconds. Type the code into that card and submit --
the hub dials this machine directly over the LAN, verifies the code,
and hands it a bearer token. The same grid-node run process then
continues straight into normal operation, no restart needed.
If you're at the machine but the code has scrolled off, or you're checking on it via SSH without wanting to tail logs:
grid-node status
As a systemd service (recommended for real use -- pairing mode works the
same way under systemd, just check journalctl for the code):
sudo cp packaging/systemd/grid-node.service "/etc/systemd/system/grid-node@$USER.service"
sudo systemctl daemon-reload
sudo systemctl enable --now "grid-node@$USER"
journalctl -u "grid-node@$USER" -f
Enroll manually instead (no LAN / no mDNS)
For a machine that isn't on the same LAN segment as the hub (e.g. over a VPN, or mDNS is blocked on your network), pair with a hub-generated token instead -- the admin mints the token on the dashboard and it's typed into the node this time, the reverse of the LAN flow above:
grid-node enroll --hub http://<hub-host>:8000 --token <pairing-token> --name "<machine-name>"
This writes ~/.config/grid-node/config.toml directly (mode 600 -- it
holds a bearer token) and detects which backends (BOINC/FAH) are present,
skipping pairing mode on the next grid-node run.
Local status page (optional, off by default)
Nodes run headless by design -- fine for a bulk-enrolled lab machine managed from the dashboard, less fine if someone's sitting at that PC and wants to see what it's doing without going to find the dashboard. Turn on a small read-only status page, local to that machine only:
grid-node local-ui enable # optionally: --port 8420 (default)
grid-node local-ui status # check whether it's on
grid-node local-ui disable
Takes effect the next time grid-node run starts. Reachable only at
http://127.0.0.1:<port>/ on that same machine (never the LAN) -- shows
connection state, backend status/progress, live CPU/RAM/temperature, and
schedule state, refreshing every 10s. Read-only: no controls here,
pausing/resuming stays a hub-dashboard action.
Notes
- Runs fine on the same machine as GridKeeper -- see "Running the node on the same machine as the hub" in the top-level README for the recommended setup (separate venvs, use the manual token flow instead of LAN discovery since you don't need it locally).
- The node only controls BOINC/FAH -- it does not install them. Install
boinc-client(or the BOINC snap) and/or FAHClient yourself first. It can, however, attach/detach a BOINC project once BOINC itself is installed -- from the dashboard, per machine (needs that project's account key, from the project's "your account" web page; BOINC doesn't create accounts for you). FAH has no per-project concept -- the closest equivalent, also settable from the dashboard, is picking acause(e.g. cancer, COVID-19) and optionally linking an account (username/ team/passkey) or folding anonymously. - If neither is detected at startup, the node still connects and reports an empty status; re-run detection by restarting the node after installing BOINC/FAH.
- The BOINC backend shells out to
boinccmd; the FAH backend speaks JSON over WebSocket to FAHClient's local API directly (ws://127.0.0.1:7396/api/websocket, the currentfah-client8.x -- not the older FAHClient v7 socket protocol) -- see the docstrings ingrid_node/backends/boinc.pyandfah.pyif their output format differs on your installed version and the parser needs adjusting. - Pairing mode opens an unauthenticated (apart from the 6-digit code)
HTTP listener on an OS-assigned port, bound to all interfaces, plus an
mDNS advertisement -- fine on a trusted home/lab LAN, not something to
expose past a firewall. See "LAN discovery & 6-digit code pairing" in
docs/REQUIREMENTS.mdfor the exact security posture. - The mDNS registration in
pairing.pyhas been confirmed working (a node advertising and a hub discovering/pairing it on the same host) -- not yet tested across two genuinely separate machines. If the hub's "Discovered on your network" list doesn't pick up a waiting node across a real LAN, checkavahi-browse -a(or similar) to confirm the service is actually being advertised before assuming the app logic is wrong. - CPU%, RAM%, and (Linux-only, best-effort) temperature are collected via
psutiland sent with every status update, feeding the dashboard's "Live metrics" graphs -- nothing to configure, it's automatic once the node is running. - Schedule policies pushed from the dashboard ("Fleet schedule" / a
machine's own "Schedule" section) are applied automatically: BOINC gets
its own native preferences file rewritten (
boinccmd --set_global_prefs_override), FAH gets paused/resumed by the node itself on a 60s check loop. The policy push/persist/reconnect path is confirmed working, and so are the underlying commands each side uses (BOINC'ssuspend_all/resume_all, FAH'spause/unpause) against live installs -- what's not yet verified isapply_schedule()'sglobal_prefs_override.xmlactually changing BOINC's real Activity behavior, or watching FAH's 60s enforcement loop cross a real hours/idle boundary live.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file grid_node-0.1.0.tar.gz.
File metadata
- Download URL: grid_node-0.1.0.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a73835a7483506218df68a199bc6170e555d563ac2342a230eea0a60ce652fe
|
|
| MD5 |
c3d51bef269be82b1b51d599b0b9cdc6
|
|
| BLAKE2b-256 |
16c88d3f79359287f3020e4052e015f04b0b51c6a6894b8111a3a1c565522baa
|
File details
Details for the file grid_node-0.1.0-py3-none-any.whl.
File metadata
- Download URL: grid_node-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
569e9ed856b2e3363a7e8c28e72461645129ca2c4a7608e6e9d2627008c462d2
|
|
| MD5 |
cf3cd151431f075a0b6835a447c98ff2
|
|
| BLAKE2b-256 |
d0410a786449047767bbc2714bc91dc2653c07a483ffd94a8ecd713a9e758367
|