Where Does ntfy Store Config and Message Cache?
Where the ntfy push service keeps its server.yml config, message cache, and attachments on Linux.
Last updated
ntfy splits state two ways: server.yml for options and secrets, cache.db (SQLite) for messages, users, and subscriptions. Packages use /etc/ntfy plus /var/lib/ntfy; Docker maps both under volumes.
Messages are ephemeral by default with configurable retention, so the database matters less than the config. Backups still cover both, since user accounts live in the database. Attachments persist only when enabled with their own directory. The web app ships inside the binary. UnifiedPush uses the same config.
Where ntfy stores this, by platform
/etc/ntfy/server.yml
server.yml with auth, push keys, and limits here for package installs. Docker passes the same file via volume with cache.db beside it. Keep Firebase credentials out of shared compose files.
Frequently asked questions
how do i migrate ntfy to a new server
Copy server.yml plus the cache.db database (and attachments dir when enabled) to the new host, keeping versions matched. User accounts and subscriptions live in the database; topics are ephemeral by design. Firebase keys for Android push travel in the config.
where is the ntfy config file
In server.yml (/etc/ntfy/server.yml for packages). It holds listen addresses, auth, upstream push keys, and attachment limits. The defaults file documents every option; copy the section you need rather than the whole file.
does ntfy in docker need volumes
Yes for the database and config, or subscriptions and user accounts reset on every recreate. The image carries code only. Mount server.yml plus the cache dir as volumes and upgrades stay boring.
Notice an outdated path? Let us know.