Linux

Where Does Litestream Keep Config and Metadata?

Litestream reads /etc/litestream.yml by default, tracking each SQLite file plus a hidden metadata dir beside it.

Last updated

Litestream is configured, not discovered. The replicate daemon reads one YAML file, defaulting to /etc/litestream.yml, listing each database path and its replica target. The databases themselves stay where your app put them. Litestream only adds a small hidden metadata directory next to each one.

Systemd installs follow the same file, which keeps service definitions stable across config edits. Single database runs can skip the file and pass paths on the command line, but anything with two databases belongs in the YAML.

Where Litestream stores this, by platform

Linux
/etc/litestream.yml

Lists dbs paths plus replica targets. Override with the config flag or LITESTREAM_CONFIG. Systemd guide standardizes on this path.

Linux
/data

Container convention from the official Docker guide. Mount host data here and the config file to /etc/litestream.yml in the same run command.

Frequently asked questions

How do I use a config file outside /etc?

Pass the config flag with your file path, or set LITESTREAM_CONFIG in the environment. The default only applies when neither is given.

How do I run Litestream in Docker?

Mount both the data dir and the config file into the container. The docs pair /data for databases with /etc/litestream.yml for config in the run command.

What is the .db-litestream folder next to my database?

That hidden folder holds transaction tracking state for restores. With directory replication you can gather every database metadata under one meta dir instead.

Notice an outdated path? Let us know.