Skip to main content

runku-server configuration reference

This reference describes the current compact server binary. The released Docker package supplies a reviewed subset with mounts and defaults; prefer that package for supported Self-Hosted operation. Unknown or inconsistent configuration fails before listeners accept traffic.

Commands

runku-server accepts exactly one optional command:

CommandReads dependenciesChanges durable stateSuccess
serve (default)all configured dependenciesinitializes bootstrap if absent; opens/migrates Product authoritiesruns until shutdown
checkparses configuration; constructs file backend and auth configurationno intended Product/identity mutationprints configuration valid
migratePlatform Identity PostgreSQL; optional Product root + Function PostgreSQLapplies idempotent migrationsprints migrations applied
recover-bootstrapPlatform Identity PostgreSQL and Platform state directoryreplaces lost pending first-owner material under explicit confirmationwrites new protected invitation
logs-workerNATS journal and S3 archiveconsumes/archives operational-log batcheslong-running worker
probe-liveloopback Management listenernoneexit 0 only for HTTP 204 /health/live
probe-readyloopback Management listenernoneexit 0 only for HTTP 204 /health/ready
versionnonenoneprints exact binary version

Unknown commands/arguments return SERVER_USAGE_INVALID. The binary emits stable error codes to stderr and a non-zero exit; configuration errors do not echo secret values.

Secret input convention

For inputs read as secrets, set either NAME=value or NAME_FILE=/absolute/path, never both. A secret file must be absolute, regular, non-symlinked, non-empty, at most 64 KiB, and contain valid UTF-8. One trailing LF or CRLF is removed. Empty, surrounding-whitespace, or control-character values fail closed.

Mounted files are preferred. The path is passed in the environment; the secret value is not. Protect file creation, ownership, backup, rotation, and deletion independently from Product state.

Required core settings

VariableRequired/defaultContract
RUNKU_IDENTITY_DATABASE_URL[_FILE]requiredPostgreSQL URL for Platform Identity; legacy RUNKU_DATABASE_URL is accepted but cannot coexist
RUNKU_PLATFORM_IDENTITY_PEPPER[_FILE]requiredexactly 32 bytes encoded base64url without padding; loss invalidates protected identity material
RUNKU_STATE_DIRECTORYrequiredabsolute non-root Platform state directory; contains bootstrap recovery state
RUNKU_MANAGEMENT_LISTEN127.0.0.1:3220Management bind address
RUNKU_MANAGEMENT_TLS_TERMINATEDfalsetrue asserts an external trusted TLS boundary; non-loopback plaintext is rejected
RUNKU_PUBLIC_MANAGEMENT_URLoptionalcanonical HTTPS origin, or allowed literal-loopback HTTP origin, advertised to clients
RUNKU_PRODUCT_ROOToptionalabsolute non-root initialized Product directory; without it, only Platform Identity/Management runs

The public Management URL cannot contain credentials, query, fragment, or an unrelated path. CLI discovery treats Authentication and Management origins as trust configuration and does not follow redirects.

The compact package sets a Product root and initializes its listener as 127.0.0.1:3210. Product HTTP starts lazily after an eligible Channel exists; the Management probe remains the container readiness signal.

Optional Product logical PostgreSQL

VariableContract
RUNKU_PLATFORM_DATABASE_URL[_FILE]separate PostgreSQL database for the attached Environment's documents, indexes, outbox, and schedules
RUNKU_PRODUCT_DATABASE_URL[_FILE]legacy alias; cannot coexist with the canonical name

This URL requires RUNKU_PRODUCT_ROOT, must name a different database from Platform Identity, and is bound atomically to the root's exact Project/Environment scope. It does not move Releases, Workspaces, Channels, application identity, serving, configuration, Cron, artifacts, object metadata, or operational logs out of the Product root. See Product PostgreSQL.

Product browser and functional identity

