What persists
Everything on the VM’s disk persists by default:/workspaces/<repository-name>- your cloned repository and any changes/home/gitpod- your home directory, shell history, installed tools- System packages installed during setup
- Files created anywhere on the filesystem
Dev Container rebuilds
When you rebuild your Dev Container, most of the filesystem is recreated from the image. However, your repository at/workspaces/<repository-name> persists via a bind mount - your code and uncommitted changes remain intact.
To persist other directories across rebuilds, add bind mounts in your devcontainer.json:
Prebuilds and storage
Prebuilds capture a snapshot of the entire Dev Container filesystem - installed dependencies, built artifacts, and all files. When you start an environment from a prebuild, it loads from this snapshot instead of running setup from scratch. Prebuilds use the same persistent storage model as regular environments.Storage size
Storage size is configured through environment classes. When creating a custom environment class, you specify the disk size alongside the instance type. The recommendation is to use storage larger than RAM.Environment lifecycle
Persistent storage is tied to the environment’s lifecycle:- Stopped environment: Storage persists, you can resume later
- Archived environment (after 7 days inactive): Storage persists, can be unarchived
- Deleted environment: Storage is permanently removed