# Quickstart: self-host

> Run the open-source engine with Docker next to a Postgres of yours, create a project and make your first request.

Applies to: the Sypnia engine (open source, self-hosted).  
Source: https://data.docs.sypnia.com/start/quickstart-self-host/

For agents: Self-host quickstart: clone the repository, cp .env.example .env with SYPNIA_DATA_MASTER_KEY (openssl rand -base64 32) and POSTGRES_PASSWORD, docker compose up -d (Postgres 16, the engine, Mailpit at http://localhost:8025; the schema installs on first start), keys with docker compose exec data sypnia-data keys api-key --kind publishable|secret, first request with curl to /auth/v1/settings.

You need Docker and ten minutes. The repository's compose file runs Postgres 16, the engine and Mailpit, which catches every e-mail. The same engine works against any Postgres 14+ you already run: point `DATABASE_URL` at it.

### 1. Get the compose file and its settings

```bash
git clone https://github.com/sespinosav/sypnia-data && cd sypnia-data
cp .env.example .env
```

In `.env`, set `SYPNIA_DATA_MASTER_KEY` to the output of `openssl rand -base64 32` (keep it: it encrypts the signing keys) and `POSTGRES_PASSWORD` to another random value.

### 2. Start it

```bash
docker compose up -d
curl http://localhost:8080/health
```

**You should see:**`{"status":"ok"}`. On its first start the engine installed its schema in the database.

### 3. Create the project's keys

```bash
docker compose exec data sypnia-data keys api-key --kind publishable
docker compose exec data sypnia-data keys api-key --kind secret
```

**You should see:**A publishable key `syp_pk_default_…` and a secret key `syp_sk_default_…`. The secret key is shown once.

### 4. Make your first request

```bash
curl http://localhost:8080/auth/v1/settings -H "apikey: syp_pk_…"
```

**You should see:**JSON with `"email": true` among the providers and `"signup_open": true`. Sign-up e-mails appear in Mailpit at `http://localhost:8025`.

From here the quickstart for Sypnia Cloud applies unchanged from step 3, with `http://localhost:8080` as the address. Going to production: [Self-hosting](https://data.docs.sypnia.com/self-hosting).
