Skip to content

Docker Compose Installation

This guide covers installing Mantis using Docker Compose.

  • Docker 24.0+
  • Docker Compose 2.20+
  • Git
Terminal window
git clone https://github.com/MantisPlatform/mantis.git
cd mantis
Terminal window
# Copy the example environment file
cp .env.example .env
# Edit configuration
nano .env
Terminal window
# Generate development certificates
just dev-certs
Terminal window
# Start all services
./docker.sh start
# Or using just
just docker-start
Terminal window
./docker.sh db-migrate

Open https://localhost:5173 in your browser.

Default credentials:

Mantis uses Docker Compose profiles for different deployment scenarios:

ProfileDescriptionCommand
defaultCore servicesdocker compose up
devDevelopment tools (PgAdmin, etc.)docker compose --profile dev up
uiInclude Lens UIdocker compose --profile ui up
with-clientInclude Tarsus agentdocker compose --profile with-client up
multi-thoraxMultiple Thorax instancesdocker compose --profile multi-thorax up
Terminal window
./docker.sh status
# or
docker compose ps
Terminal window
# All services
./docker.sh logs
# Specific service
./docker.sh logs mandible
Terminal window
./docker.sh restart
Terminal window
./docker.sh stop
Terminal window
# Database
POSTGRES_USER=mantis
POSTGRES_PASSWORD=<strong-password>
POSTGRES_DB=mantis
# JWT (RS256 — generated by just dev-certs)
# Container-internal paths (the host ./.keys/ dir is mounted at /etc/mantis/keys/)
MANDIBLE__JWT__PRIVATE_KEY_PATH=/etc/mantis/keys/jwt-private.pem
MANDIBLE__JWT__PUBLIC_KEY_PATH=/etc/mantis/keys/jwt-public.pem
# Encryption
MANTIS_ENCRYPTION_KEY=<32-byte-base64-key>

See Environment Variables for complete reference.

Verify services are healthy:

Terminal window
./docker.sh health

Or check individual endpoints:

Terminal window
# Mandible API
curl https://localhost:3000/api/v1/health
# Thorax (gRPC health)
grpcurl -insecure localhost:50051 grpc.health.v1.Health/Check
  1. Check Docker daemon is running
  2. Verify ports are available
  3. Check logs: ./docker.sh logs
  1. Verify PostgreSQL is healthy
  2. Check DATABASE_URL configuration
  3. Ensure migrations have run
  1. Regenerate certificates: just dev-certs
  2. Verify certificate paths in .env
  3. Check certificate validity dates