> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment variables

> Reference for all environment variables used by Flowker, organized by category.

This reference lists all environment variables used by Flowker. Variables marked as required will cause the server to fail on startup if not set.

## Server

| Variable               | Description                               | Default       | Required |
| ---------------------- | ----------------------------------------- | ------------- | -------- |
| `ENV_NAME`             | Environment name (dev/staging/production) | `development` | No       |
| `SERVER_ADDRESS`       | Server bind address                       | `:4021`       | No       |
| `CORS_ALLOWED_ORIGINS` | Allowed CORS origins                      | `*`           | No       |

## Authentication

| Variable              | Description                                                           | Default | Required                            |
| --------------------- | --------------------------------------------------------------------- | ------- | ----------------------------------- |
| `API_KEY`             | API key for `X-API-Key` header auth                                   | —       | Yes (if `API_KEY_ENABLED=true`)     |
| `API_KEY_ENABLED`     | Enable API key authentication                                         | `false` | No                                  |
| `PLUGIN_AUTH_ENABLED` | Enable Access Manager plugin authentication as alternative to API Key | `false` | No                                  |
| `PLUGIN_AUTH_ADDRESS` | gRPC address of Access Manager service                                | —       | Yes (if `PLUGIN_AUTH_ENABLED=true`) |

## Database (MongoDB)

| Variable              | Description                                                                  | Default   | Required |
| --------------------- | ---------------------------------------------------------------------------- | --------- | -------- |
| `MONGO_URI`           | MongoDB connection URI                                                       | —         | Yes      |
| `MONGO_DB_NAME`       | MongoDB database name                                                        | `flowker` | No       |
| `MONGO_TLS_CA_CERT`   | Base64-encoded PEM CA certificate for TLS connections (e.g., AWS DocumentDB) | —         | No       |
| `MONGO_MAX_POOL_SIZE` | Maximum MongoDB connection pool size                                         | `10`      | No       |

## Audit database (PostgreSQL)

| Variable                | Description                                                      | Default         | Required               |
| ----------------------- | ---------------------------------------------------------------- | --------------- | ---------------------- |
| `AUDIT_DB_HOST`         | Audit database host                                              | —               | Yes (fatal if missing) |
| `AUDIT_DB_PORT`         | Audit database port                                              | `5432`          | No                     |
| `AUDIT_DB_USER`         | Audit database user. Defaults to `flowker_audit` if not set.     | `flowker_audit` | No                     |
| `AUDIT_DB_PASSWORD`     | Audit database password. Defaults to `flowker_audit` if not set. | `flowker_audit` | No                     |
| `AUDIT_DB_NAME`         | Audit database name                                              | `flowker_audit` | No                     |
| `AUDIT_DB_SSL_MODE`     | SSL mode for audit DB connection                                 | `disable`       | No                     |
| `AUDIT_MIGRATIONS_PATH` | Path to audit database migration files                           | `/migrations`   | No                     |

## Observability

| Variable                               | Description                          | Default   | Required                         |
| -------------------------------------- | ------------------------------------ | --------- | -------------------------------- |
| `ENABLE_TELEMETRY`                     | Enable OpenTelemetry instrumentation | `false`   | No                               |
| `OTEL_EXPORTER_OTLP_ENDPOINT`          | OTLP exporter endpoint               | —         | Yes (if `ENABLE_TELEMETRY=true`) |
| `OTEL_RESOURCE_SERVICE_NAME`           | Service name for telemetry           | `flowker` | No                               |
| `OTEL_RESOURCE_SERVICE_VERSION`        | Service version for telemetry        | —         | No                               |
| `OTEL_RESOURCE_DEPLOYMENT_ENVIRONMENT` | Deployment environment label         | —         | No                               |
| `OTEL_LIBRARY_NAME`                    | Instrumentation library name         | —         | No                               |
| `SKIP_LIB_COMMONS_TELEMETRY`           | Skip commons library telemetry       | `false`   | No                               |
| `LOG_LEVEL`                            | Log level (debug/info/warn/error)    | `debug`   | No                               |

## Security

| Variable                  | Description                              | Default | Required |
| ------------------------- | ---------------------------------------- | ------- | -------- |
| `SSRF_ALLOW_PRIVATE`      | Allow executor HTTP calls to private IPs | `false` | No       |
| `FAULT_INJECTION_ENABLED` | Enable fault injection for testing       | `false` | No       |

## Swagger

| Variable              | Description            | Default | Required |
| --------------------- | ---------------------- | ------- | -------- |
| `SWAGGER_TITLE`       | Swagger UI title       | varies  | No       |
| `SWAGGER_DESCRIPTION` | Swagger UI description | varies  | No       |
| `SWAGGER_VERSION`     | Swagger API version    | varies  | No       |
| `SWAGGER_HOST`        | Swagger host           | varies  | No       |
| `SWAGGER_BASE_PATH`   | Swagger base path      | varies  | No       |
| `SWAGGER_SCHEMES`     | Swagger URL schemes    | varies  | No       |
