Skip to content
Support

Environment Variables

Runtime configuration for the Hub API, worker, database pool, webhooks, embeddings, and observability.

VariableUsed byDefaultDescription
API_KEYAPI-Bearer token required for authenticated /v1/* API requests.
DATABASE_URLAPI/workerLocal test database URLPostgreSQL connection string. Set explicitly outside local development.

hub-worker requires an explicit DATABASE_URL; it does not use the local test default.

VariableDefaultDescription
PORT8080HTTP port used inside the API process/container.
PUBLIC_BASE_URL-Public API root advertised in runtime OpenAPI specs when Hub is behind ingress, TLS, or a path prefix.
LOG_LEVELinfoLog level, such as debug, info, warn, or error.
SHUTDOWN_TIMEOUT_SECONDS30Graceful shutdown timeout in seconds.

The Quick Start Docker Compose file also supports HUB_PORT, POSTGRES_PORT, and HUB_IMAGE_TAG as Compose conveniences. They are compose variables, not Hub runtime settings.

PUBLIC_BASE_URL must be an absolute http or https URL. It may include a path prefix, such as https://example.com/hub, but must not include query strings, fragments, or credentials. Hub serves runtime OpenAPI specs at /openapi.yaml and /openapi.json.

VariableDefaultDescription
DATABASE_MAX_CONNS25Maximum PostgreSQL pool connections.
DATABASE_MIN_CONNS0Minimum PostgreSQL pool connections.
DATABASE_MAX_CONN_LIFETIME_SECONDS3600Maximum connection lifetime.
DATABASE_MAX_CONN_IDLE_TIME_SECONDS1800Maximum idle time before a connection is closed.
DATABASE_HEALTH_CHECK_PERIOD_SECONDS60Pool health-check interval.
DATABASE_CONNECT_TIMEOUT_SECONDS10Database connection timeout.
VariableDefaultDescription
RIVER_JOB_TIMEOUT_SECONDS0Max job runtime before cancellation; 0 uses the River default.
RIVER_RESCUE_STUCK_JOBS_AFTER_SECONDS0Stuck-job rescue interval; 0 uses the River default.
RIVER_COMPLETED_JOB_RETENTION_SECONDS86400Completed job retention period; -1 disables deletion.
RIVER_CLIENT_ID-Optional client identifier for logs and River coordination.
VariableDefaultDescription
WEBHOOK_DELIVERY_MAX_CONCURRENT100Max concurrent webhook delivery workers.
WEBHOOK_DELIVERY_MAX_ATTEMPTS3Max delivery attempts per webhook job.
WEBHOOK_MAX_FAN_OUT_PER_EVENT500Max webhook jobs inserted for a single event batch.
WEBHOOK_MAX_COUNT500Max total webhook endpoints allowed.
WEBHOOK_HTTP_TIMEOUT_SECONDS15Outbound webhook request timeout.
WEBHOOK_ENQUEUE_MAX_RETRIES3Retries when enqueueing webhook jobs fails.
WEBHOOK_ENQUEUE_INITIAL_BACKOFF_MS100Initial enqueue retry backoff in milliseconds.
WEBHOOK_ENQUEUE_MAX_BACKOFF_MS2000Maximum enqueue retry backoff in milliseconds.
WEBHOOK_BLACKLISTlocalhost,127.0.0.1,::1,169.254.169.254Comma-separated hostnames blocked for webhook URLs.
VariableDefaultDescription
MESSAGE_PUBLISHER_QUEUE_MAX_SIZE16384In-memory event channel buffer size.
MESSAGE_PUBLISHER_PER_EVENT_TIMEOUT_SECONDS10Per-event publish timeout in seconds.
VariableDefaultDescription
EMBEDDING_PROVIDER-Embedding provider. One of openai, google, or google-vertex.
EMBEDDING_PROVIDER_API_KEY-API key for the embedding provider.
EMBEDDING_MODEL-Embedding model name.
EMBEDDING_MAX_CONCURRENT5Max concurrent embedding jobs.
EMBEDDING_MAX_ATTEMPTS3Max embedding attempts.
EMBEDDING_NORMALIZEfalseWhether to normalize embeddings before storage.
EMBEDDING_GOOGLE_CLOUD_PROJECT-Google Cloud project for supported providers.
EMBEDDING_GOOGLE_CLOUD_LOCATION-Google Cloud location for supported providers.
VariableDefaultDescription
OTEL_METRICS_EXPORTER-OpenTelemetry metrics exporter.
OTEL_TRACES_EXPORTER-OpenTelemetry traces exporter.

These variables are used by MCP client package flows. They are not read by the Hub API or worker processes.

VariableDefaultDescription
HUB_API_KEY-API key used by MCP clients; usually the same value as Hub’s API_KEY.
FORMBRICKS_HUB_BASE_URL-Hub API root reachable from the MCP server, for example https://hub.example.com.

See Connect Hub to AI Clients via MCP for client setup.