Storage and Secrets
Storage volumes, their copies and mounts, and the sealed secret envelopes.
Tables in this group: archive, copy, mount, secret, storage.
archive
One completed storage-copy backup artifact recorded from a daemon report; unique per (copy_id, backup_id), cascades with the copy.
| Column | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | Primary key (uuidv7(), time-ordered). |
created_at | timestamp(3) with time zone | yes | Row creation time. |
copy_id | uuid | yes | Parent copy row (on delete cascade). |
retention_id | uuid | no | The retention whose scheduled run made this artifact; null for a manual backup or once that retention is deleted. |
origin | text | yes | backup when a backup run made the file, import when it was brought in to be restored; existing rows are backup. |
backup_id | text | yes | Daemon-minted bk_ plus hex token that is also the artifact filename on the host; unique per storage copy, not globally. |
size_bytes | bigint | yes | Artifact size in bytes as reported by the daemon after writing the archive; re-checked before a restore. |
checksum | text | yes | Lowercase SHA-256 hex digest of the artifact computed by the daemon; a restore refuses on mismatch. |
path | text | yes | Artifact path relative to the backup root of the copy's server (volumes/ plus the copy id, then the file). |
copy
One physical copy of a storage identity (docker volume or host path today); one primary per storage, local copies pin server_id, remote ones leave it null.
| Column | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | Primary key (uuidv7(), time-ordered). |
created_at | timestamp(3) with time zone | yes | Row creation time. |
updated_at | timestamp(3) with time zone | yes | Last write time; the ORM sets it to now() on every update. |
metadata | jsonb | no | Free-form jsonb passed through from the copy API; no keys are read by the platform today. |
options | jsonb | no | Provider options: compose-registered docker copies carry managed (true when Compose owns the volume) and externalName for external volumes. |
storage_id | uuid | yes | Parent storage row (on delete cascade). |
server_id | uuid | no | Host holding a local docker or path copy, unique with storage and provider; null for remote/shared providers; ON DELETE RESTRICT. |
secret_id | uuid | no | Optional provider credential from secret for remote providers; ON DELETE RESTRICT; unused by the docker and path providers. |
provider | text | yes | docker or path today; block, nfs, cifs, s3, s3_compatible, sftp, ftp and webdav are reserved and not accepted by the API. |
role | text | yes | primary (one per storage; anchors the access-mode placement check), replica, scratch (never mountable) or archive. |
state | text | yes | Materialization state: pending, materializing, ready, syncing, stale, failed or retiring; set via the API, defaults to pending. |
path | text | no | Host filesystem path for a path copy; null means the platform layout or the principal's volumes directory is resolved at deploy and never persisted. |
endpoint | text | no | Remote endpoint for network providers; API passthrough, unused by docker and path copies. |
mount
Attachment of a storage identity inside one compose service at a container path; unique (service_id, destination_path), written by the storage API and compose.
| Column | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | Primary key (uuidv7(), time-ordered). |
created_at | timestamp(3) with time zone | yes | Row creation time. |
updated_at | timestamp(3) with time zone | yes | Last write time; the ORM sets it to now() on every update. |
metadata | jsonb | no | Free-form jsonb settable through the mount API; no keys are read by the platform today. |
options | jsonb | no | Reserved jsonb; no current code path writes it. |
storage_id | uuid | yes | Parent storage row (on delete cascade). |
service_id | uuid | yes | Consuming compose service; ON DELETE RESTRICT, so compose unregister clears mounts in the same transaction as the service reconcile. |
destination_path | text | yes | Container path the storage is mounted at, unique per service. |
subpath | text | no | Optional subdirectory of the storage to mount instead of its root; forwarded to the daemon when non-empty. |
is_read_only | boolean | yes | Mount the storage read-only in the container (API field readOnly); default false. |
secret
Org-owned sealed secret for storage providers and git deploy keys; secret_envelope is one tpsecret payload, written today only by the deploy-key route.
| Column | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | Primary key (uuidv7(), time-ordered). |
created_at | timestamp(3) with time zone | yes | Row creation time. |
updated_at | timestamp(3) with time zone | yes | Last write time; the ORM sets it to now() on every update. |
metadata | jsonb | no | Non-secret descriptors; for git_deploy_key rows: publicKey, fingerprint and keyType (ed25519). |
organization_id | uuid | yes | Parent organization row (on delete cascade). |
principal_id | uuid | no | Optional association with a principal (SET NULL on delete so a principal delete never fails on an org secret); no current writer sets it. |
name | text | yes | Operator label for the secret; not an identifier and not unique. |
provider | text | yes | s3, s3_compatible, nfs, cifs, sftp, ftp, webdav (reserved), git_deploy_key, carrier_badge or tunnel_run (tunnel tokens). |
secret_envelope | text | yes | tpsecret envelope of provider-specific JSON; for git_deploy_key the sealed plaintext is the OpenSSH private key verbatim, resealed unopened for the daemon. |
storage
Logical identity of persistent data owned by an organization and scoped to at most one of workspace, project, environment or service; bytes live on copy rows.
| Column | Type | Required | Description |
|---|---|---|---|
id | uuid | yes | Primary key (uuidv7(), time-ordered). |
created_at | timestamp(3) with time zone | yes | Row creation time. |
updated_at | timestamp(3) with time zone | yes | Last write time; the ORM sets it to now() on every update. |
metadata | jsonb | no | Free-form jsonb from the API; dockerVolumeName is stamped to the storage UUID on volume create because the Docker volume name is the storage id. |
options | jsonb | no | Free-form jsonb passed through from the storage API; no keys are read by the platform today. |
organization_id | uuid | yes | Owning organization stored directly (an intentional exception to derived ownership); cascade-deletes the storage with the org. |
workspace_id | uuid | no | Optional workspace scope, at most one scope column may be set; SET NULL on delete so a retain row survives as org-owned storage. |
project_id | uuid | no | Optional project scope, at most one scope column may be set; SET NULL on delete so a retain row survives as org-owned storage. |
environment_id | uuid | no | Optional environment scope (compose volumes are environment-scoped), at most one scope column set; SET NULL on delete so retain rows survive. |
service_id | uuid | no | Optional service scope, at most one scope column may be set; SET NULL on delete so a retain row survives as org-owned storage. |
principal_id | uuid | no | Optional owning system principal; path copies without an explicit path resolve under that principal's volumes directory; SET NULL on delete. |
name | varchar(255) | yes | Operator label, or the Compose volume key for auto-registered volumes; up to 255 chars with no charset CHECK. |
slug | text | no | Folder name of a panel-owned volume under the site owner tree; set at creation, locked once a folder row exists, NULL until set. |
kind | text | yes | volume (named Docker volume), directory, file (sealed content) or object (reserved, not accepted by the API). |
access_mode | text | yes | single_writer (default), multi_reader or multi_writer; single_writer refuses a deploy scheduled on a server other than the primary copy's. |
retention | text | yes | retain (default) keeps the row as org-owned when its scope parent is deleted; delete removes it with the parent. |
content_envelope | text | no | Sealed file content for kind='file' entries (tpsecret at rest, resealed to tpdaemon at deploy); up to 256 KiB plaintext; null otherwise. |
compose_volume_key | text | no | Compose top-level volume key for auto-registered volume rows; unique per environment and the idempotency key for compose volume registration. |
is_common | boolean | yes | True when the volume folder is in the common scope shared by every environment; chosen at creation and never changed. |
Last updated on