Configuration reference
Go services read the Param struct from YAML and/or environment (see Self-hosted overview). The Next.js app uses process environment variables at build time and runtime. Env names mirror YAML keys: same name in UPPER_SNAKE_CASE.
Go services: loading
SECUREBUILD_CONFIG_SOURCE— Path to a.yaml/.ymlfile, orenvfor environment-only. Unset defaults to the core team's hosted config path—set explicitly for self-hosted.- When using a YAML file, any set environment variable with a matching name overrides that key.
Go services: Param fields
All keys below are defined on Param in pkg/param/param.go.
Database & APK
| YAML key | Environment | Description |
|---|---|---|
| db_uri | DB_URI | PostgreSQL connection URI. |
| apk_repository | APK_REPOSITORY | HTTPS base URL for the public APK origin (no trailing slash). |
| apk_public_key_name | APK_PUBLIC_KEY_NAME | Filename segment for GET /key/<name> on the APK proxy. |
| apk_public_key_data | APK_PUBLIC_KEY_DATA | Base64-encoded public key PEM (full file including headers). |
| apk_signing_key_data | APK_SIGNING_KEY_DATA | Base64-encoded private key PEM for signing APKINDEX (full file including headers). |
Registry
| YAML key | Environment | Description |
|---|---|---|
| registry_image_prefix | REGISTRY_IMAGE_PREFIX | Image reference prefix (host or host/path; no scheme or tag). |
| oci_image_prefix | OCI_IMAGE_PREFIX | Optional alternate prefix for proxy/local flows; empty uses registry_image_prefix everywhere. |
| registry_username | REGISTRY_USERNAME | Registry login name. |
| registry_password | REGISTRY_PASSWORD | Registry password or token. |
LLM providers
| YAML key | Environment | Description |
|---|---|---|
| anthropic_api_key | ANTHROPIC_API_KEY | Anthropic API key. |
| openai_api_key | OPENAI_API_KEY | OpenAI API key. |
Pool
| YAML key | Environment | Description |
|---|---|---|
| pool_size | POOL_SIZE | VM pool sizing (see codebase for semantics). |
Cosign & keyless
| YAML key | Environment | Description |
|---|---|---|
| cosign_key | COSIGN_KEY | Cosign signing key material. |
| cosign_pub | COSIGN_PUB | Cosign public key. |
| cosign_password | COSIGN_PASSWORD | Password for encrypted cosign key. |
| oidc_gcp_project_id | OIDC_GCP_PROJECT_ID | GCP project for OIDC keyless signing. |
| oidc_gcp_attestor_account | OIDC_GCP_ATTESTOR_ACCOUNT | GCP attestor account. |
| oidc_gcp_attestor_key_json | OIDC_GCP_ATTESTOR_KEY_JSON | GCP service account JSON for attestor. |
Object storage (r2_* / S3-compatible)
| YAML key | Environment | Description |
|---|---|---|
| r2_bucket_name | R2_BUCKET_NAME | Primary bucket. |
| r2_access_key | R2_ACCESS_KEY | Access key ID. |
| r2_secret_key | R2_SECRET_KEY | Secret access key. |
| r2_endpoint | R2_ENDPOINT | S3 API endpoint URL. |
| r2_region | R2_REGION | SigV4 signing region. Set to your AWS bucket region (e.g. us-east-1) when using Amazon S3. Omit for Cloudflare R2 (defaults to auto). |
| r2_use_dynamic_folder | R2_USE_DYNAMIC_FOLDER | Dynamic folder layout flag. |
| r2_use_path_style | R2_USE_PATH_STYLE | Use path-style addressing (e.g. MinIO). |
Cloudflare
| YAML key | Environment | Description |
|---|---|---|
| cloudflare_account_id | CLOUDFLARE_ACCOUNT_ID | Account ID. |
| cloudflare_queue_name | CLOUDFLARE_QUEUE_NAME | Queue name. |
| cloudflare_api_key | CLOUDFLARE_API_KEY | API token or key. |
| cloudflare_zone_id | CLOUDFLARE_ZONE_ID | DNS zone ID. |
| cloudflare_cache_purge_token | CLOUDFLARE_CACHE_PURGE_TOKEN | Cache purge token. |
Integrations and secrets
| YAML key | Environment | Description |
|---|---|---|
| updater_github_api_token | UPDATER_GITHUB_API_TOKEN | GitHub token for updater. |
| release_monitor_api_token | RELEASE_MONITOR_API_TOKEN | Release Monitor API token. |
| external_registry_encryption_secret | EXTERNAL_REGISTRY_ENCRYPTION_SECRET | Secret for encrypting external registry data in the app. |
| oci_proxy_jwt_secret | OCI_PROXY_JWT_SECRET | JWT signing secret for OCI proxy tokens. |
| oci_proxy_skip_tls_verify | OCI_PROXY_SKIP_TLS_VERIFY | Skip TLS verify for OCI proxy upstream (dev only). |
Remote VM API (optional)
| YAML key | Environment | Description |
|---|---|---|
| replicated_api_origin | REPLICATED_API_ORIGIN | Base URL for remote VM provisioning HTTP API (omit if using local/static backends only). |
| replicated_api_token | REPLICATED_API_TOKEN | Bearer token for that API (not for registry login). |
| instance_type_x86 | INSTANCE_TYPE_X86 | Instance type name for x86 VMs (API-specific). |
| instance_type_arm64 | INSTANCE_TYPE_ARM64 | Instance type name for arm64 VMs. |
Spec sync & pipelines
| YAML key | Environment | Description |
|---|---|---|
| specsync_enabled | SPECSYNC_ENABLED | Enable spec sync. |
| specsync_github_token | SPECSYNC_GITHUB_TOKEN | GitHub token for spec sync. |
| specsync_github_branch | SPECSYNC_GITHUB_BRANCH | Branch for spec sync. |
| pipeline_dir | PIPELINE_DIR | Pipeline workspace root on the worker. Docker Compose dev stack: use /var/run/securebuild/pipelines (bind-mounted from dev-pipelines/ at repo root). Worker running on the host: use an absolute host path to the same directory. |
Logging, DB tooling, pprof
| YAML key | Environment | Description |
|---|---|---|
| log_level | LOG_LEVEL | Log level string. |
| grype_database_root | GRYPE_DATABASE_ROOT | Grype DB path. |
| vunnel_image | VUNNEL_IMAGE | Container image ref for vunnel. |
| pprof_enabled | PPROF_ENABLED | Enable Go pprof HTTP server. |
| remove_commit_sha_pins | REMOVE_COMMIT_SHA_PINS | Melange YAML: strip commit SHA pins. |
Build backends & auth
| YAML key | Environment | Description |
|---|---|---|
| build_backend | BUILD_BACKEND | Where builds run: local worker, static SSH hosts, or remote VM API (see pkg/buildbackend). |
| max_parallel_builds | MAX_PARALLEL_BUILDS | Concurrent builds per machine (default 1). |
| static_vms | STATIC_VMS | YAML list of {host, user, port, ssh_key_path | ssh_key} for static backend. |
| auth_method | AUTH_METHOD | App auth alignment; password | github. |
| admin_user_email | ADMIN_USER_EMAIL | Bootstrap admin email when using password auth without SMTP (see worker behavior). |
| admin_user_password | ADMIN_USER_PASSWORD | Bootstrap admin password (plaintext in config—protect accordingly). |
Next.js app: environment variables
The app reads configuration at runtime from process.env. NEXT_PUBLIC_* variables are inlined at build time and are visible in the browser bundle.
Values used via getParam (lib/data/param.ts)
Set PIPELINE_DIR on the app to the same filesystem path the worker uses (for example Doppler or your orchestrator env), and use a shared volume or mount so both processes see the same pipeline files—omitting it on the app produces a runtime error when server code reads pipelines.
| Variable | Description |
|---|---|
| DB_URI or SECUREBUILD_PG_URI | PostgreSQL URI for server-side data access. |
| REPLICATED_API_ORIGIN | Same meaning as Go Param when app needs API context. |
| REPLICATED_API_TOKEN | Same as Go Param. |
| REGISTRY_IMAGE_PREFIX | Registry prefix for server-side image URLs. |
| OCI_IMAGE_PREFIX | Optional alternate prefix (default empty). |
| PIPELINE_DIR | Required on the app and worker. Same path and shared storage on both (Compose dev: /var/run/securebuild/pipelines; host: absolute repo dev-pipelines/). |
| AUTH_METHOD | password | github. |
| ADMIN_GITHUB_ORG | GitHub org for membership checks when using GitHub auth. |
| APP_ORIGIN or NEXT_PUBLIC_APP_ORIGIN | Public origin URL for links and callbacks. |
| SMTP_HOST | SMTP server for password-auth email flows. |
| SMTP_PORT | SMTP port (default 587). |
| SMTP_USER | SMTP username. |
| SMTP_PASSWORD | SMTP password. |
| SMTP_FROM | From address for outbound mail. |
Auth & sessions
| Variable | Description |
|---|---|
| HMAC_SECRET | Secret for signing session JWT cookies (required in production). |
| GITHUB_CLIENT_SECRET | GitHub OAuth app client secret (GitHub auth). |
| NEXT_PUBLIC_GITHUB_CLIENT_ID | GitHub OAuth client ID (build-time). |
| NEXT_PUBLIC_GITHUB_REDIRECT_URI | OAuth redirect URI (build-time). |
| NEXT_PUBLIC_GITHUB_OAUTH_STATE | OAuth state parameter (build-time). |
Public build-time (NEXT_PUBLIC_*)
| Variable | Description |
|---|---|
| NEXT_PUBLIC_APK_REPOSITORY | APK repository base URL shown in the UI (must match deployment). |
| NEXT_PUBLIC_CENTRIFUGO_ADDRESS | Realtime/WebSocket service URL if used. |
| NEXT_PUBLIC_VERSION | Optional version string (e.g. for Datadog). |
| NEXT_PUBLIC_GODMODE_REDIRECT | Internal/debug redirect base if enabled in build. |
Other
| Variable | Description |
|---|---|
| EXTERNAL_REGISTRY_ENCRYPTION_SECRET | Encrypts sensitive external registry fields in the app. |
| STRIPE_SECRET_KEY | Stripe secret for billing features. |
| E2E_TEST_MODE | Enables test login paths when set. |
| DD_ENABLED, DD_SERVICE, DD_ENV, … | Datadog tracing/metrics (see datadog/tracer.ts). |
