## Deploy and Host Quickwit on Railway

Quickwit is a cloud-native search engine for logs and traces, written in Rust. It indexes JSON documents with sub-second search on large datasets, offers an Elasticsearch-compatible API for ingest and queries, accepts OpenTelemetry logs and traces, and plugs into Grafana and Jaeger as a backend.

### About Hosting Quickwit

This template deploys Quickwit 0.9.1 as a single node with its indexes and metastore on a Railway volume, plus a Caddy gateway as the only public entry point. The gateway has two logins: `ingest` for shippers, which can only reach the ingest, Elasticsearch `_bulk` and OTLP endpoints, and `admin` for search, index management and the web UI. Quickwit stays private and uses a fixed node ID. Telemetry is off. Storage grows with indexed data; watch the volume on the Hobby plan or move splits to S3 later. Back up the volume regularly.

### Common Use Cases

- Log search with an Elasticsearch-compatible API at lower cost
- Storing OpenTelemetry logs and traces for Grafana or Jaeger
- Full-text search over large append-only JSON datasets

### Dependencies for Quickwit Hosting

- `quickwit/quickwit:0.9.1` (official image) with a volume at `/quickwit/qwdata`
- `caddy:2.11.4-alpine` (official image) as the gateway

#### Deployment Dependencies

- [Quickwit documentation](https://quickwit.io/docs)
- [Quickwit v0.9.1 release](https://github.com/quickwit-oss/quickwit/releases/tag/v0.9.1)
- [Elasticsearch-compatible API](https://quickwit.io/docs/reference/es_compatible_api)
- [Railway volumes](https://docs.railway.com/reference/volumes)

#### Implementation Details

| Service | Image | Networking | Storage |
| --- | --- | --- | --- |
| quickwit | `quickwit/quickwit:0.9.1` | private only, port 7280 | volume at `/quickwit/qwdata` |
| gateway | `caddy:2.11.4-alpine` | public domain on 8080 | none |

```bash
# create an index (admin)
curl -u "admin:$QW_ADMIN_PASSWORD" -X POST "$QUICKWIT_URL/api/v1/indexes" \
  -H "Content-Type: application/yaml" --data-binary @index-config.yaml

# ingest (ingest user)
curl -u "ingest:$QW_INGEST_PASSWORD" -X POST "$QUICKWIT_URL/api/v1/app-logs/ingest" -d '{"msg":"hello"}'

# search (admin)
curl -u "admin:$QW_ADMIN_PASSWORD" "$QUICKWIT_URL/api/v1/app-logs/search?query=hello"
```

| Variable | Service | Default | Purpose |
| --- | --- | --- | --- |
| `QW_INGEST_USERNAME` / `_PASSWORD` | gateway | `ingest` / generated | Ingest-only credentials |
| `QW_ADMIN_USERNAME` / `_PASSWORD` | gateway | `admin` / generated | Search, admin and UI |
| `QW_NODE_ID` | quickwit | `quickwit-1` | Stable node identity |

Notes:

- The UI is at `/ui` on the gateway domain.
- Quickwit has no authentication of its own, which is why it stays private behind the gateway.

### Why Deploy Quickwit on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Quickwit on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
