Skip to main content

Configuration & Environment

How to configure a Workloom registry deployment.

Environment Variables​

Workloom uses a typed environment variable registry. Variables are categorized by type:

  • public — safe to expose to browser clients
  • secret — server-only credentials
  • connection — server-only connection strings

Required Variables​

VariableTypeDescription
DATABASE_URLconnectionPostgreSQL connection string
AUTH_SECRETsecretJWT/session signing secret

Authentication​

VariableDescription
AUTH_OIDC_ISSUEROIDC provider issuer URL
AUTH_OIDC_CLIENT_IDOIDC client ID
AUTH_OIDC_CLIENT_SECRETOIDC client secret
AUTH_OIDC_ROLE_SCOPEOAuth scope for role claims
AUTH_OIDC_ROLE_CLAIMJWT claim containing user groups
AUTH_OIDC_DEFAULT_ROLEFallback role (default: developer)
AUTH_OIDC_AUTO_PROVISION_ORGOrg slug for automatic membership
AUTH_GITHUB_ID / AUTH_GITHUB_SECRETGitHub OAuth (optional)
AUTH_GOOGLE_ID / AUTH_GOOGLE_SECRETGoogle OAuth (optional)

Role Mapping​

Map external IdP group names to Workloom's internal roles. Patterns support * glob matching.

VariableExample
ROLE_MAP_OWNERcto,org-owner
ROLE_MAP_ADMINplatform-admin,infra-admin,dev-lead-*
ROLE_MAP_MAINTAINERteam-lead-*,release-mgr
ROLE_MAP_DEVELOPERbackend-eng,frontend-eng,platform-eng
ROLE_MAP_VIEWERcontractor-*,intern-*

These are defaults — organizations can override mappings in the database via the role_mappings table.

Object Storage (S3)​

VariableDescription
S3_BUCKETBucket name for package uploads
S3_REGIONAWS region (default: us-east-1)
S3_ENDPOINTCustom endpoint (for MinIO, R2, etc.)
S3_ACCESS_KEY_IDAccess key
S3_SECRET_ACCESS_KEYSecret key
S3_FORCE_PATH_STYLESet true for MinIO/path-style URLs
S3_URL_TTL_SECONDSPresigned URL expiry (seconds)

Server​

VariableDescription
PORTAPI server port (default: 3001)
API_PORTPort for Next.js proxy rewrites
NODE_ENVdevelopment, production, or test
WL_REGISTRY_URLRegistry URL for CLI operations

File Loading Precedence​

Environment files are loaded in order (later overrides earlier):

  1. .env — base defaults
  2. .env.local — local overrides (gitignored)
  3. .env.${ENV} — environment-specific (e.g., .env.production)
  4. .env.${ENV}.local — environment-specific local overrides

Variable interpolation (${VAR_NAME}) is supported via dotenv-expand.

Minimal .env.local for Development​

DATABASE_URL=postgres://localhost:5432/workloom
AUTH_SECRET=dev-secret-change-in-production

# Optional: enable OIDC
AUTH_OIDC_ISSUER=https://your-idp.example.com
AUTH_OIDC_CLIENT_ID=your-client-id
AUTH_OIDC_CLIENT_SECRET=your-client-secret
AUTH_OIDC_ROLE_CLAIM=groups
AUTH_OIDC_AUTO_PROVISION_ORG=my-org

# S3 (MinIO for local dev)
S3_BUCKET=workloom-dev
S3_ENDPOINT=http://localhost:9000
S3_ACCESS_KEY_ID=minioadmin
S3_SECRET_ACCESS_KEY=minioadmin
S3_FORCE_PATH_STYLE=true