Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions add-a-relay.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ import RelayPresetConfig from '/snippets/relay-preset-config.mdx';

By default, iroh endpoints use the public relays maintained by [n0.computer](https://n0.computer) to facilitate connections when direct peer-to-peer links aren't possible. The public relays are great for development and testing, but production deployments should run their own.

## Configure your endpoint

Once you have one or more relay URLs, configure your endpoint to use them:

<RelayPresetConfig />

Relays you self-host outside of Iroh Services are configured directly with `RelayMode::Custom`; see [Dedicated Infrastructure](/deployment/dedicated-infrastructure).

## Why use your own relay?

Running dedicated relays gives you:
Expand Down Expand Up @@ -45,14 +53,6 @@ you're never locked in! You can always self-host later if you want.
Run the `iroh-relay` binary on a server with a public IP and DNS name. Automatic TLS via ACME is built in.
</Card>

## Configure your endpoint

Once you have one or more relay URLs, configure your endpoint to use them:

<RelayPresetConfig />

Relays you self-host outside of Iroh Services are configured directly with `RelayMode::Custom`; see [Dedicated Infrastructure](/deployment/dedicated-infrastructure).

## Recommended setup

For production, 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.
Expand Down
Loading
Loading