Back to Home

Documentation

Technical Documentation

Everything you need to deploy, configure, and operate a Sangrah federation node. Your data never leaves your machine.

Quick Start

Join a federation in 4 steps

The platform operator registers your organisation and sends you two certificate files. That's all you need — no cloud account, no Kubernetes, no Docker.

01

Clone the daemon

Clone the federated learning client daemon from GitHub and build the Rust binary.

View on GitHub →
git clone https://github.com/Blazearth/fed-learn-model.git
cd fed-learn-model/federated_learning_model
cargo build --release
02

Add your certificates

The platform operator provides you with two files. Place them in a certs/ directory.

mkdir -p /etc/fl-daemon/certs
# Copy the two files the operator sends you:
cp org-<your-id>.pem /etc/fl-daemon/certs/
cp org-<your-id>.key /etc/fl-daemon/certs/
03

Configure your node

Create a config.toml pointing to your data and certificates.

# /etc/fl-daemon/config.toml
organization_id = "org-<your-id>"

[coordinator]
base_url = "https://coordinator.fed-learn.online"
poll_interval_secs = 10

[certificates]
cert_path = "/etc/fl-daemon/certs/org-<your-id>.pem"
cert_dir  = "/etc/fl-daemon/certs/"

[[models]]
model_id    = "fraud-detection-v2"
data_source = "/data/your_data.parquet"
04

Start training

Run the daemon. It automatically polls the coordinator, trains locally, and submits encrypted updates.

RUST_LOG=info ./target/release/fl-client-daemon \
  /etc/fl-daemon/config.toml

# The daemon will:
# → Poll coordinator every 10s for active epochs
# → Download the global model from S3
# → Train locally on your data (data never leaves)
# → Submit encrypted model update
# → Wait for the next round

After step 4 — automatic

Once the daemon is running, everything is fully automatic. The coordinator manages the training schedule. When enough organisations have submitted (the threshold), the coordinator launches an aggregation job on AWS Fargate, merges all encrypted updates using FedAvg, publishes the new global model to S3, and starts the next epoch. Your daemon picks it up automatically on the next poll. The Sangrah dashboard reflects all of this in real time.

API Reference

Coordinator REST API

All endpoints require a valid mTLS client certificate. Base URL: https://coordinator.fed-learn.online

MethodEndpointDescription
GET/api/healthCoordinator health and timestamp
GET/api/epochs/active?model_id=<id>Active epoch metadata, ε/δ, participants
GET/api/audit?model_id=<id>&limit=50Immutable hash-chain audit entries
POST/api/updates/upload-urlGet a pre-signed S3 URL to upload a model update
POST/api/updates/completeNotify coordinator that your update is ready
POST/api/models/download-urlGet a pre-signed S3 URL to download the global model
Note

The dashboard BFF proxies all of these internally — your browser never touches the coordinator directly. All API calls from the Sangrah UI are made server-side using the operator's mTLS certificate.