FEDERATION-SETUP.md
Federation enables peer-to-peer synchronization of beads databases between multiple workspaces using Dolt remotes. Each workspace maintains its own database while sharing work items with configured peers.
Federation uses Dolt's distributed version control capabilities to sync issue data between independent teams or locations. Key benefits:
Edit .beads/config.yaml or ~/.config/bd/config.yaml:
federation:
remote: dolthub://myorg/beads # Primary remote (optional)
sovereignty: T2 # Data sovereignty tier
Or via environment variables:
export BD_FEDERATION_REMOTE="dolthub://myorg/beads"
export BD_FEDERATION_SOVEREIGNTY="T2"
| Tier | Description | Use Case |
|---|---|---|
| T1 | No restrictions | Public data |
| T2 | Organization-level | Regional/company compliance |
| T3 | Pseudonymous | Identifiers removed |
| T4 | Anonymous | Maximum privacy |
Use bd federation add-peer to register remote peers:
bd federation add-peer <name> <endpoint>
origin, main, master, HEAD| Format | Example | Description |
|---|---|---|
| DoltHub | dolthub://org/repo | DoltHub hosted repository |
| Google Cloud | gs://bucket/path | Google Cloud Storage |
| Amazon S3 | s3://bucket/path | Amazon S3 |
| Local | file:///path/to/backup | Local filesystem |
| HTTPS | https://host/path | HTTPS remote |
| SSH | ssh://host/path | SSH remote |
| Git SSH | git@host:path | Git SSH shorthand |
# Add a staging environment on DoltHub
bd federation add-peer staging dolthub://myorg/staging-beads
# Add a cloud backup
bd federation add-peer backup gs://mybucket/beads-backup
bd federation add-peer backup-s3 s3://mybucket/beads-backup
# Add a local backup
bd federation add-peer local file:///home/user/beads-backup
# Add a partner organization
bd federation add-peer partner-town dolthub://partner-org/beads
For scripting, use the --json flag:
bd --json federation add-peer staging dolthub://myorg/staging-beads
# {"name":"staging","endpoint":"dolthub://myorg/staging-beads","status":"added"}
Check stored peers:
bd config list | grep federation.peers
add-peer registers a Dolt remote (similar to git remote add)Issues track their SourceSystem to identify which federated system created
them. This enables proper attribution and trust chains across organizations.
Remote connectivity is validated on first push/pull operation, not when adding the peer. This allows configuring remotes before infrastructure is ready.
The following operations have infrastructure support but are not yet exposed as commands:
bd federation list-peers - List configured peersbd federation push <peer> - Push to specific peerbd federation pull <peer> - Pull from specific peerbd federation sync <peer> - Bidirectional syncFederation commands require the Dolt backend with direct database access. Ensure you have the Dolt backend configured for federation operations.
A peer with that name is already configured. Use a different name or check
existing peers with bd config list | grep federation.peers.
Ensure your endpoint matches one of the supported formats above. The scheme
must be one of: dolthub://, gs://, s3://, file://, https://, ssh://,
or git SSH format (git@host:path).
docs/CONFIG.md for all federation settingscmd/bd/federation.gointernal/storage/versioned.gointernal/storage/dolt/store.go