Skip to main content
Version: Pro Edition for Eclipse Mosquitto 3.3

Environment Variables Documentation

This document provides an overview of the environment variables that customers need to configure or be aware of when using Cedalo's Premium Mosquitto distribution and related Platform products. The variables are categorized by product.

Environment Variables (Env Vars) are key-value pairs used to configure software behavior without changing the source code. They allow for flexible setup of features such as licensing, security, endpoint URLs, and runtime options depending on the deployment environment.

In the Cedalo Premium Mosquitto and MQTT Platform products, environment variables can be set differently based on deployment method:

  • RPM (RedHat Package Manager): Environment variables are configured in a file located at /etc/opt/cedalo/mosquitto-platform/environment for the platform. This environment file should contain all relevant key-value pairs for the service and is read during startup. For help look into the environment.example file to give an understanding of the file structure.
  • Docker Compose: Environment variables are typically defined in the docker-compose.yml file under the service's environment section or in an .env file referenced by Docker Compose.
  • OpenShift and Kubernetes: Env Vars are specified in the deployment manifests (Deployment, StatefulSet etc.) under the env: section for containers, often referencing ConfigMaps and Secrets to securely manage sensitive data.
  • Portainer: Environment Variables can be set through the container configuration interface under the "Env" tab or by attaching environment files during container creation.

Correct configuration of environment variables is essential for enabling the features and secure operation of the Cedalo MQTT products across different infrastructure setups.

Mosquitto Core Variables​

These variables configure core Mosquitto broker features like licensing, security, identity, and persistence.

VariableCategoryValid InputsDescriptionDefault Value
CEDALO_LICENSE_FILELicense ManagementPath to license fileLicense file path. Related to CEDALO_LICENSE_KEY and CEDALO_LICENSE_MODE.
CEDALO_LICENSE_KEYLicense ManagementBase64 license dataLicense data. Recommended to use CEDALO_LICENSE_FILE instead.
INFLUX_TOKENSecurity & Authentication(string)Token for InfluxDB metrics plugin; alternatively set in mosquitto.conf.
MOSQUITTO_DYNSEC_PASSWORDSecurity & AuthenticationMinimum 12 charactersPassword to initialize Dynsec admin user on fresh broker startup.
MOSQUITTO_PERSISTENCE_LOCATIONData & PersistencePath to directoryOverrides persistence_location in mosquitto.conf.
PUIDSecurity & AuthenticationDecimal integerRun container under this user ID if started as root.
PGIDSecurity & AuthenticationDecimal integerRun container under this group ID if started as root.
UMASK_SETSecurity & AuthenticationOctal integerFile creation umask setting.
HOSTNAMENetworking & Host ConfigurationASCII stringUsed in HA and MongoDB Bridge features. Default: <Unknown>.
SERVICENAMENetworking & Host ConfigurationASCII stringService name for Docker Swarm name lookup.

Mosquitto Platform Variables​

Environment variables configuring MQTT Platform features such as API endpoints, licensing, authentication, and session management.

VariableCategoryDescriptionDefault Value
API_INTERNAL_HOSTPlatform UI ConfigurationHostname for internal container communication, usually container name.localhost
AUTH_TRUST_HOSTNetworking & Host ConfigurationNeeded variable set to true for Platform to trust NEXTAUTH_URL
BASE_URLNetworking & Host ConfigurationPublic-facing URL of the Platform.
NEXTAUTH_URLNetworking & Host ConfigurationAuthentication URL, often same as BASE_URL.
HOSTNAMENetworking & Host ConfigurationHostname the Platform listens on.
PORTNetworking & Host ConfigurationPort the Platform listens on.
CEDALO_LICENSE_KEYLicense ManagementPlatform license key, takes precedence over MOSQUITTO_PLATFORM_LICENSE_FILE.
MOSQUITTO_PLATFORM_LICENSE_FILELicense ManagementLicense file path for the Platform.
AUTH_SECRETSecurity & AuthenticationSecret used for authentication and session management.
SESSION_MAXAGESession & Usage LimitsMaximum session age.
SYSTOPIC_HISTORY_LIMITSession & Usage LimitsLimits history size for system topics.

Platform Enterprise Variables​

Environment variables exclusive to Platform Enterprise edition, mostly configuring HTTPS, SSO, LDAP integration, and rate-limiting.

VariableCategoryDescription
ENABLE_HTTP_REDIRECTPlatform UI ConfigurationEnables HTTP redirect if HTTPS is activated.
HTTP_PORTPlatform UI ConfigurationPort number for HTTP redirect.
MOSQUITTO_PLATFORM_HTTPS_CA_PATHEnterprise Security & AuthenticationPath to CA file for HTTPS.
MOSQUITTO_PLATFORM_HTTPS_CERT_PATHEnterprise Security & AuthenticationPath to HTTPS certificate file.
MOSQUITTO_PLATFORM_HTTPS_KEY_PATHEnterprise Security & AuthenticationPath to private key file for HTTPS.
AUTH_CUSTOM_ALLOWED_SIGNUP_EMAILSEnterprise Security & AuthenticationWhitelist of emails allowed to sign up via SSO.
AUTH_CUSTOM_DEBUGEnterprise Security & AuthenticationEnables debug logging for SSO flows.
AUTH_CUSTOM_INFER_NAMEEnterprise Security & AuthenticationAttempts to extract user name from SSO claims.
AUTH_CUSTOM_LOGO_URLEnterprise Security & AuthenticationURL to logo displayed on SSO button.
AUTH_CUSTOM_NAMEEnterprise Security & AuthenticationOverrides default label on SSO button.
AUTH_CUSTOM_OIDC_CLIENT_IDEnterprise Security & AuthenticationClient ID for OIDC authentication.
AUTH_CUSTOM_OIDC_TOKEN_URLEnterprise Security & AuthenticationToken URL endpoint for OIDC.
AUTH_CUSTOM_SAML_IDP_URLEnterprise Security & AuthenticationIdentity Provider URL for SAML.
AUTH_LDAP_URLEnterprise Security & AuthenticationLDAP server connection URL.
AUTH_LDAP_ADMIN_DNEnterprise Security & AuthenticationLDAP admin distinguished name for binding.
AUTH_LDAP_ADMIN_PASSWORDEnterprise Security & AuthenticationPassword for LDAP admin user.
AUTH_LDAP_SCOPEEnterprise Security & AuthenticationLDAP search scope.
RATE_LIMIT_ENABLERate Limiting & Usage ControlsEnables rate limiting on requests.
RATE_LIMIT_MAXRate Limiting & Usage ControlsMaximum allowed requests within rate limit window.