systems // DockerLAB

Docker Compose — Explicit Persistent Volume

Make application state survive container recreation by declaring storage outside the writable container layer.

dockercomposevolumepersistence
Context Pack →Open Workspace →
Trust & provenanceLAB
Evidence tierLABOfficial sources0Other sources1Last verified2026-10-05

Evidence tier describes my hands-on relationship with the content. Official sources describe platform contracts/documentation. Production observations should not automatically be treated as official limits.

EvidenceLAB
Difficultyfoundation
Verified2026-10-05
Use when

Self-hosted tools store configuration, workflows or application state locally.

services:
  n8n:
    image: n8nio/n8n:latest
    volumes:
      - n8n_data:/home/node/.n8n

volumes:
  n8n_data:
Why it works

Named volumes have a lifecycle independent from an individual container instance.

Operational notes

A persistent volume is not a backup. Export or snapshot important state separately.

Sources / verification