Volumes
Attach a disk to a service so files survive deploys and restarts, and grow it when it fills up.
A volume is a disk mounted into a service that keeps its data through every deploy and restart. Use one for uploads, SQLite files and anything else your code writes to disk and needs to keep. For relational data, a PostgreSQL database is usually the better choice.
Add a volume
Open the service's Settings, find Volume and choose Add a volume. Enter the Mount path, which defaults to /data, pick a Size and choose Add volume. Dekka creates the disk straight away, without going through staged changes, and the volume moves from Creating to Attached.
curl https://api.dekka.cloud/v1/resources/$SERVICE_ID/volume \
-H "Authorization: Bearer $DEKKA_API_KEY" \
--json '{ "mount_path": "/data", "size_gb": 5 }'A service can have one volume, between 1 and 1024 GB, and a service with a volume runs a single replica, so set Replicas to 1 first. Forking an environment gives each copied service a new, empty volume of the same size.
Grow a volume
Choose a larger size under Grow to and choose Grow. Volumes can grow but never shrink. If growing fails, the volume stays at its old size with its data intact.
Remove a volume
Choose Remove. This deletes the volume and everything on it, and can't be undone.
How much volume space do I get?
Volumes in an organisation share one allowance: 1 GB on Free, 20 GB on Starter and 100 GB on Growth. Dekka measures the size of each volume every hour as volume_gb_hours, and each plan includes its allowance for a 730-hour month. See Plans, billing and usage.
Back up a volume
Dekka backs up a volume only when you choose Back up now in the Volume section, or call POST /v1/volumes/{id}/backups, and keeps each backup for 30 days. During the pilot the backup is kept on the same server as the volume, so keep your own copy of anything you can't lose. Backups covers restoring one.