Configure your endpoint
Once you have one or more relay URLs, configure your endpoint to use them: Your dedicated relays require authentication by default. Your endpoint authenticates to them with your project’s API key. Theiroh_services::preset() builder handles
this for you: it mints a short-lived access token scoped to your endpoint’s key
and configures the endpoint to use your relays.
Add the iroh-services crate to your project:
Custom relay URLs are available on Pro and Enterprise projects. On a free project, pass your API key to the preset without
relays(...) to authenticate against the public relays and surface your relay traffic on the dashboard.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
Get a relay
You have two paths. Pick managed if you want a relay running today. But you’re never locked in! You can always self-host later if you want.Deploy a managed relay
Sign up for Iroh Services and spin up a managed relay for your project in minutes.
Self-host a relay
Run the
iroh-relay binary on a server with a public IP and DNS name. Automatic TLS via ACME is built in.