Where Does LocalStack Store State and Volumes?
LocalStack persists emulated AWS state in a host volume folder with per-OS defaults, mapped to /var/lib/localstack in Docker.
Last updated
LocalStack keeps container state in /var/lib/localstack with state, cache, logs, lib, and tmp underneath. On the host, that tree surfaces wherever your volume mount points: ./volume by default in compose, or OS-specific cache folders via the CLI.
Only state persists intentionally, and only with persistence enabled. Cache survives restarts for faster boots, tmp is wiped, and logs rotate per run. Back up the state folder for durable fixtures.
Where LocalStack stores this, by platform
~/.cache/localstack/volume
Default CLI host volume with state, cache, logs, lib, and tmp inside. Override with LOCALSTACK_VOLUME_DIR. CLI profiles live in ~/.localstack (CONFIG_DIR).
~/Library/Caches/localstack/volume
Same container layout (/var/lib/localstack) and overrides as Linux. The CLI default host path differs; compose users more often mount ./volume instead.
%LOCALAPPDATA%\localstack\cache\volume
Same semantics; host default under Local AppData. Keep the volume outside synced folders like OneDrive to avoid locking fights.
Frequently asked questions
How do I move the LocalStack volume?
Set the LOCALSTACK_VOLUME_DIR variable to the new folder before starting. Copy the old volume contents across with LocalStack stopped to keep state and caches.
LocalStack forgets my data on restart. How do I persist it?
Enable PERSISTENCE=1 so service state lands in the state subfolder of the mounted volume. Without it, everything except cache resets on restart by design.
Notice an outdated path? Let us know.