TurboPanel Docs
Database

Organizations

The tenant boundary. Organizations own every other resource; teams and teammates carry membership; the TLS tables hold the Organization CA and its rotations.

Tables in this group: changeover, invitation, leaf, organization, team, teammate, tls.

changeover

Journal row for one Organization CA rotation (at most one in_progress per org); never deleted, it is the audit trail and resume state of the fan-out.

ColumnTypeRequiredDescription
iduuidyesPrimary key (uuidv7(), time-ordered).
created_attimestamp(3) with time zoneyesRow creation time.
updated_attimestamp(3) with time zoneyesLast write time; the ORM sets it to now() on every update.
metadatajsonbnoFan-out resume state written between passes: resumeAfterManagedId keyset cursor and needsRedeploy server/environment pairs.
organization_iduuidyesOwning org; the partial unique index allows one in_progress row per org, which is what makes the row act as the rotation lease.
from_ca_generationintegeryesGeneration that was active when the rotation minted its successor; 0 until the mint step has run.
to_ca_generationintegeryesNew active generation minted by this rotation; 0 until minted, and a non-zero value lets a repeated request resume fan-out.
statetextyesin_progress (lease held), then awaiting_retire once fan-out converged, then completed when the old generation is retired, or failed.
started_attimestamp(3) with time zoneyesWhen the lease was taken; reset when a stale in-progress row (older than 15 min) is stolen by another isolate.
completed_attimestamp(3) with time zonenoSet by the retire step together with state = completed; null otherwise and cleared when a stale row is stolen.
resultsjsonbnoArray of per-server fan-out rows with serverId, kind (ingress, apply or binding), managedId, commandId, status and error.
retire_bytimestamp(3) with time zonenoSet when fan-out finishes: after it the sweep retires the previous CA generation once every live target converged; null before.

invitation

Team-scoped invite per (team, email) with a 7-day link; accept adds teammate and optional grants rows when stored.

ColumnTypeRequiredDescription
iduuidyesPrimary key (uuidv7(), time-ordered).
created_attimestamp(3) with time zoneyesRow creation time.
updated_attimestamp(3) with time zoneyesLast write time; the ORM sets it to now() on every update.
user_iduuidyesThe inviter (a manager of the team), not the invitee; the invitee is known only by email until accept.
team_iduuidyesTeam the invitee joins on accept; there is no organization_id, the organization is derived through the team.
statustextyespending at creation, then accepted by the accept route or revoked by the revoke route; expiry is not a status.
expires_attimestamp(3) with time zoneyesCreation time + 7 days; status is not flipped on expiry, readers compare this column against now.
emailvarchar(255)yesInvited address; accept succeeds only for a signed-in account whose email equals it case-insensitively.
grantsjsonbnoOptional grant specs (entityType, entityId, permissionKey) an owner attached; null means none; materialized on accept.
token_hashtextyesSHA-256 verifier of the secret emailed only in the accept link, used to look the invitation up; rotated on re-send.

leaf

Tracking row per deployed Organization-CA-signed leaf (ingress per server, engine per replica); upserted after apply succeeds, keeps no history.

