Skip to main content

Module config

Module config 

Source
Expand description

Process configuration from the environment.

Every setting the CMS reads is named here, under one prefix, RCMS_. Earlier releases used three (RCMS_, CMS_, RUSTANGO_CMS_), so an operator who wrote RCMS_MEDIA_BACKEND silently got local disk; the old spellings are still read, after the canonical one.

SettingPurpose
RCMS_SECRET_KEYSigns preview tokens, password-reset links and other CMS artifacts; generated into ./var/.rustango_cms_signing.key when unset
RCMS_RENDITION_SIGNING_KEYRequires a signature on every image rendition URL (CMS-rendered URLs are signed either way)
RCMS_RENDITION_MAX_UNSIGNEDWithout a signing key, the most sizes unsigned anonymous requests can create per image (default 128)
RCMS_API_CORS_ORIGINSOrigins allowed to call /api/v2
RCMS_MEDIA_BACKENDlocal (default), memory or s3
RCMS_MEDIA_CDN_BASEBase URL crate::media_storage::public_url returns for stored objects (s3/memory backends). Pages the CMS renders keep serving media through /__media__/… with year-long immutable caching, so a CDN in front of the site caches them
RCMS_MEDIA_TENANT_BUCKETS / RCMS_MEDIA_TENANT_CDNSPer-tenant S3 buckets / CDNs, slug=value,…
RCMS_S3_BUCKET, _REGION, _ENDPOINT, _ACCESS_KEY_ID, _SECRET_ACCESS_KEY, _PATH_STYLES3 media backend
RCMS_SITE_HOST_SUFFIXESDomains a tenant may add hostnames under without approval
RCMS_DEFAULT_TIMEZONEAdmin timezone when a user has none
RCMS_DEFAULT_ADMIN_LOCALEAdmin language when a user has none
RCMS_PERF_LOG1 / true logs per-phase render timings
RCMS_NOTIFY_ALLOW_PRIVATE1 lets notification channels deliver to private-network addresses

Cache and search backends keep their providers’ own variable names (CLOUDFLARE_API_TOKEN, …), documented with each backend.

The framework’s own RUSTANGO_SECRET_KEY is needed too: it encrypts stored secrets such as notification-target tokens. Without it no notification target can be saved — the CMS logs a warning and a form’s email recipients get nothing.

Functions§

flag
true when setting name is 1 or true.
var
The value of setting name — given without its prefix, e.g. "MEDIA_BACKEND" — read as RCMS_<name>, then the legacy CMS_<name> and RUSTANGO_CMS_<name>. An empty value counts as unset.