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

# Volumes

If your application writes configuration, session, or user data to the file system
and you want this data to persist across restarts you will need a
[fly volume](/volumes).  This doesn't apply if your
data is stored in a database elsewhere (for example in PostgreSQL, MySQL, or MongoDB),
but does apply if you are using Sqlite3.

## Creating a volume

Use [fly volumes create](/flyctl/cmd/fly_volumes_create) to create a volume.
You can specify a region and a size (in gigabytes).  Create one for each machine that you will
be deploying as volumes can't be shared between machines.  You will want to use the same
volume name for each volume if these volumes will be mounted by separate instances of the
same application.

## Mounting a volume

When you created a volume, you gave it a name.  Modify your `fly.toml` to contain
a [mounts section](/reference/configuration#the-mounts-section)
associating that source name with a destination file path:

```toml theme={null}
[mounts]
  source = "myapp_data"
  destination = "/data"
  processes= ["app"]
```

The `processes` section is optional if you only have one process defined in your toml.

## Accessing the volume

Modify your application to read and write from subdirectories of the destination path you
provided in your `fly.toml`.

In the case of Sqlite3, set the `DATABASE_URL` value to include this path.
