Where Does Grafana Loki Store Chunks and WAL?
Loki stores chunks, rules, and write ahead log under paths set in config, commonly /tmp/loki locally and /loki in Docker.
Last updated
Loki splits local state three ways. Chunks hold compressed log streams per tenant. The write ahead log holds recent writes for crash replay. Rules hold alert and recording definitions.
Local examples default to /tmp/loki, which is fine for a test and bad for anything else. The OS clears /tmp on reboot, so indexes vanish. For lasting installs, point all three at a persistent volume. The Docker sample config standardizes on /loki for that reason.
Where Grafana Loki stores this, by platform
/tmp/loki/chunks
Local default from docs and samples. Contains chunks and rules subfolders. Replace with a persistent mount in production; /tmp does not survive reboot.
/loki/wal
Docker compose convention. WAL at /loki/wal, rules at /loki/rules, chunks nearby. Mount the parent so ingesters replay correctly after restarts.
Frequently asked questions
Which Loki paths must be persistent in Docker?
Set chunks_directory, rules_directory, and the WAL dir to mounted volumes. The Docker example config uses /loki/wal, /loki/rules, and the chunks dir for exactly this.
Why are my Loki chunks in a folder called fake?
Single tenant mode uses a folder named fake for all chunks. That is the synthesized tenant name, not a bug, so look inside it for the actual chunk files.
Does Loki auto delete old chunks on disk?
Filesystem retention only deletes per your compactor retention settings. Watch disk yourself, since Loki never frees space based on free disk alone.
Notice an outdated path? Let us know.