Templates

Persistent Volumes

Attach durable block storage to services and database templates — data survives restarts and redeploys

Persistent volumes attach durable block storage to services on Ink. Data survives restarts and redeploys, and can be reattached to a replacement service while the detached volume is retained.

Specs

PropertyValue
Size range1 GiB minimum, up to the workspace storage cap
Mount pathAny path inside the container (e.g. /data, /var/lib/postgresql/data)
Billing$0.0000035 per GB/min (~$0.15/GB/mo)
PersistenceSurvives restarts and redeploys
Works withDatabases, application services, any container workload

Attaching volumes

Via MCP

The volume_name, volume_mount_path, and volume_size_gi parameters on service_create and service_update attach or reattach a volume. Persistent-volume services run as a single replica.

Tool Call
(
  : ,
  : "image",
  : "postgres:17",
  : {
    "0": "[object Object]"
  },
  : {
    "0": "[object Object]",
    "1": "[object Object]",
    "2": "[object Object]"
  },
  : "data",
  : "/var/lib/postgresql/data",
  : "10"
)

Via CLI

Use database templates for the common stateful cases, or configure volumes from MCP and the dashboard. Database templates automatically include volumes when deployed with ink template deploy.

Via dashboard

Toggle Persistent Volume in the service config panel, then set the mount path and size.

When to use volumes

  • Database services (PostgreSQL, Redis, MySQL, MongoDB) -- all database templates include volumes by default
  • Persistent file storage -- uploads, caches, logs that must outlive a single container
  • Any workload where data must survive container restarts

Important notes

Database templates (postgres, redis, mysql, mongodb) automatically include a persistent volume. No manual configuration needed.

  • Volume data persists even if the service is redeployed or restarted.
  • Deleting a service detaches its volumes. Detached volumes are retained for 24 hours unless they are reattached or explicitly deleted.
  • volume_resize can grow a volume, but volumes cannot be shrunk.

Pricing

$0.0000035 per GB per minute, billed only while the volume exists. That works out to approximately $0.15 per GB per month.

A 10 GiB volume costs about $1.50/mo. A 100 GiB volume costs about $15/mo.

On this page