Configuration
Every config key in the backend, auto-generated from source. Each key can be overridden via environment variable — the system checks for ENV_VAR_NODEENV first (e.g., DATABASE_URL_TEST when NODE_ENV=test), then ENV_VAR, then falls back to the default.
actions
Source: packages/keryx/config/actions.ts
| Key | Environment Variable | Default |
|---|---|---|
timeout | ACTION_TIMEOUT | 300_000 |
fanOutBatchSize | ACTION_FAN_OUT_BATCH_SIZE | 100 |
fanOutResultTtl | ACTION_FAN_OUT_RESULT_TTL | 600 |
channels
Source: packages/keryx/config/channels.ts
| Key | Environment Variable | Default |
|---|---|---|
presenceTTL | PRESENCE_TTL | 90 |
presenceHeartbeatInterval | PRESENCE_HEARTBEAT_INTERVAL | 30 |
database
Source: packages/keryx/config/database.ts
| Key | Environment Variable | Default |
|---|---|---|
connectionString | DATABASE_URL | "x" |
autoMigrate | DATABASE_AUTO_MIGRATE | true |
max | DATABASE_POOL_MAX | 10 |
min | DATABASE_POOL_MIN | 0 |
idleTimeoutMillis | DATABASE_POOL_IDLE_TIMEOUT | 10000 |
connectionTimeoutMillis | DATABASE_POOL_CONNECT_TIMEOUT | 0 |
allowExitOnIdle | DATABASE_POOL_EXIT_ON_IDLE | false |
logger
Source: packages/keryx/config/logger.ts
| Key | Environment Variable | Default |
|---|---|---|
level | LOG_LEVEL | LogLevel.info |
includeTimestamps | LOG_INCLUDE_TIMESTAMPS | true |
colorize | LOG_COLORIZE | true |
format | LOG_FORMAT | LogFormat.text |
maxParamLength | LOG_MAX_PARAM_LENGTH | 100 |
observability
Source: packages/keryx/config/observability.ts
| Key | Environment Variable | Default |
|---|---|---|
enabled | OTEL_METRICS_ENABLED | false |
metricsRoute | OTEL_METRICS_ROUTE | "/metrics" |
serviceName | OTEL_SERVICE_NAME | "" |
metricsAuthUsername | OTEL_METRICS_AUTH_USERNAME | "" |
metricsAuthPassword | OTEL_METRICS_AUTH_PASSWORD | "" |
process
Source: packages/keryx/config/process.ts
| Key | Environment Variable | Default |
|---|---|---|
name | PROCESS_NAME | "server" |
shutdownTimeout | PROCESS_SHUTDOWN_TIMEOUT | 1000 * 30 |
rateLimit
Source: packages/keryx/config/rateLimit.ts
| Key | Environment Variable | Default |
|---|---|---|
enabled | RATE_LIMIT_ENABLED | Bun.env.NODE_ENV === "test" ? false : true |
windowMs | RATE_LIMIT_WINDOW_MS | 60_000 |
unauthenticatedLimit | RATE_LIMIT_UNAUTH_LIMIT | 20 |
authenticatedLimit | RATE_LIMIT_AUTH_LIMIT | 200 |
keyPrefix | RATE_LIMIT_KEY_PREFIX | "ratelimit" |
oauthRegisterLimit | RATE_LIMIT_OAUTH_REGISTER_LIMIT | 5 |
oauthRegisterWindowMs | RATE_LIMIT_OAUTH_REGISTER_WINDOW_MS | 3_600_000 |
redis
Source: packages/keryx/config/redis.ts
| Key | Environment Variable | Default |
|---|---|---|
connectionString | REDIS_URL | "redis://localhost:6379/0" |
session
Source: packages/keryx/config/session.ts
| Key | Environment Variable | Default |
|---|---|---|
ttl | SESSION_TTL | 60 * 60 * 24 |
cookieName | SESSION_COOKIE_NAME | "__session" |
cookieHttpOnly | SESSION_COOKIE_HTTP_ONLY | true |
cookieSecure | SESSION_COOKIE_SECURE | false |
cookieSameSite | SESSION_COOKIE_SAME_SITE | CookieSameSite.Strict |
tasks
Source: packages/keryx/config/tasks.ts
| Key | Environment Variable | Default |
|---|---|---|
enabled | TASKS_ENABLED | true |
timeout | TASK_TIMEOUT | 5000 |
taskProcessors | TASK_PROCESSORS | Bun.env.NODE_ENV === "test" ? 0 : 1 |
cli
Source: packages/keryx/config/server/cli.ts
| Key | Environment Variable | Default |
|---|---|---|
includeStackInErrors | CLI_INCLUDE_STACK_IN_ERRORS | true |
quiet | CLI_QUIET | false |
mcp
Source: packages/keryx/config/server/mcp.ts
| Key | Environment Variable | Default |
|---|---|---|
enabled | MCP_SERVER_ENABLED | false |
route | MCP_SERVER_ROUTE | "/mcp" |
allowedOrigins | MCP_ALLOWED_ORIGINS | [
"https://claude.ai", // Anthropic Claude web connector
"https://claude.com", // Anthropic Claude web connector
"https://chatgpt.com", // OpenAI ChatGPT connectors
"https://vscode.dev", // VS Code for the Web
"https://github.dev", // github.dev web editor
].join("," |
instructions | MCP_SERVER_INSTRUCTIONS | pkg.description as string |
oauthClientTtl | MCP_OAUTH_CLIENT_TTL | 60 * 60 * 24 * 30 |
oauthCodeTtl | MCP_OAUTH_CODE_TTL | 300 |
oauthRefreshTtl | MCP_OAUTH_REFRESH_TTL | 60 * 60 * 24 * 30 |
oauthTrustProxy | MCP_OAUTH_TRUST_PROXY | false |
oauthCimdEnabled | MCP_OAUTH_CIMD_ENABLED | true |
oauthCimdCacheTtl | MCP_OAUTH_CIMD_CACHE_TTL | 3600 |
oauthCimdFetchTimeoutMs | MCP_OAUTH_CIMD_FETCH_TIMEOUT_MS | 5000 |
oauthCimdMaxBytes | MCP_OAUTH_CIMD_MAX_BYTES | 64 * 1024 |
oauthCimdAllowPrivateHosts | MCP_OAUTH_CIMD_ALLOW_PRIVATE_HOSTS | false |
markdownDepthLimit | MCP_MARKDOWN_DEPTH_LIMIT | 5 |
sessionTtl | MCP_SESSION_TTL | 60 * 60 * 24 |
web
Source: packages/keryx/config/server/web.ts
| Key | Environment Variable | Default |
|---|---|---|
port | WEB_SERVER_PORT | 8080 |
host | WEB_SERVER_HOST | "localhost" |
enabled | WEB_SERVER_ENABLED | true |
applicationUrl | APPLICATION_URL | `http://${host}:${port}` |
apiRoute | WEB_SERVER_API_ROUTE | "/api" |
theme | WEB_SERVER_THEME | "" |
allowedOrigins | WEB_SERVER_ALLOWED_ORIGINS | "*" |
allowedMethods | WEB_SERVER_ALLOWED_METHODS | "HEAD, GET, POST, PUT, PATCH, DELETE, OPTIONS" |
allowedHeaders | WEB_SERVER_ALLOWED_HEADERS | "Content-Type" |
enabled | WEB_SERVER_STATIC_ENABLED | true |
directory | WEB_SERVER_STATIC_DIRECTORY | "assets" |
route | WEB_SERVER_STATIC_ROUTE | "/" |
cacheControl | WEB_SERVER_STATIC_CACHE_CONTROL | "public, max-age=3600" |
etag | WEB_SERVER_STATIC_ETAG | true |
maxPayloadSize | WS_MAX_PAYLOAD_SIZE | 65_536 |
maxMessagesPerSecond | WS_MAX_MESSAGES_PER_SECOND | 20 |
maxSubscriptions | WS_MAX_SUBSCRIPTIONS | 100 |
drainTimeout | WS_DRAIN_TIMEOUT | 5000 |
includeStackInErrors | WEB_SERVER_INCLUDE_STACK_IN_ERRORS | (Bun.env.NODE_ENV ?? "development" |
Content-Security-Policy | WEB_SECURITY_CSP | "default-src 'self'; script-src 'self' https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; font-src 'self' https://cdn.jsdelivr.net data:; img-src 'self' data: blob:; connect-src 'self'; worker-src blob:" |
X-Content-Type-Options | WEB_SECURITY_CONTENT_TYPE_OPTIONS | "nosniff" |
X-Frame-Options | WEB_SECURITY_FRAME_OPTIONS | "DENY" |
Strict-Transport-Security | WEB_SECURITY_HSTS | "max-age=31536000; includeSubDomains" |
Referrer-Policy | WEB_SECURITY_REFERRER_POLICY | "strict-origin-when-cross-origin" |
maxBodySize | WEB_MAX_BODY_SIZE | 10 * 1024 * 1024 |
enabled | WEB_COMPRESSION_ENABLED | true |
threshold | WEB_COMPRESSION_THRESHOLD | 1024 |
header | WEB_CORRELATION_ID_HEADER | "X-Request-Id" |
trustProxy | WEB_CORRELATION_ID_TRUST_PROXY | false |