Skip to main content
Version: 0.12

Docker Compose

Run Marmot and PostgreSQL together with Docker Compose. Unlike the quick start, this setup encrypts the credentials Marmot stores.

  1. Install the CLI

    curl -fsSL get.marmotdata.io | sh
  2. Generate an encryption key

    Marmot encrypts the credentials it stores with this key. Keep it somewhere safe, because losing it means re-entering every stored credential:

    marmot generate-encryption-key
  3. Create your Compose file

    Save this as docker-compose.yaml:

    services:
    marmot:
    image: ghcr.io/marmotdata/marmot:latest
    ports:
    - "8080:8080"
    environment:
    MARMOT_DATABASE_HOST: postgres
    MARMOT_DATABASE_PORT: 5432
    MARMOT_DATABASE_USER: marmot
    MARMOT_DATABASE_PASSWORD: ${POSTGRES_PASSWORD}
    MARMOT_DATABASE_NAME: marmot
    MARMOT_DATABASE_SSLMODE: disable
    MARMOT_SERVER_ENCRYPTION_KEY: ${MARMOT_ENCRYPTION_KEY}
    depends_on:
    postgres:
    condition: service_healthy

    postgres:
    image: postgres:16-alpine
    environment:
    POSTGRES_USER: marmot
    POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
    POSTGRES_DB: marmot
    volumes:
    - marmot_data:/var/lib/postgresql/data
    healthcheck:
    test: ["CMD-SHELL", "pg_isready -U marmot"]
    interval: 5s
    timeout: 5s
    retries: 5

    volumes:
    marmot_data:
  4. Create your environment file

    Save this as .env in the same directory:

    POSTGRES_PASSWORD=<database-password>
    MARMOT_ENCRYPTION_KEY=<encryption-key>
  5. Start Marmot

    docker compose up -d
  6. Sign in

    Open http://localhost:8080 and sign in as admin with the password admin. Marmot asks you to choose a new password straight away.

Next steps​