# Quick start

> From a fresh install to your first incident in the inbox, in about ten minutes.

Web page: https://infrainbox.app/docs/start/quickstart/

This walks through a self-hosted install: start the server, add a source, add a destination, and see an incident arrive end to end.

## 1. Start InfraInbox

```bash
docker compose up -d
```

See [Install with Docker Compose](https://infrainbox.app/docs/self-hosting/install.md) for the full setup, including `.env` and TLS. What you'll see: `docker compose ps` shows `infrainbox` and `postgres` running.

## 2. Finish first-run setup

The server has no user yet, so it prints a one-time link to its own log:

```bash
docker compose logs infrainbox | grep 'setup token'
```

The line ends `.../setup#token=...`. Open it in a browser — the token is single-use and only works while the instance has no administrator yet. Fill in a username, password, your workspace's name and its time zone (this is what "23:00" means for quiet hours later).

What you'll see: the dashboard loads, signed in as the new workspace's administrator.

## 3. Add a source

Go to **Add source** (dashboard screen `/sources/new`). For this walkthrough, pick a generic source (or use the events API directly — see [Events API](https://infrainbox.app/docs/sources/events-api.md) for the full recipe and every field). Name it and create it.

What you'll see: a key shown once, shaped like `iik_src_…`, plus the ingest URL. Copy both now — InfraInbox stores only a hash of the key and can't show it to you again.

## 4. Send a test event

```bash
curl -X POST https://infrainbox.example.com/v1/events \
  -H "Authorization: Bearer iik_src_…" \
  -H "Content-Type: application/json" \
  -d '{"title": "Backup failed", "severity": "CRITICAL", "dedupKey": "quickstart-test"}'
```

What you'll see: a `202` response with an `eventId` and an `incidentId` — CRITICAL opens an incident by default.

## 5. Add a destination and put it on the default route

Go to **Destinations** (dashboard screen `/destinations`) → **Add Telegram destination**. Paste a bot token from [@BotFather](https://t.me/BotFather), then use **Find my chats** to pick the chat you want alerts in (message the bot once first, so it has something to find).

Then open **Notifications → Routing → Default route** (dashboard screen `/rules/default-route`) and add the Telegram destination to the CRITICAL row, alongside the built-in InfraInbox Push.

What you'll see: the new destination listed as one of CRITICAL's destinations.

## 6. See it arrive

Send the same test event again (a new `dedupKey` if you want a fresh incident instead of an occurrence on the last one):

```bash
curl -X POST https://infrainbox.example.com/v1/events \
  -H "Authorization: Bearer iik_src_…" \
  -H "Content-Type: application/json" \
  -d '{"title": "Backup failed", "severity": "CRITICAL", "dedupKey": "quickstart-test-2"}'
```

What you'll see: the incident in the **Inbox** (dashboard screen `/incidents`), and the Telegram message arriving in the chat you picked.

## Next

- [Core concepts](https://infrainbox.app/docs/start/concepts.md) — the vocabulary the rest of this guide uses
- [A tour of the dashboard](https://infrainbox.app/docs/start/dashboard.md) — every screen, what it's for
- [How incidents work](https://infrainbox.app/docs/incidents/how-incidents-work.md) — dedup, re-notify, quiet hours and what ack/snooze/resolve actually do
