Skip to Content
Getting StartedConfiguration

Configuration

KalamDB loads runtime settings from server.toml and then applies KALAMDB_* environment overrides.

For complete section-by-section tuning, use Advanced Configuration.

Focused guides:

Download Full Sample Config

bash snippetBASH
curl -L https://raw.githubusercontent.com/kalamstack/KalamDB/refs/heads/main/backend/server.example.toml -o server.example.toml

Run With Config File

bash snippetBASH
kalamdb-server --config /path/to/server.toml

Minimal Production-Oriented Example

toml snippetTOML
[server]host = "0.0.0.0"port = 2900api_version = "v1"enable_http2 = true [storage]data_path = "./data" [auth]jwt_secret = "replace-with-strong-random-secret-32-plus-chars"cookie_secure = trueallow_remote_setup = false [rate_limit]enable_connection_protection = truemax_requests_per_ip_per_sec = 200max_auth_requests_per_ip_per_sec = 20 [topics]visibility_timeout_secs = 60 [security]max_request_body_size = 10485760max_ws_message_size = 1048576 [security.cors]allowed_origins = ["https://app.example.com"]allow_credentials = true

Notes:

  • data_path is the canonical storage root key (not data_dir).
  • auth can also be written as [authentication] (alias supported by config loader).
  • table flush behavior is set per table via SQL WITH (FLUSH_POLICY = '...'), not a top-level storage.flush_policy key.
  • topics.visibility_timeout_secs controls when unacknowledged topic consumer claims become available for redelivery.

High-Value Environment Overrides

These are commonly used in Docker and CI:

  • KALAMDB_SERVER_HOST, KALAMDB_SERVER_PORT
  • KALAMDB_DATA_DIR
  • KALAMDB_LOG_LEVEL, KALAMDB_LOGS_DIR
  • KALAMDB_JWT_SECRET, KALAMDB_JWT_TRUSTED_ISSUERS, KALAMDB_COOKIE_SECURE, KALAMDB_ALLOW_REMOTE_SETUP
  • KALAMDB_RATE_LIMIT_AUTH_REQUESTS_PER_IP_PER_SEC
  • KALAMDB_TOPIC_VISIBILITY_TIMEOUT_SECS
  • KALAMDB_CLUSTER_ID, KALAMDB_NODE_ID, KALAMDB_CLUSTER_RPC_ADDR, KALAMDB_CLUSTER_API_ADDR, KALAMDB_CLUSTER_PEERS

Legacy vars like KALAMDB_HOST and KALAMDB_PORT are still recognized.

For OTEL-specific override behavior, see OpenTelemetry (OTEL). For IdP issuer setup, see OIDC & Issuer Trust.

Cluster Override Format

KALAMDB_CLUSTER_PEERS uses this format:

text snippetTEXT
node_id@rpc_addr@api_addr[@rpc_server_name];node_id@rpc_addr@api_addr[@rpc_server_name]

Example:

text snippetTEXT
2@kalamdb-node2:2910@http://kalamdb-node2:2900;3@kalamdb-node3:2910@http://kalamdb-node3:2900
Last updated on