Skip to content

Environment Reference ​

Environment variables use the WFM_ prefix. Docker examples live in docker/sqlite/.env.example and docker/postgres/.env.example.

Runtime ​

VariableDefaultMeaning
WFM_DEBUGfalseBackend debug mode.
WFM_ENABLE_DEV_TEST_APIfalseDevelopment exception switch; enables /api/v0 and skips production source restrictions.
WFM_TIMEZONEAsia/ShanghaiConsole display timezone.
WFM_AUTH_TOKEN_EXPIRE_MINUTES1440Administrator login token lifetime.
WFM_AUTH_DOWNLOAD_TOKEN_EXPIRE_MINUTES5Download token lifetime.

Public access / Gateway ​

VariableDefaultMeaning
WFM_PUBLIC_ORIGINhttp://localhost:8000Primary service origin. Use the public HTTPS entry in production.
WFM_EXTRA_ALLOWED_ORIGINS[]Additional allowed origins as a JSON array. Extends Origin only, not Host.
WFM_APP_PORT8000Gateway Web port exposed on the host.
WFM_GATEWAY_CLIENT_MAX_BODY_SIZE512mGateway request-body limit, including snapshot imports.

Database ​

VariableExampleMeaning
WFM_DATABASEsqlite:///./data/wg_free_mesh.dbSQLAlchemy database URL.
WFM_POSTGRES_DBwfmPostgreSQL container initialization database.
WFM_POSTGRES_USERwfmPostgreSQL user.
WFM_POSTGRES_PASSWORDwfmPostgreSQL password.
WFM_POSTGRES_PORT5432PostgreSQL port exposed on the host.

MQTT / EMQX ​

VariableDefaultMeaning
WFM_ENABLE_MQTT_SERVICEStrueEnables dynamic endpoints, client binding, MQTT, and remote control. Existing dynamic endpoints behave as static when disabled.
COMPOSE_PROFILESmqttIndependently controls whether Docker Compose starts the EMQX profile.
WFM_MQTT_URLmqtt://emqx:1883Internal broker URL used by the backend.
WFM_MQTT_PUBLIC_PORT1883Client plaintext MQTT port.
WFM_MQTT_PUBLIC_TLS_PORT8883Client TLS MQTT port.
WFM_MQTT_TLS_ENABLEDtrueEnables the client-facing MQTT TLS listener.
WFM_EMQX_API_BASE_URLhttp://emqx:18083Internal EMQX management API URL used by the backend.
WFM_EMQX_USERNAMEadminEMQX Dashboard, management API, and backend MQTT superuser name.
WFM_EMQX_PASSWORDpublicEMQX password; must be changed in production.
WFM_EMQX_NODE_COOKIEwfm-emqx-cookieEMQX node cookie.
WFM_EMQX_AUTHZ_SHARED_KEYwfm-internal-emqx-authzShared key for EMQX HTTP AuthZ callbacks; must be changed in production.
WFM_EMQX_AUTHZ_URLhttp://app:8000/api/internal/emqx/authzInternal backend callback used for topic authorization.