VariableDefaultContract
RUNKU_PRODUCT_ALLOWED_ORIGINSnoneexact comma-separated browser origins; duplicates, malformed values, or an excessive set fail
RUNKU_PRODUCT_AUTH_CONFIGnoneProduct-root-relative JWT provider JSON; absolute/empty/parent-traversing paths fail

These settings require a Product root. Origin authorization and JWT principal verification are independent from Application Keys. Requests without Origin remain eligible server-to-server calls; they still require all application and function authorization.

Platform OIDC and managed enrollment

VariableDefaultContract
RUNKU_PLATFORM_OIDC_CONFIGnonepath to strict Platform operator OIDC JSON
RUNKU_PLATFORM_MANAGED_ENROLLMENT_TOKEN[_FILE]noneshared secret authenticating the configured managed identity gateway
RUNKU_PLATFORM_MANAGED_SOURCE_AUTHORITYnoneexact authority name for monotonic managed grant reconciliation

Managed token and source authority must appear together. Platform OIDC is independent from the Product JWT provider. Use the schema, issuer/JWKS/PKCE/resource constraints, and rotation procedure in Platform operator identity; do not infer accepted keys.

Application Files and Object Storage byte backend

These settings select the shared physical byte boundary for both Action-oriented Application Files and Runku Object Storage, whose Product route supports a bounded S3-compatible protocol. The two storage capabilities use disjoint generated namespaces. For backend choice, capacity math, provider permissions, canaries, backup, restore, migration, and incident response, use Storage configuration and limits.

VariableDefaultMeaning
RUNKU_FILE_STORAGE_BACKENDfilesystemfilesystem or s3
RUNKU_FILE_STORAGE_FILESYSTEM_ROOTProduct-owned defaultoptional absolute non-root dedicated byte directory
RUNKU_FILE_STORAGE_ENVIRONMENT_BYTES10 GiBcommitted + reserved Environment byte ceiling
RUNKU_FILE_STORAGE_FILE_BYTES256 MiBone-file ceiling
RUNKU_FILE_STORAGE_ACTION_BYTES2 MiBbytes copied into an Action
RUNKU_FILE_STORAGE_CONCURRENT_UPLOADS16active streamed uploads
RUNKU_FILE_STORAGE_CONCURRENT_DOWNLOADS64active response streams
RUNKU_FILE_STORAGE_MAXIMUM_LIVE_UPLOAD_GRANTS4096unexpired grants retained for replay/admission
RUNKU_FILE_STORAGE_MAXIMUM_FILES100000ready/deleting metadata rows
RUNKU_FILE_STORAGE_MAXIMUM_PENDING_USAGE_EVENTS1000000durable usage events awaiting acknowledgement
RUNKU_FILE_STORAGE_FILESYSTEM_MINIMUM_FREE_BYTES512 MiBpost-reservation disk floor
RUNKU_FILE_STORAGE_UPLOAD_GRANT_TTL_SECONDS900upload-grant lifetime
RUNKU_FILE_STORAGE_DOWNLOAD_GRANT_MAX_TTL_SECONDS900maximum requested download-grant lifetime

Limits must be positive and internally ordered: Action ≤ file ≤ Environment. Concurrency is 1..=10000; file/grant/event counts have validated ceilings; TTLs are one second through 24 hours. Changing a limit affects new admission, not the identity or digest of already committed files.

External S3-compatible byte backend

VariableRequired/defaultContract
RUNKU_FILE_STORAGE_S3_BUCKETrequiredexisting bucket
RUNKU_FILE_STORAGE_S3_REGIONrequiredsigning/region value
RUNKU_FILE_STORAGE_S3_PREFIXemptyinstallation-unique object prefix
RUNKU_FILE_STORAGE_S3_ENDPOINTprovider defaultoptional compatible endpoint
RUNKU_FILE_STORAGE_S3_VIRTUAL_HOSTED_STYLEfalseboolean addressing mode
RUNKU_FILE_STORAGE_S3_ALLOW_LOOPBACK_HTTPfalsedevelopment-only HTTP exception for loopback endpoints
RUNKU_FILE_STORAGE_S3_ACCESS_KEY_ID[_FILE]provider chainstatic credential ID when paired with secret
RUNKU_FILE_STORAGE_S3_SECRET_ACCESS_KEY[_FILE]provider chainstatic secret when paired with ID
RUNKU_FILE_STORAGE_S3_SESSION_TOKEN[_FILE]noneoptional only with the complete static pair

