Skip to content

Configuration

MiniAPM is configured entirely through environment variables. No configuration files needed.

VariableDefaultDescription
SQLITE_PATH./data/miniapm.dbPath to the SQLite database file
RUST_LOGminiapm=infoLog level (debug, info, warn, error)
MINI_APM_URLhttp://localhost:3000Public URL of the MiniAPM server

Control how long data is kept before automatic cleanup:

VariableDefaultDescription
RETENTION_DAYS_REQUESTS7Days to keep request data
RETENTION_DAYS_ERRORS30Days to keep error data
RETENTION_DAYS_SPANS7Days to keep trace spans
RETENTION_DAYS_HOURLY_ROLLUPS90Days to keep hourly aggregates

Example Docker Compose configuration:

environment:
- RETENTION_DAYS_REQUESTS=14
- RETENTION_DAYS_ERRORS=60
- RETENTION_DAYS_SPANS=14
VariableDefaultDescription
SLOW_REQUEST_THRESHOLD_MS500Requests slower than this (in ms) are flagged as slow

By default, MiniAPM runs in single-project mode with one API key. Enable multi-project mode to manage multiple applications:

VariableDefaultDescription
ENABLE_PROJECTSfalseEnable multi-project mode

When enabled:

  • Each project gets its own API key
  • Data is isolated between projects
  • Dashboard can filter by project

Enable user accounts for team access:

VariableDefaultDescription
ENABLE_USER_ACCOUNTSfalseEnable user authentication
SESSION_SECRET(auto-generated)Secret for session cookies

When enabled:

  • Default admin credentials: admin / admin (change immediately!)
  • Uses Argon2 for password hashing
  • Cookie-based session management
Terminal window
# Enable with a secure session secret
ENABLE_USER_ACCOUNTS=true
SESSION_SECRET=your-secure-random-string-here
Terminal window
SQLITE_PATH=./miniapm-dev.db
RUST_LOG=miniapm=debug
SLOW_REQUEST_THRESHOLD_MS=200
Terminal window
SQLITE_PATH=/data/miniapm.db
RUST_LOG=miniapm=info
RETENTION_DAYS_REQUESTS=14
RETENTION_DAYS_ERRORS=60
RETENTION_DAYS_SPANS=7
Terminal window
SQLITE_PATH=/data/miniapm.db
RUST_LOG=miniapm=info
ENABLE_PROJECTS=true
ENABLE_USER_ACCOUNTS=true
SESSION_SECRET=generate-a-secure-random-string

Pass environment variables to Docker:

Terminal window
docker run -d \
-p 3000:3000 \
-v miniapm_data:/data \
-e RETENTION_DAYS_REQUESTS=14 \
-e RETENTION_DAYS_ERRORS=60 \
-e SLOW_REQUEST_THRESHOLD_MS=300 \
ghcr.io/miniapm/miniapm

Or use an environment file:

Terminal window
# miniapm.env
RETENTION_DAYS_REQUESTS=14
RETENTION_DAYS_ERRORS=60
SLOW_REQUEST_THRESHOLD_MS=300
# Run with env file
docker run -d \
-p 3000:3000 \
-v miniapm_data:/data \
--env-file miniapm.env \
ghcr.io/miniapm/miniapm