> ## Documentation Index
> Fetch the complete documentation index at: https://ona.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Persistent storage

> What persists in Ona environments across stops, starts, and Dev Container rebuilds.

Ona environments use persistent storage attached to the underlying VM. Everything on disk persists across environment stops and starts.

## What persists

* `/workspaces/<repository-name>` - your cloned repository and any changes
* `/home/gitpod` - home directory, shell history, installed tools
* System packages installed during setup
* Files created anywhere on the filesystem

Stop an environment, come back later, and continue where you left off.

## Dev Container rebuilds

Rebuilding your Dev Container recreates most of the filesystem from the image. Your repository at `/workspaces/<repository-name>` persists via a bind mount - code and uncommitted changes remain intact.

To persist other directories across rebuilds, add bind mounts in your `devcontainer.json`:

```json theme={null}
{
  "mounts": [
    "source=/workspaces/.cache,target=/home/gitpod/.cache,type=bind"
  ]
}
```

## Prebuilds and storage

[Prebuilds](/ona/projects/prebuilds) snapshot the entire Dev Container filesystem - installed dependencies, built artifacts, and all files. New environments load from this snapshot instead of running setup from scratch.

## Storage size

Storage size is configured through [environment classes](/ona/runners/aws/environment-classes). Each runner type ([Ona Cloud](/ona/runners/ona-cloud), [AWS](/ona/runners/aws/environment-classes), [GCP](/ona/runners/gcp/overview)) provides classes with different disk sizes. Use storage larger than RAM.

## Storage lifecycle

| State                                                                                   | Storage                      |
| --------------------------------------------------------------------------------------- | ---------------------------- |
| Stopped                                                                                 | Persists - resume anytime    |
| Archived (after inactivity, [by plan or policy](/ona/environments/archive-auto-delete)) | Persists - can be unarchived |
| Deleted                                                                                 | Permanently removed          |

## Ephemeral vs persistent

For agents, the recommended workflow is [ephemeral environments](/ona/configuration/devcontainer/optimizing-startup-times) - one fresh environment per task for isolation. With prebuilds, starting fresh is fast enough that persistence is not needed.

For human developers, persistent environments work well for longer-running tasks where you want to maintain state across sessions.

## Troubleshooting

<Accordion title="&#x22;No space left on device&#x22;">
  Check usage with `df -h`. Select the **Regular** environment class (80 GB), or choose a larger class if your plan supports it.
</Accordion>
