Enable federation with a peer
You're an admin on your-host.example.com and you want to peer with
peer.acme.com. Both must agree.
1. Verify your /.well-known#
Hit your own descriptor first to make sure it's correct:
1 | |
Should look like:
1 2 3 4 5 6 7 8 9 10 11 | |
If this doesn't load: check that:
SCAIWAVE_SERVER_NAMEmatches the host name.- TLS is valid (peers verify cert chains by default).
- A federation key is provisioned. If
public_keyis empty, runscaiwave admin federation key generate.
2. Check the peer's descriptor#
1 | |
If the peer doesn't publish one, federation isn't possible.
3. Update your federation policy#
1 2 3 4 5 6 7 8 | |
default_mode options:
open— accept federation invites from any peer.invite_only— only accept invites where the peer is inallowed_peers.closed— refuse all federation.
4. Have the peer reciprocate#
The peer's admin runs the same setup pointed at your server. Both
sides need each other's descriptor; both sides need each other in
their respective allowed_peers lists (if either is in
invite_only mode).
5. Test with a federated DM#
1 2 3 4 | |
If this succeeds, the foreign user gets the invite in their notification panel. When they accept, the DM is operational.
6. Backfill#
If you want history to flow from the peer (e.g. you joined an already-existing room), the federation backfill endpoint pulls it:
1 2 | |
Pulls up to 1000 historical events from the peer's
/_scaiwave/federation/v1/rooms/{room_id}/backfill endpoint. Each
event is signature-verified before storage.
7. Monitor#
GET /v1/admin/federation/peers returns the active peer set with
last_seen and last_error columns:
1 2 3 4 5 6 7 8 9 10 11 | |
If last_error is set, traffic is failing. Common causes:
- Their
/.well-knownreturns a different public key than what you cached → key rotation. Refresh withPOST /v1/admin/federation/foreign/{participant_id}/refresh. - Their server is down → wait.
- Signature mismatch → check that both sides are on the same protocol version.
8. Rotate your federation key#
Federation keys rotate yearly. To rotate manually:
1 | |
Generates a new keypair, publishes the new public key on
/.well-known, and starts signing new events with it. Peers
auto-discover the new key on next event verification (with a 30-day
overlap window where both keys are accepted).
What can't be federated#
- Incognito rooms.
- Bridge rooms.
- Rooms with
room_type=sidekick. - Rooms whose owner tenant has federation disabled tenant-wide.
The federation endpoint refuses these with clear error codes.
Where to go next#
- Concepts: Federation.
- API: Federation.
- Join a federated room — user-side.