Logo
Logo

Configuration

Every environment variable of GenesisDB with its default.

GenesisDB is configured with environment variables. A .env file in the working directory is read if present.

Server

VariableDefaultMeaning
GENESISDB_AUTH_TOKENrequiredAdministrator token, at least 32 bytes
GENESISDB_WRITE_TOKENdisabledRead and commit
GENESISDB_READ_TOKENdisabledRead only
GENESISDB_HOST127.0.0.1Bind address, the container image uses 0.0.0.0
GENESISDB_PORT8080API port
GENESISDB_TLS_CERT_FILE, GENESISDB_TLS_KEY_FILEdisabledTLS certificate and key, supply both
GENESISDB_DATA_DIRdataData directory, owned exclusively by one process
GENESISDB_TZsystemTime zone of event timestamps
GENESISDB_LOG_LEVELinfodebug, info, warn or error

Limits

All limits are off by default. A request that hits one fails explicitly, it is never truncated.

VariableDefaultMeaning
GENESISDB_MAX_REQUEST_BYTES0 (unbounded)Request body size, answers 413
GENESISDB_MAX_RESTORE_BYTES0 (unbounded)Restore body size, answers 413
GENESISDB_MAX_READ_EVENTS0 (unbounded)Selected events per request, answers 422
GENESISDB_MAX_READ_BYTES0 (unbounded)Selected bytes per request, answers 422
GENESISDB_MAX_CONCURRENT_REQUESTS0 (unbounded)Active requests including subscriptions, answers 429
GENESISDB_REQUEST_TIMEOUT_SECONDS0 (none)Deadline for non-streaming requests, answers 408

Cache and storage

VariableDefaultMeaning
GENESISDB_MEMCACHEtrueSet to false to disable the event cache
GENESISDB_MEMCACHE_SIZE10000Cached events, an entry count, not bytes
GENESISDB_STORAGE_FORMATautoauto migrates a 1.x directory on start (back it up first, the backup is mandatory), keep leaves it as is for inspection

Metrics

VariableDefaultMeaning
GENESISDB_METRICS or GENESISDB_PROMETHEUS_METRICSfalseEnable Prometheus and OpenTelemetry metrics
GENESISDB_METRICS_PORT2112Separate Prometheus listener
GENESISDB_LEGACY_METRICStrueAlso expose the historical eventstore_* metric names

OTLP export additionally needs OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_METRICS_ENDPOINT. The standard OTEL_* variables apply. Metrics endpoints are unauthenticated, keep them on a trusted network. Subjects are never exported as labels, and at most 256 event types get their own label value.

MCP

VariableDefaultMeaning
GENESISDB_MCPfalseServe the MCP endpoint for AI agents at /mcp on the API port

Commands

bash
genesisdb                                   # start the server
genesisdb version                           # print the version
genesisdb convert --data-dir <dir>          # migrate a stopped 1.x directory offline, back it up first
genesisdb convert --data-dir <dir> --dry-run