Sites & multi-tenancy
A site is the unit of tenancy. One ScaiCMS deployment can serve any number of sites — each with its own content tree, template pack, locales, RBAC scope, and email configuration.
Properties of a site#
| Field | Meaning |
|---|---|
id, slug |
Identity |
name |
Display name |
domains[] |
One or more domains; one is is_primary |
default_locale, supported_locales |
Multilingual config (see Translations) |
template_pack_id |
Active theme; the delivery service uses this |
settings |
Free-form JSON: emails, search index, public name, etc. |
Site context#
Every request to the backend that touches content carries an X-Site-ID
header. The middleware looks it up, attaches the site object to the request
state, and downstream code filters its queries by that ID. Without the
header, content endpoints return 400.
1 2 3 | |
Some surfaces are global and don't take a site header — users, groups, roles, the docs subsystem (which is namespace-scoped, not site-scoped). The error message tells you which one a given endpoint expects.
Multi-tenancy on delivery#
Delivery resolves Host: to a site, so the URL alone is enough. Each site
gets its own:
- Active template pack and partial caching keys.
- Navigation tree (rebuilt per-locale).
robots.txt,sitemap.xml,/docs/llms.txt,/docs/llms-full.txt.- Form-submission inbox.
Cross-site sharing#
Content is per-site. The docs subsystem is global — a single namespace can be mounted on multiple sites (see Docs subsystem). For everything else, duplicating content into multiple sites is the pattern.