Skip to main content
Volumes are durable storage that outlives any machine and can be mounted into several at once. This example creates a volume, mounts it read-write in one machine and read-only in another, and shows a write flowing between them.
Requires a deployment with the shared-volume backend enabled (the hosted private beta has it).

Setup

Python

shared_volume_example.py

Expected output

Writes land in the volume, not the machine rootfs — destroy both machines and the data stays until volume.delete(). The read-only mount makes the reader’s side of the tree immutable; writes there fail with a permission error. Related: Volumes overview · Mounting volumes