Skip to content

Configuration

StackRivet reads its configuration from environment variables (with sensible local defaults), so the same artifact runs in every environment. Secrets stay in the environment and are never committed.

The groups below are the settings you’ll use most often. A common local pattern:

Terminal window
set -a && source .env && set +a # load all of the below at once
VariablePurposeExample
STACKRIVET_DB_VENDORDialectmysql (default) / postgresql
STACKRIVET_DB_HOSTHostlocalhost
STACKRIVET_DB_NAMEDatabase namestackrivet
STACKRIVET_DB_USERUser
STACKRIVET_DB_PASSWORDPassword(env only)

Redis backs JWT revocation and the health check, so it must be configured:

VariablePurpose
STACKRIVET_REDIS_HOST / STACKRIVET_REDIS_PORTRedis connection
STACKRIVET_REDIS_USERNAME / STACKRIVET_REDIS_PASSWORDRedis auth (if set)
STACKRIVET_REDIS_DATABASE / STACKRIVET_REDIS_SSLDB index / TLS toggle
VariablePurpose
STACKRIVET_SECURITY_JWT_SECRETToken signing secret — set a strong value in every non-local environment
VariablePurpose
STACKRIVET_STORAGE_TYPElocal (default) / s3 / aliyun_oss
STACKRIVET_S3_ENDPOINT / _REGION / _ACCESS_KEY / _SECRET_KEYS3-compatible (MinIO, AWS S3)
STACKRIVET_ALIYUN_OSS_ENDPOINT / _ACCESS_KEY / _SECRET_KEYAliyun OSS

These feed the stackrivet.asset.* block (storage-type, max-file-size, allowed-extensions, signed-url-ttl). See Configure object storage for the full mapping and the region-match caveat.

KeyPurpose
stackrivet.scheduler.snailjob.enabledfalse by default; set true to activate the optional SnailJob adapter (Pro / Enterprise). See Tasks.
VariablePurpose
STACKRIVET_PROFILESpring profiles, e.g. dev or dev,otel to enable the OpenTelemetry profile

For environment-specific deployment, keep secrets in the runtime environment and document each deployment’s selected values in your own operations runbook.