ColumnTypeRequiredDescription
iduuidyesPrimary key (uuidv7(), time-ordered).
updated_attimestamp(3) with time zoneyesLast write time; the ORM sets it to now() on every update.
organization_iduuidyesParent organization row (on delete cascade).
server_iduuidyesHost the leaf is deployed on; unique per server for ingress rows.
managed_iduuidnoEngine leaves only: the managed cluster that owns the replica; must be null on ingress rows.
replica_iduuidnoEngine leaves only: the replica whose leaf this tracks, unique per replica; must be null on ingress rows.
ca_iduuidyesThe tls Organization CA row that signed the leaf; the row is cascade-deleted with that CA.
kindtextyesingress (ProxySQL frontend leaf on a server) or engine (a cluster replica's engine leaf).
ca_generationintegeryesGeneration of the signing CA at issue time; a mismatch with the active generation makes the leaf due for renewal.
not_aftertimestamp(3) with time zoneyesLeaf expiry (90-day lifetime); the renewal sweep treats a leaf as due when less than a third of its lifetime remains.
issued_attimestamp(3) with time zoneyesWhen the leaf was minted; refreshed on every re-issue upsert.
statetextyesactive (counted and renewed when due) or stale (nothing waits on it: not counted, not renewed, never holds back retiring the old CA).
stale_attimestamp(3) with time zonenoWhen the row was marked stale; set exactly when state is stale.
stale_reasontextnoPlain-words reason shown on the Organization CA card for a stale row (at most 300 characters).
stale_causetextnooffline (server gone for weeks; comes back when it reconnects), unused (nothing needed it) or owner; set exactly when state is stale.
attemptsintegeryesRenewals tried since the leaf was last deployed; drives the retry back-off and resets on a successful deploy.
attempted_attimestamp(3) with time zonenoWhen a renewal was last queued for this leaf; null before the first try.
last_errortextnoPlain-words reason the last renewal failed or could not be queued (at most 300 characters); cleared on a successful deploy.

organization

Tenant organization; one is created by the install wizard and by every sign-up, its members come through teams, and options holds org-wide defaults.

ColumnTypeRequiredDescription
iduuidyesPrimary key (uuidv7(), time-ordered).
created_attimestamp(3) with time zoneyesRow creation time.
updated_attimestamp(3) with time zoneyesLast write time; the ORM sets it to now() on every update.
optionsjsonbnoOrg-wide settings merged key-by-key by the organization routes (maxServers, phpModes and more).
backup_destination_iduuidnoDestination finished backups are copied to unless a cluster chooses otherwise; null means no default copy. Set null if the destination is deleted.
nametextnoDisplay name; sign-up uses [email protected]'s organization from email, else My Organization if missing, blank, or label invalid; install Root Organization.
next_linux_idintegeryesNext uid/gid for a Hosting Account on servers this organization owns; starts at 30001, rises by one per new account, never reused.
deploy_timeout_minutesintegernoThe longest a deploy may run, in whole minutes from 5 to 240, counted only while the server reports; null means the default of 30.
acme_contact_emailtextnoContact address on the organization's Let's Encrypt account, needed to turn it on; null means none.
acme_terms_accepted_attimestamp(3) with time zonenoWhen the organization last accepted the Let's Encrypt terms, needed to turn it on; the audit log says who.
acme_terms_urltextnoThe exact Let's Encrypt agreement accepted at acme_terms_accepted_at; a newer one must be accepted again to turn it on.
icontextnoIcon key from the same fixed list as project.icon, or one emoji; NULL means the default icon.
is_acme_enabledbooleanyesLet's Encrypt allowed for this organization's certificates; off until the organization opts in. Turning it off erases stored keys but revokes nothing.
is_emoji_icon_allowedbooleanyesEmoji icons allowed for the organization and its projects; off refuses new emoji icons and shows the default for stored ones, which are kept.

team

Team within an organization; every org gets a Default Team at creation, and membership in any of its teams is what makes a user an org member.

ColumnTypeRequiredDescription
iduuidyesPrimary key (uuidv7(), time-ordered).
created_attimestamp(3) with time zoneyesRow creation time.
updated_attimestamp(3) with time zoneyesLast write time; the ORM sets it to now() on every update.
organization_iduuidyesParent organization row (on delete cascade).
nametextnoDisplay label of 1-255 chars, Default Team for the team created with the organization; no route creates or renames teams today.

teammate

User-to-team membership row (unique per pair), the source of truth for organization membership; written at org creation and on invitation accept.

ColumnTypeRequiredDescription
iduuidyesPrimary key (uuidv7(), time-ordered).
created_attimestamp(3) with time zoneyesRow creation time.
team_iduuidyesTeam joined; unique together with user_id, and organization membership is derived through team.organization_id rather than stored here.
user_iduuidyesParent user row (on delete cascade).

tls

Per-organization TLS library: uploaded, Let's Encrypt, self-signed certificates and the Organization CA generations; hosting.tls_id pins rows by id.

ColumnTypeRequiredDescription
iduuidyesPrimary key (uuidv7(), time-ordered).
created_attimestamp(3) with time zoneyesRow creation time.
updated_attimestamp(3) with time zoneyesLast write time; the ORM sets it to now() on every update.
metadatajsonbnoCertificate facts not promoted to columns: dnsNames, hasWildcard, notBefore, subject, issuer and acme (challengeType, managedBy, lastError).
optionsjsonbnoOperator knobs: prefer (pin priority), autoRenew, and requestedHostnames asked for on Let's Encrypt or self-signed create; null on Organization CA rows.
organization_iduuidyesParent organization row (on delete cascade).
issued_by_server_iduuidnoServer whose Caddy issued the stored Let's Encrypt pair (the daemon that reported it); null when no pair is stored or that server was deleted.
nametextnoOperator label of 1-255 letters, digits, space, dot, underscore or dash; fixed Organization CA on CA rows.
statustextyesRow health ready, pending, expired, failed, revoked or automatic (web server issues it); expired is derived from not_after, others stored.
sourcetextyesupload, lets_encrypt (Caddy-managed ACME on the host), self_signed or organization_ca; decides which other columns are meaningful.
certificate_pemtextnoLeaf plus intermediate chain PEM; on lets_encrypt rows it is null until the serving host's Caddy has issued the certificate and its daemon has sent a copy.
private_key_pemtextnoPrivate key PEM sealed as a tpsecret envelope, never returned by the client API; Let's Encrypt rows get it from the daemon report and lose it on revoke.
not_aftertimestamp(3) with time zonenoCertificate expiry parsed from the PEM at write; epoch-0 placeholder on automatic rows; indexed for expiry checks.
fingerprint_sha256textnoSHA-256 fingerprint of the leaf DER, unique per organization when set; null on automatic rows that have no certificate yet.
ca_statetextnoOrganization CA lifecycle active (one per org), retired (still in the trust bundle) or revoked; null on non-CA rows.
ca_generationintegernoMonotonic per-org counter (max + 1) assigned when a CA is minted; leaves record which generation signed them; null on non-CA rows.
Edit on GitHub

Last updated on

On this page