Relays are servers that temporarily route encrypted traffic until a direct, P2P connection is feasible. Once this direct path is set up, the relay server steps back, and the data flows directly between devices. This approach allows Iroh to maintain a secure, low-latency connection, even in challenging network situations. There are situations where a direct connection can’t be established, and in those cases traffic falls back to running through the relay. Relay servers do not have access to the data being transmitted, as it’s encrypted end-to-end. Relays serve two roles in iroh:Documentation Index
Fetch the complete documentation index at: https://docs.iroh.computer/llms.txt
Use this file to discover all available pages before exploring further.
- NAT Traversal. When two endpoints first connect, they exchange network information through the relay to attempt a direct P2P connection.
- Encrypted traffic fallback. If a direct connection can’t be established (due to strict NATs, firewalls, or other network conditions), traffic flows through the relay instead.
Deploy your own relay
Deploy a dedicated relay
Sign up for Iroh Services and spin up a managed relay for your project in minutes.
Why relays are better
Unlike traditional servers, relay servers are stateless. They don’t store your application data; they just facilitate connections.- No database synchronization. Nothing to replicate across relay instances.
- No state migration. When a relay goes down, clients reconnect to another with no data loss.
- Simple scaling. Spin relay instances up or down like any lightweight service.
- Automatic failover. Iroh can attempt to connect to multiple relays automatically; as long as one is reachable, your peers find each other.
Public relays
Iroh hardcodes a set of public relays provided by n0.computer, free to use. Public relays:- Rate-limit traffic to prevent abuse
- Carry no uptime or performance guarantees
- Are shared across all iroh developers worldwide
Dedicated relays
Dedicated relays are relay servers provisioned exclusively for your project, either managed through Iroh Services or self-hosted. They offer:- Isolation: no noisy neighbors; your traffic is yours alone
- Uptime guarantees: SLAs available via Iroh Services
- Version locking: stay on a specific iroh version or run blue/green deployments
- Multi-region & multi-cloud: deploy relays across regions and providers for resilience
Deploy your own relay
Deploy a dedicated relay
Sign up for Iroh Services and spin up a managed relay for your project in minutes.