Deploy

Mnemosyne is a stateless service that reads/writes a Postgres. Any host that can run a container and reach a Postgres will work.

docker-compose.yml
services:
  postgres:
    image: pgvector/pgvector:pg17
    environment:
      POSTGRES_PASSWORD: mnemo
      POSTGRES_USER: mnemo
      POSTGRES_DB: mnemo
    volumes:
      - mnemo_pg:/var/lib/postgresql/data
    ports: ["55432:5432"]
  mnemosyne:
    image: ghcr.io/lucasmailland/mnemosyne-server:latest
    environment:
      DATABASE_URL: postgres://mnemo:mnemo@postgres:5432/mnemo
      MNEMO_LLM_PROVIDER: openai
      MNEMO_LLM_API_KEY: sk-xxx
    ports: ["3000:3000"]
    depends_on: [postgres]
volumes:
  mnemo_pg:

Environment variables

VariableRequiredDefaultNotes
DATABASE_URLyes—Postgres DSN
MNEMO_LLM_PROVIDERyes—openai / anthropic / google / cohere / mistral / voyage / ollama
MNEMO_LLM_API_KEYyes—Provider key for embeddings/extraction (the real required secret)
POSTGRES_USERyes—Used by the bundled Postgres container
POSTGRES_PASSWORDyes—Used by the bundled Postgres container
POSTGRES_DByes—Used by the bundled Postgres container
PORTno3000HTTP listen port
LOG_LEVELnoinfodebug / info / warn / error
MNEMO_KEYno—Workspace API key for the CLI/SDK to call this instance
MNEMO_EMBED_MODELnotext-embedding-3-smallProvider model
MNEMO_REDIS_URLno—Enables hot tier
MNEMO_REGIONno—Region-lock / data-residency pin
OTEL_EXPORTER_OTLP_ENDPOINTno—Enables OpenTelemetry

Anything not listed has a sensible default. The server logs every optional env at boot so you can audit what’s active.

MNEMO_API_KEY is not a bootstrap variable — there is no admin key in the environment. Workspace API keys are minted with the create-api-key script after the stack is up:

docker compose exec server node scripts/create-api-key.cjs --workspace your-ws-id

Migrations are not applied by the server on first boot. A dedicated migrate service (npx mnemo-migrate) must run and exit 0 before the server starts. Migrations are forward-only; rolling back is a manual psql operation.