Persistent Storage
Applications running on Slasha are containerised. By default, container filesystems are ephemeral—any data written inside a container is lost when the container restarts or when a new deployment is pushed. Slasha uses persistent Docker volumes to persist your data across restarts and updates.
The Default /data Volume
Every application is automatically allocated a persistent storage volume mounted at /data inside all its process containers. Slasha also injects the SLASHA_DATA_DIR environment variable set to /data.
This directory is highly recommended for storing persistent application files, file uploads, or SQLite databases (e.g. /data/app.db).
Volume Persistence: Data written to this volume (or any custom volumes) persists indefinitely. It survives container crashes, host reboots, new deployments, and scaling events. The only way to delete this data is by deleting the app or explicitly destroying the volume.
Custom Volumes (Dockerfile-Defined)
If your application requires mounting additional persistent directories, Slasha automatically detects them from your configuration.
Slasha parses custom volume paths directly from your Dockerfile. Any path defined using the VOLUME instruction is automatically created as a persistent Docker volume and mounted on every deploy:
# Example: Dockerfile custom volumes
FROM node:20
WORKDIR /app
COPY . .
# declare custom volume paths
VOLUME /app/uploads
VOLUME ["/app/cache", "/app/logs"]
CMD ["npm", "start"]When code containing these instructions is pushed, Slasha's build parser reads the VOLUME lines, provisions matching Docker volumes, and mounts them to the containers on boot.
/data persistent volume is mounted. If you require custom volume paths, you must provide a Dockerfile.