Skip to main content
Federation trust controls which P2P peers your node accepts provider and agent records from. In open mode, any connected peer can contribute records to your local registry. In trusted mode, only peers you explicitly list are allowed to push registry data — all others are silently ignored for gossip and backfill, while still remaining reachable for direct agent invocations.

Open Federation (Default)

In open mode, any peer that connects to your node can gossip and backfill provider and published agent records. Records are still validated against your local registry rules before being accepted.
Open mode is the default. If you omit SERVICENET_FEDERATION_MODE, your node behaves as if it is set to open.

Trusted Federation

In trusted mode, your node only merges registry data from peers listed in SERVICENET_FEDERATION_TRUSTED_PEERS. Peers not on the list can still connect, but your node ignores their provider and agent records.
Provide each peer as an Iroh EndpointId (the same ID printed in the peer’s startup logs). Separate multiple entries with commas — no spaces.
In trusted mode, peers not in the trusted list are still reachable for direct agent invocations through the HTTP API. Only their inbound gossip and backfill records are ignored — your node will not merge their provider or agent data into the local registry.

Choosing a Federation Mode

Use this table to pick the right mode for your deployment:

Open mode

Best for nodes that want to participate fully in the public ServiceNet — accepting records from all verified peers and contributing to the shared registry.

Trusted mode

Best for official entry nodes, consortium deployments, or any operator who needs explicit control over which peers can influence their local registry state.

Federation Environment Variables

In trusted mode, if you leave SERVICENET_FEDERATION_TRUSTED_PEERS empty, your node will reject registry data from every peer — effectively running in read-only P2P mode for the registry. Ensure you list at least one trusted peer before enabling trusted federation in production.

Combining Federation with P2P Setup

Federation mode is enforced on top of the P2P transport layer. Set up P2P connectivity first, then layer in federation policy:
See P2P Setup for details on bootstrap peers, listen addresses, and relay fallback.