Linux

Where Does Zigbee2MQTT Store Config and Database?

Zigbee2MQTT keeps configuration.yaml, database.db, and coordinator backups in /app/data in Docker. Back up that folder.

Last updated

Zigbee2MQTT stores network truth in flat files. Configuration holds your devices and settings. database.db maps the mesh. The coordinator backup lets a new stick inherit the network.

All of it sits in one data folder, /app/data in Docker with a host bind you choose. That folder is the backup. Rebuilding everything else is easy, re-pairing dozens of devices is not.

Where Zigbee2MQTT stores this, by platform

Linux
/app/data (inside container)

Container-side data dir with configuration.yaml, database.db, coordinator_backup.json, state.json. Bind ./data or similar here.

Frequently asked questions

How do I back up Zigbee2MQTT?

Copy the whole data folder: configuration.yaml, database.db, coordinator_backup.json, and state files. Losing database.db forces re-pairing every device, the painful restore.

Does this differ on the Home Assistant add-on?

Use the Home Assistant add-on and its own backup, or the same data folder if you run standalone. The add-on wraps identical files, only the supervisor changes the path.

Can the data folder live elsewhere?

Set ZIGBEE2MQTT_DATA to another path. The default stays /app/data in Docker. Keep configuration.yaml writable since the frontend edits it.

Notice an outdated path? Let us know.