Skip to content

Configuration Reference

Environment variables and runtime settings for Stuff Stash.

Use this page when you are wiring Stuff Stash into a real environment or checking which values local Compose sets for you.

The API reads configuration from environment variables at startup.

TypeAccepted values
Booleantrue, false, 1, 0, yes, no, on, off
DurationGo duration strings such as 500ms, 10s, 2h
IntegerPositive base-10 integers
ListComma-separated values, trimmed and deduplicated

Invalid primitive values fall back to their defaults during API environment parsing. Unsupported adapter modes, missing required adapter settings, and invalid enabled provider settings fail startup.

VariableDefaultPurpose
STUFF_STASH_HTTP_ADDR:8080Address the API listens on.
STUFF_STASH_HTTP_READ_HEADER_TIMEOUT5sMaximum time to read request headers.
STUFF_STASH_HTTP_READ_TIMEOUT15sMaximum time to read a request.
STUFF_STASH_HTTP_WRITE_TIMEOUT30sMaximum time to write a response.
STUFF_STASH_HTTP_IDLE_TIMEOUT60sKeep-alive idle timeout.
STUFF_STASH_HTTP_MAX_JSON_BODY_BYTES1048576Maximum JSON request body size.
STUFF_STASH_CORS_ALLOWED_ORIGINSemptyComma-separated browser origins allowed to call the API.
VariableDefaultPurpose
STUFF_STASH_HTTP_RATE_LIMIT_ENABLEDtrueEnables API HTTP rate limiting.
STUFF_STASH_HTTP_RATE_LIMIT_REQUESTS1200Request budget per rate-limit window.
STUFF_STASH_HTTP_RATE_LIMIT_WINDOW1mRate-limit accounting window.
STUFF_STASH_HTTP_RATE_LIMIT_BURST600Burst allowance.
VariableDefaultPurpose
STUFF_STASH_AUTH_MODElocal-devAuthentication adapter. Use local-dev or oidc.
STUFF_STASH_OIDC_ISSUERemptyOIDC issuer URL when STUFF_STASH_AUTH_MODE=oidc.
STUFF_STASH_OIDC_CLIENT_IDemptyPrimary expected OIDC audience/client ID.
STUFF_STASH_OIDC_CLIENT_IDSemptyAdditional accepted OIDC client IDs, comma-separated.
STUFF_STASH_OIDC_MOBILE_CLIENT_IDemptyPublic native mobile OIDC client ID advertised to the mobile app.
STUFF_STASH_OIDC_MOBILE_REDIRECT_URIstuffstash://auth/callbackNative redirect URI advertised to the mobile app.
STUFF_STASH_OIDC_MOBILE_SCOPESopenid,email,profile,offline_accessComma-separated scopes requested by mobile sign-in.

STUFF_STASH_OIDC_CLIENT_ID is included in the accepted client ID set even when STUFF_STASH_OIDC_CLIENT_IDS is also configured.

VariableDefaultPurpose
STUFF_STASH_AUTHZ_MODEmemoryAuthorization adapter. Use memory or spicedb.
STUFF_STASH_SPICEDB_ENDPOINTemptySpiceDB gRPC endpoint.
STUFF_STASH_SPICEDB_PRESHARED_KEYemptySpiceDB preshared key. Empty is only suitable for local serve-testing.
STUFF_STASH_SPICEDB_TLS_ENABLEDtrueEnables TLS for SpiceDB connections.
STUFF_STASH_SPICEDB_CA_PATHemptyOptional CA certificate path for self-signed or private SpiceDB TLS.
STUFF_STASH_SPICEDB_BOOTSTRAP_SCHEMAfalseBootstraps the checked-in SpiceDB schema on startup.
STUFF_STASH_SPICEDB_SCHEMA_PATHdeploy/spicedb/schema.zedSchema file used when bootstrapping.
VariableDefaultPurpose
STUFF_STASH_REPOSITORY_MODEmemoryRepository adapter. Use memory, postgres, or sqlite.
STUFF_STASH_DATABASE_DSNemptyPostgres DSN or SQLite file path/DSN when using durable repository modes.

postgres and sqlite require STUFF_STASH_DATABASE_DSN. SQLite will create the parent directory for file-backed database paths.

SQLite is an API runtime mode, not the current Docker Compose self-hosting topology. The Compose stack uses the Postgres migration job and Postgres service unless a future SQLite-specific Compose file wires schema setup and a durable SQLite file mount explicitly.

