Tenancy and isolation
What is shared and what is per tenant, and why.

Model
Tenant (company)
├─ Zitadel organization (identity boundary, logical)
├─ Coolify project fortspace-tenant-<slug> (runtime boundary, process/network)
├─ Database meet_<slug> on shard N (data boundary, hard DB)
├─ Bucket tenant-<slug> (object boundary, scoped key + SSE)
├─ Infisical project tenant-<slug>, path /tenants/<slug> (secret boundary, machine identity)
└─ LiveKit room namespace <slug>__* (media boundary, enforced by broker)
Teams → Zitadel project roles / groups → claims → go-meet `team_ids`
Users → belong to exactly one Zitadel org (the tenant); guests have no account
Teams are inside a tenant and are authorization data (roles/claims), never an isolation boundary.
Shared vs per-tenant matrix
| Component | Scope | Boundary | Why |
|---|---|---|---|
| Zitadel | shared | Organization + project grant | Auth is token-based; orgs isolate users, IdPs, branding, policies |
| Control plane + cockpit | shared | tenant_id in every row; verified caller identity |
Owns lifecycle; must see all tenants |
| Infisical | shared (D2) | Project tenant-<slug> (path /tenants/<slug>) + per-tenant machine identity (viewer on that project only) |
A per-tenant Infisical is too heavy; free-tier Infisical has no path-scoped roles, hence a project per trust scope |
| LiveKit SFU/Egress + its Redis | shared | Exact-room tokens minted by broker, <slug>__ room prefix |
Stateless media router |
| RustFS engine | shared | Bucket per tenant, scoped access key, SSE | Central disk pools |
| Core Postgres | shared | DB/role per product | Low-volume platform data |
| Postgres shards | shared engine, DB per tenant | Database + role | Cost vs hard boundary; drop-database erase |
| go-meet | per tenant | Container + env + network | Memory/log/bug isolation, ~20 MB RSS |
| Redis (go-meet) | per tenant | Container + volume | No shared-key bugs, trivially erased |
| Tuwunel (Matrix) | per tenant | Container + RocksDB volume, federation off | Avoid logical multi-tenant chat bugs |
| Future modules | per tenant | Same pattern | — |
Isolation tiers
| Tier | Who | Differences |
|---|---|---|
| Standard (default SMB) | Most tenants | Matrix above; shared Zitadel instance; shared LiveKit; shared Postgres shard |
| Dedicated data | Larger SMB | Tenant gets a dedicated Postgres node (shard with max_tenants=1) |
| Enterprise | Customers needing CMEK, network isolation, own audit scope | Dedicated Zitadel instance (virtual instance or deployment), dedicated LiveKit key + node pool, dedicated bucket KMS key |
The control plane models the tier as data on the tenant row so the provisioning program can branch without code forks.
Naming conventions
| Resource | Pattern | Example |
|---|---|---|
| Slug | [a-z][a-z0-9-]{1,30} — immutable; a new one is also a safe host label and not reserved (13) |
acme |
| Hostnames | <module>.<slug>.<platform-domain> (ADR-035: under fortspace.eu, same-site with the platform, 13) |
meet.acme.fortspace.eu, chat.acme.fortspace.eu |
| Coolify project | fortspace-tenant-<slug> |
fortspace-tenant-acme |
| Postgres DB / role | meet_<slug> / meet_<slug>_app |
meet_acme |
| Bucket | tenant-<slug> (prefixes recordings/, transcripts/, files/) |
tenant-acme |
| Infisical project / path | tenant-<slug>, /tenants/<slug>/<module> |
tenant-acme, /tenants/acme/meet |
| Zitadel org | name = slug, id stored in tenants.zitadel_org_id |
— |
| LiveKit room | <slug>__<room-uuid> (__ is forbidden in slugs) |
acme__3f9c… |
| Pulumi stack | Pulumi project tenant, stack <slug> → organization/tenant/<slug> |
organization/tenant/acme |
| Coolify data pool | fortspace-data-pool (never fortspace-tenant-…) |
fortspace-data-pool |
| Coolify tag | tenant-<slug> (team-scoped, one per tenant) |
tenant-acme |
Reserved prefix: fortspace-tenant- belongs to tenant projects only; no other
project may use it (a project fortspace-tenant-pool would be indistinguishable
from the tenant whose slug is pool, so the shard project is fortspace-data-pool).
The Pulumi stack name cannot be fortspace/tenant/<slug>: the Postgres DIY
backend only accepts the organization literally named organization, so the
Pulumi project name cannot be qualified (ADR-022). The Coolify project name
carries the fortspace- prefix so a stack can never match the pre-existing
fortspace project (see 09).
Slugs are never reused for 90 days after erasure so room prefixes and presigned URLs cannot collide with a previous tenant.
What the shared plane must never contain
- Chat messages, attachments, meeting titles/participants, transcripts, recordings (bucket contents are in RustFS but encrypted, per-tenant keyed, and unreadable via shared credentials — see 08).
- Any tenant’s LiveKit API secret (there is one platform key held by the broker only).
Failure-containment summary
| Failure | Blast radius |
|---|---|
| go-meet bug or OOM | one tenant |
| Runaway SQL | one shard; core Postgres unaffected |
| Redis flush/loss | one tenant’s sessions/lobby |
| Compromised tenant stack | its own data + room-scoped tokens (minutes) + its bucket key; not other tenants |
| Compromised control plane | everything — hence minimal surface, separate worker/API roles, Infisical audit, no inbound from tenant stacks except token/event endpoints |
| LiveKit node loss | all live calls, no data loss |