Environmental Variables

March 10, 2026 · View on GitHub

Environmental variables for docker compose. All Should be placed in a single .env file, saved in the same folder as docker-compose.yml file

CMS Web Variables

VariableDescriptionRequiredDefaultMore Details
CMS_DB_USERCMS Database userYES
CMS_DB_NAMECMS Database nameYES
CMS_DB_PASSWORDCMS Database password.YES
CMS_DB_VOLUMEMounted docker volume path for persisting database dataYES
CMS_SITE_NAMEThe human-readable name of your Wagtail installation which welcomes users upon login to the Wagtail admin.YES
CMS_ADMIN_URL_PATHBase Path to admin pages. Do not use admin or an easy to guess path. Should be one word and can include an hyphen. DO NOT include any slashes at the start or the end.YES
CMS_DEBUGA boolean that turns on/off debug mode. Never deploy a site into production with DEBUG turned onNOFalse
CMS_PORTPort to run cmsYES80
CMS_BASE_URLThis is the base URL used by the Wagtail admin site. It is typically used for generating URLs to include in notification emails.NO
CMS_DEFAULT_LANGUAGE_CODEThe language code for the CMS. Availabe codes are en for English, fr from French, ar for Arabic, am for Amharic, es for Spanish, sw for Swahili. Default is en if not setNOen
CSRF_TRUSTED_ORIGINSThis variable can be set when CMS_PORT is not 80 e.g if CMS_PORT=8000, CSRF_TRUSTED_ORIGINS would be the following: http://{YOUR_IP_ADDRESS}:8000, http://{YOUR_IP_ADDRESS}, http://localhost:8000 and http://127.0.0.1:8000NO
TIME_ZONEA string representing the time zone for this installation. See the list of time zones. Set this to your country timezoneNOUTCList of tz database time zones
SECRET_KEYA secret key for a particular Django installation. This is used to provide cryptographic signing, and should be set to a unique, unpredictable value. Django will refuse to start if SECRET_KEY is not setYESYou can use this online tool https://djecrety.ir to generate the key and paste
ALLOWED_HOSTSA list of strings representing the host/domain names that this Django site can serve. This is a security measure to prevent HTTP Host header attacks, which are possible even under many seemingly-safe web server configurations.YESDjango Allowed Hosts
SMTP_EMAIL_HOSTThe host to use for sending emailNO
SMTP_EMAIL_PORTPort to use for the SMTP server defined in SMTP_EMAIL_HOSTNO25
SMTP_EMAIL_USE_TLSWhether to use a TLS (secure) connection when talking to the SMTP server. This is used for explicit TLS connections, generally on port 587NOTrue
SMTP_EMAIL_HOST_USERUsername to use for the SMTP server defined in SMTP_EMAIL_HOST. If empty, Django won’t attempt authentication.NO
SMTP_EMAIL_HOST_PASSWORDPassword to use for the SMTP server defined in SMTP_EMAIL_HOST. This setting is used in conjunction with SMTP_EMAIL_HOST_USER when authenticating to the SMTP server. If either of these settings is empty, Django won’t attempt authentication.NO
CMS_ADMINSA list of all the people who get code error notifications, in format "Name <name@example.com>, Another Name <another@example.com>"NO
DEFAULT_FROM_EMAILDefault email address to use for various automated correspondence from the site manager(s)NO
RECAPTCHA_PUBLIC_KEYGoogle Recaptcha Public Key. https://www.google.com/recaptcha/about/ will need a Google account for RECAPTCHA_PRIVATE_KEY and RECAPTCHA_PUBLIC_KEY creationNO
RECAPTCHA_PRIVATE_KEYGoogle Recaptcha Private KeyNO
CMS_NUM_OF_WORKERSGunicorn number of workers. Recommended value should be (2 x $num_cores) + 1 . For example, if your server has 4 CPU Cores, this value should be set to 9, which is the result of (2 x 4) + 1 = 9YESGunicorn Workers details
CMS_STATIC_VOLUMEMounted docker volume path for persisting CMS static filesYES./climeb/static
CMS_MEDIA_VOLUMEMounted docker volume path for persisting CMS media filesYES./climeb/media
CMS_UPGRADE_HOOK_URLWebhook url to your server that triggers a cms upgrade scriptNO
BACKUP_VOLUMEMounted docker volume path for persisting Backup dp and media filesYES./climeb/backup

MQTT Broker Variables

VariableDescriptionRequiredDefault
CMS_BROKER_USERNAMEUsername for MQTT brokerYEScms
CMS_BROKER_PASSWORDPassword for MQTT brokerYES
CMS_BROKER_QUEUE_MAXThe maximum number of QoS 1 or 2 messages to hold in the queue (per client) above those messages that are currently in flight. See for details here https://mosquitto.org/man/mosquitto-conf-5.htmlYES1000

MapViewer Variables

VariableDescription
MAPVIEWER_CMS_APICMS API Endpoint for MapViewer. This should be the public path to your CMS root url , followed by /api. For example https://met.example.com/api
MAPVIEWER_NEXT_STATIC_VOLUMEMounted docker volume path for MapViewer static files
BITLY_TOKENBitly access token. The MapViewer uses Bitly for url shortening. See here on how to generate one
ANALYTICS_PROPERTY_ID
GOOGLE_CUSTOM_SEARCH_CX
GOOGLE_SEARCH_API_KEY