Skip to content

Environment Variables

This page documents the environment variables that operators set when self-hosting Lombok. It is a practical deployment guide, not an exhaustive, auto-generated reference: it covers the variables that are clearly part of the supported deployment and demo flows, and flags the ones that are development-only or internal.

If a variable is not listed here, treat it as internal or unsupported for self-hosting unless a maintainer tells you otherwise.

The minimum an operator needs to start a Lombok instance is:

  • A platform host (PLATFORM_HOST) — required; the app refuses to start without it.
  • Database connection details (DB_*).
  • Auth secrets (AUTH_JWT_SECRET, plus an email-verification secret).

Everything else has sensible defaults or is optional.

These define how the platform identifies itself and how it builds the public URLs it advertises to clients and its workers.

VariableRequiredDefaultDescription
PLATFORM_HOSTYesPublic hostname of the instance (e.g. lombok.example.com). The container exits on startup if this is unset.
PLATFORM_HTTPSNotrueWhether the platform’s public URL uses https. Set to false for plain-HTTP setups such as local demos.
PLATFORM_PORTNounsetPublic port to advertise in generated URLs. Leave unset to use the protocol default.
INITIAL_USERNounsetUsername of the initial user created on first startup.
LOG_LEVELNologMinimum log level for the backend (for example debug, log, warn, error).

[!NOTE] PLATFORM_HOST, PLATFORM_HTTPS, and PLATFORM_PORT together determine the base URL the platform uses for itself. Set them to match how users actually reach the instance.

Lombok uses PostgreSQL. There are two deployment shapes:

  • External database — you run Postgres separately and point Lombok at it
  • Embedded database — the standalone image bundles Postgres and manages it for you
VariableRequiredDefaultDescription
DB_HOSTYes (external)Database host. Required for external Postgres deployments. Must not be set when EMBEDDED_POSTGRES=true.
DB_PORTYes (external)Database port. Required for external Postgres deployments. Must not be set when EMBEDDED_POSTGRES=true.
DB_USERYesDatabase user.
DB_PASSWORDYesDatabase password.
DB_NAMEYesDatabase name.
EMBEDDED_POSTGRESNofalseWhen true, the container runs and manages its own bundled Postgres.
RUN_MIGRATIONSNofalseWhen true, runs pending database migrations on startup.
CREATE_DATABASENofalseWhen true, creates the database and user on startup if missing.
LOG_QUERIESNofalseWhen true, logs SQL queries. Useful for debugging, noisy in normal operation.

[!NOTE] For a first deployment against a fresh database you will often set both CREATE_DATABASE=true and RUN_MIGRATIONS=true, as the demo compose files do.

These secure user sessions and email verification. Use strong, random values in any real deployment — the demo files ship with placeholders that must be replaced.

VariableRequiredDefaultDescription
AUTH_JWT_SECRETYesSecret used to sign authentication tokens.
AUTH_EMAIL_JWT_ALGORITHMNoHSAlgorithm family for email-verification tokens: HS or RS.
AUTH_EMAIL_VERIFICATION_JWT_SECRETConditionalRequired when AUTH_EMAIL_JWT_ALGORITHM=HS.
AUTH_EMAIL_VERIFICATION_JWT_PUBLIC_KEYConditionalRequired when AUTH_EMAIL_JWT_ALGORITHM=RS.
AUTH_EMAIL_VERIFICATION_JWT_PRIVATE_KEYConditionalRequired when AUTH_EMAIL_JWT_ALGORITHM=RS.

[!NOTE] The default algorithm is HS, so most deployments only need AUTH_JWT_SECRET and AUTH_EMAIL_VERIFICATION_JWT_SECRET.

Object storage (S3-compatible buckets, MinIO, and similar providers) is not configured through operator environment variables in a normal production deployment. Storage is configured at runtime by an administrator through the application’s storage-provision settings.

The DEV_S3_* variables you may see in the repo are for local development only.

These control embedded-worker and runtime internals. Most operators do not need to set them; they are listed here only so they are not mistaken for required configuration.

VariableDefaultDescription
INIT_EVENT_JOBSfalseInitialize event jobs on startup.
DISABLE_CORE_WORKERfalseDisable the embedded core worker.
PRINT_CORE_WORKER_OUTPUTfalsePrint core-worker output to logs.
PRINT_CORE_WORKER_NSJAIL_VERBOSE_OUTPUTfalseVerbose nsjail output for the core worker.
APP_USERbunOS user the backend process runs as inside the container.
APP_UI_HOSThttp://127.0.0.1:3001Internal upstream the bundled NGINX proxies the UI to.

[!NOTE] Some demo compose files reference additional flags that do not currently map cleanly to variables read by the application. They are intentionally not documented here as supported operator configuration.

The following variables are for local development and are not intended for operators of a self-hosted instance:

  • PGDATA_DIR, MINIO_DATA_DIR
  • DOCKER_HOST_CONFIG
  • DEV_S3_ACCESS_KEY_ID, DEV_S3_SECRET_ACCESS_KEY, DEV_S3_BUCKET_NAME, DEV_S3_PREFIX, DEV_S3_REGION, DEV_S3_ENDPOINT, DEV_S3_LABEL
  • DEV_SEED_FILE

See DEVELOPMENT.md in the application repository for the dev workflow.