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

# Docker

> Run Meridian with Docker Compose in under a minute.

## Pre-built images

Three images are published on every release (`linux/amd64` + `linux/arm64`):

| Image | Compiled features | Use with |
| - | - | - |
| `ghcr.io/chahine-tech/meridian:latest` | sled storage | Default single-node |
| `ghcr.io/chahine-tech/meridian:latest-pg` | PostgreSQL + pg-sync | `--profile pg` |
| `ghcr.io/chahine-tech/meridian:latest-cluster` | sled + Redis cluster | `docker-compose.cluster.yml` |

Versioned tags follow the same pattern: `0.1.0`, `0.1.0-pg`, `0.1.0-cluster`.

## Docker Compose (recommended)

```bash theme={null}
cp .env.example .env          # fill in MERIDIAN_SIGNING_KEY
docker compose up -d
```

The server listens on `http://localhost:3000`.

> [!WARNING]
>
> Set a fixed `MERIDIAN_SIGNING_KEY`. If unset, a random key is generated on startup — all existing tokens become invalid on restart. Generate one with `openssl rand -hex 32`.

## PostgreSQL mode

```bash theme={null}
MERIDIAN_IMAGE=ghcr.io/chahine-tech/meridian:latest-pg \
DATABASE_URL=postgres://meridian:meridian@localhost/meridian \
docker compose --profile pg up -d
```

The `latest-pg` image includes `--features pg-sync` (PostgreSQL storage + WAL replication). The default `latest` image does not.

## Multinode cluster

```bash theme={null}
MERIDIAN_SIGNING_KEY=your-secret \
docker compose -f docker-compose.cluster.yml up -d
```

The cluster compose uses `latest-cluster` by default. See [Clustering](https://chahine.mintlify.site/self-hosting/clustering.md) for the full setup guide.

## Docker only

```bash theme={null}
docker run -d \
  -p 3000:3000 \
  -e MERIDIAN_SIGNING_KEY=$(openssl rand -hex 32) \
  -v meridian-data:/data \
  ghcr.io/chahine-tech/meridian:latest
```

## From source

```bash theme={null}
MERIDIAN_SIGNING_KEY=$(openssl rand -hex 32) \
MERIDIAN_DATA_DIR=./data \
cargo run --release
```

Build with specific features:

```bash theme={null}
cargo build --release --features cluster      # Redis cluster
cargo build --release --features pg-sync      # PostgreSQL + WAL
cargo build --release --features cluster-http # HTTP peer mesh
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.