An incomplete static pair fails. Without all static fields the backend uses its environment/provider credential mechanism. Scope the credential to the exact bucket/prefix and required operations. An external object-store backend is outside the compact backup helper; coordinate its recovery point before declaring a backup complete.

Application-file usage sink

VariableDefaultContract
RUNKU_FILE_USAGE_SINK_URLnoneHTTPS endpoint for authoritative file usage events
RUNKU_FILE_USAGE_CELL_IDnonebounded installation/cell identity paired with URL
RUNKU_FILE_USAGE_SINK_TOKEN[_FILE]nonebearer material paired with URL
RUNKU_FILE_USAGE_SINK_ALLOW_LOOPBACK_HTTPfalsepermits a loopback-only test sink
RUNKU_FILE_USAGE_INTERVAL_SECONDS5flush interval

The tuple is all-or-none and requires a Product root. Usage facts are durable until acknowledged; the sink must deduplicate stable event identities. These facts are distinct from operational logs and must not be reconstructed from them.

Operational Log archive

VariableDefaultContract
RUNKU_LOG_ARCHIVE_BACKENDfilesystemfilesystem keeps the embedded Product archive; s3 opens external immutable history
RUNKU_LOG_ARCHIVE_S3_BUCKETrequired for s3existing archive bucket
RUNKU_LOG_ARCHIVE_S3_REGIONrequired for s3signing/region value
RUNKU_LOG_ARCHIVE_S3_PREFIXemptyunique archive prefix
RUNKU_LOG_ARCHIVE_S3_ENDPOINTprovider defaultoptional compatible endpoint
RUNKU_LOG_ARCHIVE_S3_VIRTUAL_HOSTED_STYLEfalseboolean addressing mode
RUNKU_LOG_ARCHIVE_S3_ALLOW_HTTPfalseexplicit test-only HTTP policy; prefer HTTPS

The archive SDK obtains its provider credentials from the process environment/mounted provider configuration used by the released overlay. Do not reuse application-byte credentials unless the combined authority is an explicit security decision.

Optional replicated log journal

VariableDefaultContract
RUNKU_LOG_JOURNAL_URLnonetls://host:port, or nats:// only for loopback
RUNKU_LOG_JOURNAL_REPLICAS3JetStream stream replica count
RUNKU_LOG_JOURNAL_CREDENTIALS_FILEnoneabsolute, regular, non-symlinked NATS credentials file
RUNKU_LOG_ARCHIVE_BATCH_WAIT_SECONDS30logs-worker wait in 1..=60

A journal requires S3 log archive configuration. logs-worker reads the same variables and moves verified batches into the immutable archive. Journal retention and worker lag must be sized together; NATS is not Product data authority.

Validation, rotation, and rollback

Before a change:

  1. capture the current non-secret configuration hash and exact image digest;
  2. create and verify a coordinated backup when the change touches state or keys;
  3. run the released package preflight/runku-server check with the proposed mounts;
  4. change one boundary at a time and restart within the maintenance procedure;
  5. verify Management readiness, Product readiness if promoted, identity, one Query, storage, and log archive status.

Changing a Channel is application rollback. Changing an image or database schema is a server upgrade. Replacing a pepper/key can invalidate encrypted/authentication state. These are separate procedures and cannot substitute for one another.

For stable error-code diagnosis, use Troubleshooting. For exact packaged variable wiring and profile combinations, use the Docker standalone guide.