Skip to content

Configuration

Every env var the server reads. None are required, so the defaults will get you a running instance. Set what you need; ignore what you don't.

General

NameWhat it controlsDefault
PORTHTTP port3001
HOSTBind address0.0.0.0
API_TOKENTurns auth on (and authorizes first-run setup). See Authorization and the Authentication page.unset (open)
AUTH_SECRETEncrypts stored secrets (e.g. GitHub sync tokens).dev fallback
UI_AUTH_EXPIRE_HOURSIdle session lifetime, in hours (sliding; capped at 30 days absolute)12
COOKIE_SECURESecure flag on auth cookies. Set false only for plain-HTTP/Localhost.true
ROOT_USERNAMEBreak-glass admin username (recovery only; needs ROOT_PASSWORD)unset
ROOT_PASSWORDBreak-glass admin password (recovery only; needs ROOT_USERNAME)unset
DATA_STORAGEfs / s3 / azure. See Storage.fs
GITHUB_TOKENFallback token for GitHub Sync configs without one of their ownunset

Authorization

Set API_TOKEN to any non-empty value and auth turns on: the UI requires login, the API requires a session cookie or an API key. Leave it unset and the server runs in open mode - anyone with the URL gets full access, which may or may not be what you want. API_TOKEN is also the secret that authorizes first-run setup of the initial admin. More details - Authentication page.

Set AUTH_SECRET to a long random value so encrypted secrets (e.g. GitHub sync tokens) survive restarts. Without it the server falls back to a fixed dev key, which is unsafe for production. Rotating it invalidates anything it encrypted.

bash
# generate one
openssl rand -base64 32

S3

Set DATA_STORAGE=s3 plus:

NameWhat it controlsDefault
S3_ENDPOINTHostname only, no scheme
S3_REGIONRegion (auto for Google Cloud)
S3_ACCESS_KEYAccess key
S3_SECRET_KEYSecret key
S3_BUCKETBucket nameplaywright-reports-server
S3_PORTCustom port (self-hosted)
S3_USE_SSLUse HTTPS to the S3 endpoint (false for local MinIO over plain HTTP)true
S3_BATCH_SIZEConcurrent requests during cleanup10
S3_MULTIPART_CHUNK_SIZE_MBMultipart upload chunk size, MB25

When you pick S3, Litestream replicates the SQLite metadata DB to the same bucket automatically. See Storage -> S3 for the GCS quirks if you went the Google route.

Azure

Set DATA_STORAGE=azure plus:

NameWhat it controlsDefault
AZURE_ACCOUNT_NAMEStorage account
AZURE_ACCOUNT_KEYAccount key
AZURE_CONTAINERContainer name (created if missing)playwright-reports-server
AZURE_BATCH_SIZEConcurrent requests during cleanup10

Litestream replicates the SQLite metadata DB to the same container automatically. See Storage -> Litestream.

Checking what's actually set

The Settings page shows resolved environment. Useful after editing .env and forgetting to restart, which everyone has done at least once.

See also