# Persistent volumes

Source : https://webgune.cloud/en-us/docs/volumes-persistants · Mis à jour le 2026-10-27

# Persistent volumes

By default, a service's filesystem is **ephemeral**: every redeploy starts fresh from the image, and any file written at runtime disappears. A **persistent volume** attaches a durable directory that survives redeploys and restarts.

## Adding a volume

In the service panel, **Volumes** tab:

1. **Mount path**: the directory seen by your application (e.g. `/app/uploads`).
2. **Size**: in GiB, based on your needs and your plan's limits.

The volume is provisioned and mounted on the container's next startup. Everything your application writes under this path is preserved.

## Use cases

| Need | Typical path |
|--------|----------------|
| User uploads | `/app/uploads` |
| SQLite database | `/app/data` |
| CMS content (WordPress, Ghost) | mounted automatically by [templates](/docs/templates-introduction) |
| Regenerable but costly cache | `/app/cache` |

```typescript
// The application simply writes to the mounted path
await fs.promises.writeFile("/app/uploads/avatar-42.png", buffer);
```

## What you need to know

- **The rest of the filesystem stays ephemeral**: only mounted paths persist. Don't rely on anything else.
- **Volume and scaling**: a volume is attached to one instance. If you plan to move to [multiple replicas](/docs/autoscaling), prefer shared storage (database, object storage) for data accessed by all instances.
- **Size is chosen at creation time**. Allow a bit of margin.
- **Deletion**: deleting a volume permanently erases its content. Export whatever needs to be kept first (via the [web terminal](/docs/terminal-exec), for example).

## Databases

Database-type services ([PostgreSQL](/docs/db-postgresql), [MySQL](/docs/db-mysql)…) are **already** backed by a platform-managed persistent volume: nothing to configure, your data natively survives restarts.
