Skip to content
Open
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
4 changes: 2 additions & 2 deletions add-a-relay.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ you're never locked in! You can always self-host later if you want.
<Card
title="Self-host a relay"
icon="wrench"
href="https://github.com/n0-computer/iroh/tree/main/iroh-relay"
href="/iroh-services/relays/self-hosted"
>
Run the `iroh-relay` binary on a server with a public IP and DNS name. Automatic TLS via ACME is built in.
Run the `iroh-relay` binary or image on a server with a public IP and DNS name. Automatic TLS via ACME is built in.
</Card>

## Recommended setup
Expand Down
2 changes: 1 addition & 1 deletion deployment/dedicated-infrastructure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ using dedicated relays instead.
<Card
title="Self-host a relay"
icon="wrench"
href="https://github.com/n0-computer/iroh/tree/main/iroh-relay"
href="/iroh-services/relays/self-hosted"
>
Learn how to self-host a relay for your project.
</Card>
Expand Down
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@
"pages": [
"deployment/dedicated-infrastructure",
"iroh-services/relays/public",
"iroh-services/relays/managed"
"iroh-services/relays/managed",
"iroh-services/relays/self-hosted"
]
},
{
Expand Down
7 changes: 7 additions & 0 deletions iroh-services/relays/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,11 @@ Iroh Services lets you run dedicated relay servers for your project, no infrastr
>
Free shared relays built into iroh. No setup required. Development and hobby use only.
</Card>
<Card
title="Self-hosted"
icon="wrench"
href="/iroh-services/relays/self-hosted"
>
Learn how to self-host a relay for your project.
</Card>
</Columns>
46 changes: 46 additions & 0 deletions iroh-services/relays/self-hosted.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: "Self-hosted"
description: "Run your own relay"
---

> 🚨 **WARNING** 🚨 This guide is maintained by the community and may not reflect the most up-to-date relay deployment configuration at all times. Please feel free [to contribute patches](https://github.com/n0-computer/docs.iroh.computer) it if you see inconsistencies or have useful additions for the benefit of other relay operators.

## Documentation

The official in-repository documentation for self-hosting a relay is [here](https://github.com/n0-computer/iroh/tree/main/iroh-relay). Deeper technical documentation about the functioning of the relay is available on [`docs.rs`](https://docs.rs/iroh/latest/iroh/#relay-servers). Documentation of all possible configuration options for the relay is not published currently. For the time bring, you can [peek in the source code](https://github.com/n0-computer/iroh/blob/main/iroh-relay/src/main.rs) to see the entire configuration listing.

## Install

### Binary

The latest binaries are available on the `n0-computer/iroh` [Github releases page](https://github.com/n0-computer/iroh/releases).

### Image

An image published on `hub.docker.com` under the following namespace.

> `n0computer/iroh-relay`

All available tags are listed [here](https://hub.docker.com/r/n0computer/iroh-relay/tags).

## Basic configuration

The relay's configuration file is in TOML. The example configuration below is all that is required to get your relay online with automatic TLS via ACME. This configuration can be placed in `/etc/iroh-relay/config.toml` and run with `iroh-relay -c config.toml`.

```toml
http_bind_addr = "[::]:80"

[tls]
https_bind_addr = "[::]:443"
hostname = "relay.example.org"
cert_mode = "LetsEncrypt"
cert_dir = "/var/lib/iroh-relay/certs"
contact = "someone@somewhere.org"
```

## Simple health check

```bash
curl --noproxy '*' --fail --show-error \
https://relay.example.org/healthz
```
Loading