VariableDefaultPurpose
STUFF_STASH_AUTHORIZATION_OUTBOX_DRAIN_LIMIT25Authorization outbox events claimed per drain.
STUFF_STASH_AUTHORIZATION_OUTBOX_DRAIN_INTERVAL10sBackground authorization outbox drain interval.
STUFF_STASH_AUTHORIZATION_OUTBOX_CLAIM_LEASE30sLease duration for claimed authorization outbox events.
STUFF_STASH_BLOB_DELETION_OUTBOX_DRAIN_LIMIT25Blob-deletion outbox events claimed per drain.
STUFF_STASH_BLOB_DELETION_OUTBOX_DRAIN_INTERVAL10sBackground blob-deletion outbox drain interval.
STUFF_STASH_BLOB_DELETION_OUTBOX_CLAIM_LEASE30sLease duration for claimed blob-deletion outbox events.
STUFF_STASH_BLOB_DELETION_OUTBOX_MAX_ATTEMPTS5Attempts before blob-deletion work is treated as terminal.
STUFF_STASH_IMPORT_JOB_TIMEOUT_SECONDS900Seconds before stored import source credentials are considered expired.
STUFF_STASH_IMPORT_CREDENTIAL_VACUUM_INTERVAL_SECONDS60Seconds between background cleanup passes for expired import source credentials.
STUFF_STASH_INVITATION_TTL168hDefault inventory invitation token lifetime.
STUFF_STASH_DEFAULT_PAGE_LIMIT50Default API collection page size.
STUFF_STASH_MAX_PAGE_LIMIT100Maximum accepted API collection page size.
VariableDefaultPurpose
STUFF_STASH_BLOB_STORAGE_MODEfilesystemBlob storage adapter. Use filesystem or s3.
STUFF_STASH_BLOB_STORAGE_PATH.stuffstash/blobsLocal filesystem blob path.
STUFF_STASH_MAX_ATTACHMENT_BYTES26214400Maximum attachment size in bytes.
STUFF_STASH_S3_ENDPOINTemptyS3-compatible endpoint host and port, without scheme.
STUFF_STASH_S3_PUBLIC_ENDPOINTemptyBrowser-reachable S3-compatible endpoint for direct uploads. Defaults to STUFF_STASH_S3_ENDPOINT when empty.
STUFF_STASH_S3_ACCESS_KEYemptyS3 access key.
STUFF_STASH_S3_SECRET_KEYemptyS3 secret key.
STUFF_STASH_S3_BUCKETemptyS3 bucket name.
STUFF_STASH_S3_REGIONgarageS3 region value.
STUFF_STASH_S3_SECUREtrueUses HTTPS for S3-compatible storage when true.

Set STUFF_STASH_S3_SECURE=false only for trusted local plain-HTTP storage, such as local Garage verification.

When browser clients upload directly to S3-compatible storage, the public endpoint must be reachable from the browser and the bucket must allow CORS for the web origin. For local Garage this usually means:

  • STUFF_STASH_S3_ENDPOINT=garage:3900 for API-to-Garage traffic.
  • STUFF_STASH_S3_PUBLIC_ENDPOINT=localhost:3900 or <server-lan-ip>:3900 for browser-to-Garage traffic.
  • a bucket CORS rule that allows the web origin to use GET and POST and exposes ETag.
VariableDefaultPurpose
STUFF_STASH_VOICE_DEV_FAKE_ENABLEDfalseEnables local development fake speech, language, and speech output providers.
STUFF_STASH_VOICE_GOOGLE_ENABLEDfalseEnables Google realtime voice provider adapters.
STUFF_STASH_VOICE_PROVIDER_HTTP_TIMEOUT60sHTTP timeout for configured realtime voice provider calls.
STUFF_STASH_GOOGLE_CLOUD_PROJECTemptyGoogle Cloud project ID. Required when Google voice providers are enabled.
STUFF_STASH_GOOGLE_CLOUD_LOCATIONus-central1Google Cloud location for Gemini.
STUFF_STASH_GOOGLE_GEMINI_MODELgemini-2.5-flash-liteGemini model name.
STUFF_STASH_GOOGLE_TTS_LANGUAGE_CODEen-USGoogle Text-to-Speech language code.
STUFF_STASH_GOOGLE_TTS_VOICE_NAMEen-US-Standard-CGoogle Text-to-Speech voice name.
STUFF_STASH_GOOGLE_CREDENTIAL_MODEadcGoogle credential source. Use adc or access_token.
STUFF_STASH_GOOGLE_ACCESS_TOKENemptyStatic Google access token when credential mode is access_token.

