Docker Deploy
Docker is currently the only recommended deployment path for WG Free Mesh.
This is not a single-process web application. It includes the console, backend API, database, EMQX, MQTT authorization, client TLS certificates, downloadable artifacts, snapshots, and a unified gateway. The Docker layout keeps these components in a predictable network and directory structure, and it automatically handles most EMQX details that are easy to misconfigure manually.
For production, read Environment before starting. If the service will be exposed publicly, also read Reverse Proxy and publish the console and API through HTTPS.
Choose a Database
SQLite and PostgreSQL use the same application logic. Snapshots are exported at the application layer, so data can be migrated between the two modes.
| Mode | Best for | Notes |
|---|---|---|
| SQLite | Local use, lightweight deployments, single-admin setups, small node counts | File-based database, simple deployment, straightforward backup, low resource usage. |
| PostgreSQL | Long-running services, multi-user use, higher concurrency, production | Dedicated database service, more stable concurrency and connection pooling, better for future growth. |
Choose SQLite if you only want to get started. Choose PostgreSQL for long-term production use.
Before Starting
Check these items first:
.env.examplehas been copied to.env.- Production passwords and shared secrets have been changed.
WFM_PUBLIC_ORIGINis set to the real access URL, for examplehttps://wfm.example.com.- If MQTT, client control, and remote status are not needed,
WFM_ENABLE_MQTT_SERVICESis disabled andCOMPOSE_PROFILESis empty. - If the service is public, HTTPS reverse proxying is ready.
See Environment for details.
Start with SQLite
SQLite is the smallest deployment mode. Data is mounted into the project src/data directory for local inspection, backup, and migration.
cd docker/sqlite
cp .env.example .envEdit .env, then start:
docker compose up -dDefault URL:
http://localhost:8000Start with PostgreSQL
The PostgreSQL layout starts an additional database container. This is the recommended production mode.
cd docker/postgres
cp .env.example .envEdit .env. At minimum, change the PostgreSQL password, EMQX password, and shared secret. Then start:
docker compose up -dDefault URL:
http://localhost:8000After Startup
Open the console and complete administrator initialization. Then create a config, add nodes, download the client, and bind nodes.
If MQTT is enabled, EMQX may become ready later than the backend. Seeing temporary EMQX or node waiting states is normal. Once EMQX is online, the backend synchronizes accounts, authorization, and client connection data.
Update
After updating code, rebuild and restart from the selected Docker directory:
docker compose up -d --buildExport a snapshot from system settings before updating. Snapshots are application-level data and can be used to migrate between SQLite and PostgreSQL.
