> ## Documentation Index
> Fetch the complete documentation index at: https://number0-improve-contact.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Connect two iroh endpoints in five minutes

In five minutes you'll have two iroh endpoints connecting over the [iroh-ping](https://github.com/n0-computer/iroh-ping) protocol. Clone the repo, run the included quickstart example as a receiver in one terminal and a sender in another, and watch the round-trip time print.

### 1. Install Rust

```bash theme={null}
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

### 2. Clone iroh-ping

```bash theme={null}
git clone https://github.com/n0-computer/iroh-ping
cd iroh-ping
```

### 3. Run the receiver

```bash theme={null}
cargo run --example quickstart receiver
```

The receiver prints a ticket. Copy it.

### 4. Run the sender

In another terminal:

```bash theme={null}
cargo run --example quickstart sender <TICKET>
```

Replace `<TICKET>` with the ticket from the receiver. The sender will print the round-trip time once the connection succeeds.

### 5. See your metrics (optional)

Now that ping is working, hook the example up to Iroh Services to watch connectivity metrics like direct data rate. Get an API key from your project's **Settings → API Keys** tab, export it, and rerun the example:

```bash theme={null}
export IROH_SERVICES_API_SECRET=<your-api-key>
```

The example picks up the key automatically and starts reporting metrics. See [API Keys](/iroh-services/access) for the full walkthrough, or [View metrics](/iroh-services/quickstart) to read the dashboard.

## Next steps

Integrate iroh into your own app by following one of the tutorials below.

<Card title="Connect two endpoints" icon="rocket" href="/connect-two-endpoints" horizontal>
  Build the receiver/sender ping app from scratch and learn how iroh-ping, tickets, and routers fit together.
</Card>

<Card title="View metrics" icon="chart-line" href="/iroh-services/quickstart" horizontal>
  See your direct data rate and other connectivity metrics in the dashboard.
</Card>

<Card title="Add a relay" icon="server" href="/add-a-relay" horizontal>
  Configure dedicated relays for your endpoints and learn why they matter for production.
</Card>
