Linux

Where Does Synapse Store Config and Data?

Synapse homeserver config, keys and media store for Debian, Docker and source installs.

Last updated

Synapse layouts depend on how you installed it. Debian and Ubuntu packages split config into /etc/matrix-synapse (homeserver.yaml plus conf.d overrides) and data into /var/lib/matrix-synapse (media store, database). Docker keeps everything under the mounted /data volume instead.

Two habits save pain. Put custom settings in conf.d/*.yaml rather than editing homeserver.yaml, or apt upgrades will interrogate you about replacing your config. And back up the signing key with the database: losing it breaks federation trust for your server name permanently.

Where Synapse stores this, by platform

Linux
/etc/matrix-synapse/homeserver.yaml

Debian/Ubuntu main config (listeners, database, secrets). Local overrides in /etc/matrix-synapse/conf.d/*.yaml. Signing key at /etc/matrix-synapse/homeserver.signing.key. Media in /var/lib/matrix-synapse/media. Docker: /data/homeserver.yaml, key and media_store under the volume. Source installs use --config-path and media_store_path wherever you set them.

Frequently asked questions

Should I edit homeserver.yaml directly on Debian?

Prefer /etc/matrix-synapse/conf.d/*.yaml for your settings. Direct edits to homeserver.yaml trigger package upgrade prompts and risk being overwritten; conf.d files survive upgrades untouched.

What must I back up for a Synapse server?

The database, the media store and the .signing.key file together. Config without the key loses federation identity, and the key without the database loses history; all three travel as a set.

Notice an outdated path? Let us know.