Skip to main content
By default, iroh endpoints use the public relays maintained by n0.computer to facilitate connections when direct peer-to-peer links aren’t possible. The public relays are for development and testing. We recommend that you do not use the public relays for production workloads. Use authenticated Shared Relays for growth and development. If you need more control over what version of iroh relay is used, no rate limits, and better uptime, use dedicated infrastructure instead.

Configure your endpoint

Once you have one or more relay URLs, configure your endpoint to use them: By default, your endpoint authenticates to Shared and Dedicated relays. The iroh-services preset uses your project API key locally to mint a token bound to the endpoint’s Endpoint ID and scoped to relay use. The token expires after 30 days by default; the project API key is not sent to the relay. See API Keys for details.
On a free project, omit the relay URLs. Then, the preset will use the n0 public relays instead. Relays you self-host outside of Iroh Services are configured directly with RelayMode::Custom; see Dedicated Infrastructure.

Why use your own relay?

Running dedicated relays gives you:
  • Isolation: your traffic isn’t mixed with other applications
  • Performance: relays close to your users reduce latency and improve NAT traversal success
  • Capacity: the shared public infrastructure is rate-limited
  • Redundancy: distribute relays across regions or cloud providers for failover
  • Compliance: keep relayed traffic inside your own network or jurisdiction
Iroh’s relay architecture is uniquely suited to multi-relay deployments because relays are stateless. Clients automatically fail over between relays in your list, so adding capacity or surviving an outage is just a matter of running more relay processes. See Dedicated Infrastructure for the deeper architecture story.

Get a relay

Choose Shared Relays for the standard Pro production setup. Choose dedicated infrastructure when you need isolation, version locking, or blue/green deployments. Iroh Services can manage it for you, or you can self-host.

Use Shared Relays

Use authenticated, multi-tenant production relays included with the Pro plan.

Deploy a dedicated relay

Add single-tenant capacity, custom regions, and version locking through Iroh Services.

Self-host a relay

Run the iroh-relay binary or image on a server with a public IP and DNS name. Automatic TLS via ACME is built in.
Place relays as close as possible to the users they serve. Shorter network paths reduce latency and improve response times, including time to first byte when a connection uses a relay. For dedicated production deployments, also run at least two relays in different geographic regions, for example one in North America and one in Europe. iroh clients try multiple relays automatically, so if one becomes unreachable they’ll seamlessly fall back to another. For a globally distributed user base, prioritize regions near your largest user populations while maintaining this regional redundancy. Each relay handles up to 60,000 concurrent connections. For larger deployments, run multiple relays per region or contact us to size up.

Learn more

For the full architecture story (why stateless relays make uptime management easier, how multiple relays provide resilience, and managed relay deployment steps), see Dedicated Infrastructure.