Documentation Index
Fetch the complete documentation index at: https://mintlify.com/zitadel/zitadel/llms.txt
Use this file to discover all available pages before exploring further.
Overview
ZITADEL implements a strict hierarchical containment model for multi-tenancy. This design enables complete data isolation, flexible permission scoping, and scalable B2B/B2C architectures. The hierarchy follows this structure:The Hierarchy Explained
System (Installation)
The System represents the entire ZITADEL deployment.- Scope: All instances in a single installation
- Configuration: Runtime configuration files and environment variables (see
cmd/defaults.yaml) - Management: System users manage instances via the System API
- Use case: Self-hosted installations or ZITADEL Cloud infrastructure
In ZITADEL Cloud, you don’t interact with the System level. Each customer gets one or more Instances.
Instance (The “Identity System”)
An Instance is a logical partition or virtual tenant — a “System inside a System.”Instance Characteristics
- Complete isolation: Data and settings are strictly isolated between instances
- Separate policies: Each instance has its own password complexity, login behavior, and identity providers
- Independent users: User IDs are scoped to an instance
- Custom domain: Each instance can have a custom domain (e.g.,
auth.yourcompany.com) - Instance-level settings: Branding, email templates, and audit log configuration
When to Use Multiple Instances
Staging vs Production
Staging vs Production
Create separate instances for different environments:
production.zitadel.cloudfor live usersstaging.zitadel.cloudfor testingdev.zitadel.cloudfor development
Geographic Isolation
Geographic Isolation
Deploy instances in different regions:
- EU instance for European customers
- US instance for American customers
- Ensures data residency compliance
Customer Isolation (B2B)
Customer Isolation (B2B)
For very large enterprise customers who require:
- Dedicated infrastructure
- Custom compliance requirements
- Complete data isolation from other customers
Organization
An Organization is a group within an Instance.- Ownership: Organizations own Users, Projects, and Roles
- Typical mapping: One organization per customer/company in a B2B SaaS
- Self-service: End customers can manage their own organization
- Unlimited: An instance can contain unlimited organizations
Organization Use Cases
B2B SaaS Application:Organization Management
- Organization Admins: Can manage users and access within their organization
- Delegated role management: Organizations can manage their own users’ roles
- Custom branding: Each organization can have custom login branding
- Domain discovery: Route users to the correct organization based on email domain
Project
A Project is a collection of Applications and Authorization policies within an Organization.- Purpose: Group related applications that share users and permissions
- RBAC: Roles are defined at the project level
- Grants: Projects can be granted to other organizations (useful for B2B)
Project Structure
Application
An Application represents a client that authenticates users.- Protocols: OIDC, SAML, API (for machine-to-machine)
- Configuration: Client ID, secrets, redirect URIs, token settings
- Scoped to: A single project
Permission Scoping
ZITADEL’s hierarchy enables precise permission scoping:Administrative Contexts
- System User
- Instance Admin
- Organization Admin
- Project Admin
Scope: Entire installationCapabilities:
- Create and manage instances
- System-wide configuration
- Infrastructure monitoring
API Context Requirements
When creating resources via the API, context is provided as explicit fields:V2 API Example
Context fields are only required when creating resources. When retrieving or updating by ID, the context is implicit because the ID is globally unique.
Multi-Tenancy Patterns
Pattern 1: Single Instance, Multiple Organizations (Most Common)
When to use:- B2B SaaS with multiple customers
- Each customer needs isolated users and data
- Shared authentication policies across customers
- Cost-effective (single database)
- Easy to manage and update
- Customers can self-manage users
Pattern 2: Multiple Instances (Enterprise Isolation)
When to use:- Large enterprise customers requiring dedicated infrastructure
- Different compliance requirements per customer
- Custom domains per customer
- Complete infrastructure isolation
- Custom compliance and security policies
- Dedicated performance characteristics
Pattern 3: Hybrid (Instance per Environment + Organizations)
When to use:- Development, staging, and production separation
- B2B SaaS with multiple customers per environment
Data Isolation Guarantees
Instance-Level Isolation
- Database queries: All queries automatically include instance ID filter
- No cross-instance access: Instance A cannot query data from Instance B
- Audit separation: Event logs are instance-scoped
- Cache isolation: In-memory caches are keyed by instance
Organization-Level Isolation
- User ownership: Users belong to exactly one organization
- Project ownership: Projects belong to exactly one organization (but can be granted to others)
- Role assignments: Scoped to organization context
- Audit attribution: Events track the organization context
Best Practices
Choosing Between Instances and Organizations
Choosing Between Instances and Organizations
Use Organizations when:
- Customers share common authentication policies
- Cost efficiency is important
- Customers are of similar size/importance
- Complete infrastructure isolation required
- Different compliance/security requirements
- Custom domains per customer
- Very large enterprise customers
Organization Naming
Organization Naming
- Use meaningful names (company name, domain)
- Avoid exposing internal IDs to end users
- Consider domain-based discovery for login routing
Project Structure
Project Structure
- One project per logical application/product
- Group related apps (web, mobile, API) in the same project
- Use project grants sparingly (adds complexity)
Permission Design
Permission Design
- Follow least privilege principle
- Use organization admins for customer self-service
- Reserve instance admin for platform operators
- Document required permissions in API calls
Next Steps
Architecture
Understand the technical architecture behind the multi-tenancy model
Authorization
Learn how roles and permissions work within the hierarchy
Organizations Guide
Create and manage organizations in your instance
Projects Guide
Set up projects and applications for your users