When STUFF_STASH_VOICE_GOOGLE_ENABLED=true, Google configuration is validated at startup. Google voice providers take precedence over development fakes when both are enabled.

VariableDefaultPurpose
STUFF_STASH_PROVIDER_CREDENTIAL_KEY_IDemptyIdentifier stored with sealed tenant provider credentials.
STUFF_STASH_PROVIDER_CREDENTIAL_KEYemptyBase64-encoded 32-byte AES-GCM key for sealing provider credentials and temporary import source material.

If active provider credentials exist, startup fails closed unless a valid provider credential sealing key is configured.

Generate a key with openssl rand -base64 32. Keep the key stable for a given deployment. Rotating or losing it can make stored provider credentials unreadable.

The web app reads /config.json at runtime. It is not configured through STUFF_STASH_* environment variables inside the browser bundle.

FieldRequiredPurpose
apiBaseUrlyesPublic API base URL. Trailing slashes are trimmed.
oidcIssueryesBrowser-visible OIDC issuer URL. Trailing slashes are trimmed.
oidcClientIdyesBrowser OIDC client ID.
oidcRedirectUriyesBrowser redirect URI after OIDC sign-in.
mediaUploadPolicy.supportedContentTypesnoAllowed upload content types. Defaults to JPEG, PNG, WebP, and PDF.
mediaUploadPolicy.maxBytesnoClient upload limit. Defaults to 5242880.

Example:

{
"apiBaseUrl": "https://api.example.test",
"oidcIssuer": "https://accounts.example.test",
"oidcClientId": "stuff-stash-web",
"oidcRedirectUri": "https://stuffstash.example.test/callback",
"mediaUploadPolicy": {
"supportedContentTypes": ["image/jpeg", "image/png", "image/webp", "application/pdf"],
"maxBytes": 5242880
}
}

Keep the web upload policy aligned with STUFF_STASH_MAX_ATTACHMENT_BYTES; the API remains authoritative.

The mobile app asks for a Stuff Stash instance URL, reads the API’s public mobile authentication metadata, and signs in with the configured OIDC provider. These Expo public variables are optional development defaults only.

Mobile booleans accept 1, true, yes, 0, false, and no.

VariableRequiredPurpose
EXPO_PUBLIC_STUFF_STASH_API_BASE_URLnoOptional API base URL seed shown on first launch.
EXPO_PUBLIC_STUFF_STASH_TENANT_IDnoOptional initial tenant selection hint.
EXPO_PUBLIC_STUFF_STASH_VOICE_DIAGNOSTICS_ENABLEDnoEnables mobile voice developer diagnostics.
VariableDefaultPurpose
STUFF_STASH_DOCS_SITEhttps://elsell.github.ioPublic site origin for Astro builds.
STUFF_STASH_DOCS_BASE/stuffstash/Base path for production or preview docs builds.

These variables are conveniences for local Compose. They are not API runtime settings unless they map to a STUFF_STASH_* variable above.

VariableDefaultPurpose
STUFF_STASH_HTTP_PORT8080Host port mapped to the API container.
POSTGRES_DBstuffstashLocal Compose Postgres database name.
POSTGRES_USERstuffstashLocal Compose Postgres user.
POSTGRES_PASSWORDstuffstash-localLocal Compose Postgres password.
POSTGRES_PORT5432Host port mapped to Postgres.
SPICEDB_GRPC_PORT50051Host port mapped to SpiceDB.
DEX_HTTP_PORT5556Host port mapped to Dex in the OIDC Compose override.
GARAGE_IMAGEpinned digestGarage image override. Must stay digest-pinned.
STUFF_STASH_API_IMAGEpinned digestPublished API image used by self-host Compose. Release automation updates this digest.
STUFF_STASH_WEB_IMAGEpinned digestPublished static web image used by self-host Compose. Release automation updates this digest.
GARAGE_S3_PORT3900Host port mapped to the Garage S3 API.
GO_BUILDER_IMAGEpinned digestAPI builder image override. Must stay digest-pinned.
RUNTIME_IMAGEpinned digestAPI runtime image override. Must stay digest-pinned.
NODE_BUILDER_IMAGEpinned digestWeb builder image override. Must stay digest-pinned.
WEB_RUNTIME_IMAGEpinned digestWeb runtime image override. Must stay digest-pinned.
PNPM_VERSION11.0.7pnpm version used by the web image build.