Databases

Create a persistent storage or file storage for a database.

post/databases/{uuid}/storages

Request

  • Base URL: https://app.coolify.io/api/v1
  • URL: https://app.coolify.io/api/v1/databases/{uuid}/storages
  • Auth: HTTP bearer

Path parameters

uuidstring required

UUID of the database.

Request body

type'persistent' | 'file' required

The type of storage.

namestring

Volume name (persistent only, required for persistent).

mount_pathstring required

The container mount path.

contentstring nullable

File content (file only, optional).

is_directoryboolean

Whether this is a directory mount (file only, default false).

fs_pathstring

Host path. Required for directory mounts and host file mounts. Optional for file mounts with content (default: inside the resource directory). An absolute path can be anywhere on the host; a relative path is inside the resource directory. A directory or file mount outside the resource directory needs a token with the deploy permission. Coolify never deletes a path outside the resource directory.

Response

Storage created.

object required

Changes