Technical Documentation: zitadel/zitadel
βΉοΈ Provenance: Multi-Tier Ingestion Β· CodeWiki Reference
Overview (README.md)
The Identity Infrastructure for Developers
ZITADEL is an open-source identity and access management platform built for teams that need more than basic auth. Whether you're securing a SaaS product, building a B2B platform, or self-hosting a production IAM stack β ZITADEL gives you everything out of the box: SSO, MFA, Passkeys, OIDC, SAML, SCIM, and a battle-tested multi-tenancy model.
No vendor lock-in. No compromise on control. Just a robust, API-first identity platform you can own.
π‘ Website | π¬ Chat | π Docs | π§βπ» Blog | π Contact
Why ZITADEL
We built ZITADEL to handle the hardest IAM challenges at scale β starting with multi-tenancy.
| ZITADEL | FusionAuth | Keycloak | Auth0/Okta | |
|---|---|---|---|---|
| Open-source | β | β | β | β |
| Self-hostable | β | β | β | β |
| Infrastructure-level tenants | β Instances (High scale) | β Tenants | π‘ Realms (Scaling limits) | β (Multi-tenant = multi-account) |
| B2B Organizations | β Native & Unlimited | π‘ via Entity Management | β (Recent addition) | π‘ (Plan/Account dependent) |
| Full audit trail | β Comprehensive Event Stream* | π‘ Audit logs | π‘ Audit logs | π‘ Audit logs |
| Passkeys (FIDO2) | β | β | β | β |
| Actions / webhooks | β | β | π‘ via SPI | β |
| API-first (gRPC + REST) | β | π‘ REST only | π‘ REST only | π‘ REST only |
| SaaS + self-host parity | β | β | β N/A | β N/A |
ZITADEL Cloud and self-hosted ZITADEL run the same codebase.
Key differentiators for architects:
- Relational core, event-driven soul β every mutation is written as an immutable event for a complete, API-accessible audit trail. Unlike systems that log only select activities, ZITADEL provides a comprehensive event stream that can be audited or streamed to external systems via Webhooks.
- Strict multi-tenant hierarchy β Identity System β Organizations β Projects, with isolated data and policy scoping at multiple levels
- API-first design β every resource and action is available via connectRPC, gRPC, and HTTP/JSON APIs
- Zero-downtime updates and horizontal scalability without external session stores
Get Started in 3 Minutes
π Quick Start Guide
ZITADEL Self-Hosted
# Docker Compose β up and running in under 3 minutes
curl -LO https://raw.githubusercontent.com/zitadel/zitadel/main/deploy/compose/docker-compose.yml \
&& curl -LO https://raw.githubusercontent.com/zitadel/zitadel/main/deploy/compose/.env.example \
&& cp .env.example .env \
&& docker compose up -d --waitFull deployment guides:
Need professional support for your self-hosted deployment? Contact us.
ZITADEL Cloud (SaaS)
Start for free at zitadel.com β no credit card required. Available in US Β· EU Β· AU Β· CH. Pay-as-you-go pricing.
Integrate with the V2 API
ZITADEL exposes every capability over a typed API. Here's how to create a user with the V2 REST API:
curl -X POST https://$ZITADEL_DOMAIN/v2/users/human \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"username": "[email protected]",
"profile": { "givenName": "Alice", "familyName": "Smith" },
"email": { "email": "[email protected]", "sendCode": {} }
}'Explore the full API reference β including connectRPC and gRPC transports β or jump straight to quickstart examples.
Features
Authentication
- Single Sign On (SSO) Β· Username/Password Β· Passkeys (FIDO2 / WebAuthn)
- MFA: OTP, U2F, OTP Email, OTP SMS
- LDAP Β· Enterprise IdPs and social logins
- OpenID Connect certified Β· SAML 2.0 Β· Device authorization
- Machine-to-machine: JWT Profile, PAT, Client Credentials
- Token exchange and impersonation
- Custom sessions for flows beyond OIDC/SAML
- Hosted Login V2
Multi-Tenancy
- Identity brokering with pre-built IdP templates
- Customizable B2B onboarding with self-service for customers
- Delegated role management to third parties
- Domain discovery
Integration
- gRPC, connectRPC, and REST APIs for every resource
- Actions: webhooks, custom code, token enrichment
- RBAC Β· SCIM 2.0 Server
- Audit log and SOC/SIEM integration
- SDKs and example apps
Self-Service & Admin
- Self-registration with email/phone verification
- Administration Console for orgs and projects
- Custom branding per organization
Deployment
- PostgreSQL (β₯ 14) Β· Zero-downtime updates Β· High scalability
Track upcoming features on our roadmap and follow our changelog for recent updates.
Showcase
Login V2
Our new, fully customizable login experience β documentation
Adopters & Ecosystem
Used in production by organizations worldwide. See the full Adopters list β and add yours by submitting a pull request.
- SDKs: All supported languages and frameworks
- Examples: Clone and use our examples
How To Contribute
ZITADEL is built in the open and welcoming to contributions of all kinds.
- π Read the Contribution Guide to get started
- π¬ Join the conversation on Discord
- π Report bugs or request features via GitHub Issues
Contributors
Made with contrib.rocks.
Security
Security policy: SECURITY.md
Vulnerability Disclosure Policy β how to responsibly report security issues.
Technical Advisories are published for major issues that could impact security or stability in production.
License
AGPL-3.0 β see LICENSING.md for the full licensing policy, including Apache 2.0 and MIT exceptions for specific directories.
Apps Docs README (`apps/docs/README.md`)
@zitadel/docs
Documentation for Zitadel, built with Fumadocs and Next.js.
Getting Started
Ensure you have followed the root quick start to set up dependencies.
Local Development
Ensure all dependencies are installed:
pnpm installStart the development server:
pnpm nx run @zitadel/docs:devThe site will be available at http://localhost:3000.
Scripts
Key scripts for documentation workflows:
| Script | Description |
|---|---|
dev |
Starts the development server. |
build |
Builds the production application. |
fetch:remote-content |
Fetches remote tags and referenced content. |
generate |
Runs all generation steps (fetch:remote-content, generate:proto-docs, generate:api-reference, generate:index-pages). |
check:links |
Validates content integrity (broken links, missing frontmatter, schema errors). |
check-types |
Validates typescript types. |
test |
Runs all validation steps (check-types, check:links). |
lint |
checks for code style and syntax errors (ESLint). |
clean |
Cleans the build output and generated files. |
Validation
- Code Quality: Run
pnpm nx run @zitadel/docs:lintto check for syntax and style issues in JS/TS/MDX files. - Content Integrity: Run
pnpm nx run @zitadel/docs:check-linksto validate content structure, including:- Broken internal links
- Missing required front-matter (e.g.,
title) - Image references
Troubleshooting
Issue: Nx configuration not found or "nx" command not found
If you see errors like:
NX Cannot find configuration for task @zitadel/zitadel:@zitadel/docs:generate
Pass --verbose to see the stacktrace.or
pnpm nx run @zitadel/docs:dev
βERR_PNPM_RECURSIVE_EXEC_FIRST_FAILβ Command "nx" not found
Did you mean "pnpm nx"?Root cause: Your dependency cache or node_modules is out of sync.
Solution: Run these commands from the repository root in order:
- Clear node_modules:
rm -rf node_modulesβ removes the installed dependency folder - Clear pnpm cache:
pnpm cache deleteβ clears pnpm's internal package cache - Reinstall dependencies:
pnpm installβ reinstalls all dependencies fresh - Test the setup:
pnpm nx run @zitadel/docs:generateβ verifies everything works
This resolves 99% of setup-related issues.
Contributing
Build Process
The docs build process automatically handles the following steps via generate:
- Downloads required protoc plugins.
- Generates gRPC documentation from proto files.
- Generates API documentation from OpenAPI specs.
- Generates index files for directory structures.
Style Guide
- Variables: Use environment variables in code snippets where possible.
- Embedded Content: Use
_filename.mdxfor content embedded in other pages (not indexed individually). - Code Embedding: Use the
fileproperty in code blocks to embed code from the repo. - Voice: Use active voice and sentence case for titles.
Refer to the Google Developer Style Guide for general guidelines.
Adding Content
All documentation content is located in the content directory. Note that the system strictly accepts only .mdx files.
To add a new page:
- Create a
.mdxfile in the appropriate subdirectory ofcontent. - Register the new page in the sidebar settings at
lib/sidebar-data.tsto make it accessible in the navigation.
Pull Requests
Use docs(<scope>): <short summary> for PR titles.
Pass quality checks before submitting:
pnpm nx run @zitadel/docs:buildApps Docs Content Index (`apps/docs/content/index.mdx`)
title: ZITADEL Documentation
import { Card, Cards } from 'fumadocs-ui/components/card';
import { Rocket, Laptop, BookOpen, Book, Server, ShieldCheck, Terminal, MessageCircle, Calendar, Heart, HelpCircle } from 'lucide-react';
ZITADEL is the Identity Infrastructure for Developers.
We provide a hardened, extensible turnkey solution for all your authentication and authorization needs. Instead of building your own login system, use ZITADEL to accelerate your project with features that work out of the box:
- Secure Login: Multi-factor authentication (OTP, U2F, Passkeys) and single sign-on (OIDC, SAML, OAuth2).
- B2B Ready: First-class multi-tenancy with branding customization and self-service.
- Auditable: Exhaustive audit trail of all events.
- Extensible: Execute custom code on events (Actions) to fit your unique workflows.
Get Started
Explore our guides to get up and running with ZITADEL quickly.
Deployment Options
You can use ZITADEL in two ways:
- ZITADEL Cloud: This is our public cloud service. Use the free tier to start in minutes.
- Self-hosted ZITADEL: For full control, deploy ZITADEL wherever you prefer.
If you're unsure, consider the generous free tier of ZITADEL Cloud.
Explore Components
Deep dive into the architecture and capabilities of ZITADEL.
Community & Support
Join the community and get help.
Apps Docs Content Concepts Index (`apps/docs/content/concepts/index.mdx`)
title: "Key Concepts"
{/* THIS FILE IS AUTO-GENERATED FROM SIDEBAR-DATA.
ANY MANUAL CHANGES WILL BE OVERWRITTEN.
*/}
import { Card, Cards } from 'fumadocs-ui/components/card';
import { FileText, Folder, Link as LinkIcon } from 'lucide-react';
Apps Docs Content Legal Index (`apps/docs/content/legal/index.mdx`)
title: "Legal Agreements"
{/* THIS FILE IS AUTO-GENERATED FROM SIDEBAR-DATA.
ANY MANUAL CHANGES WILL BE OVERWRITTEN.
*/}
import { Card, Cards } from 'fumadocs-ui/components/card';
import { FileText, Folder, Link as LinkIcon } from 'lucide-react';
Apps Docs Content Apis Apis Index (`apps/docs/content/apis/apis/index.mdx`)
title: Core Resources sidebar_label: Core Resources
import DocCardList from '@/components/docusaurus/doc-card-list';
ZITADEL provides multiple APIs to manage the system, instances and resources such as users, projects and more.
There are different versions and multiple services available:
Apps Docs Content Apis Benchmarks Index (`apps/docs/content/apis/benchmarks/index.mdx`)
title: Benchmarks sidebar_label: Benchmarks
import DocCardList from '@/components/docusaurus/doc-card-list';
Benchmarks are crucial to understand if ZITADEL fulfills your expected workload and what resources it needs to do so.
This document explains the process and goals of load-testing zitadel in a cloud environment.
The results can be found on sub-pages.
Goals
The primary goal is to assess if ZITADEL can scale to required proportion. The goals might change over time and maturity of ZITADEL. At the moment the goal is to assess how the applicationβs performance scales. There are some concrete goals we have to meet:
- https://github.com/zitadel/zitadel/issues/8352 defines 1000 JWT profile auth/sec
- https://github.com/zitadel/zitadel/issues/4424 defines 1200 logins / sec.
Procedure
First we determine the βtargetβ of our load-test. The target is expressed as a make recipe in the benchmark Makefile. See also the benchmark readme on how to configure and run load-tests.
A target should be tested for longer periods of time, as it might take time for certain metrics to show up. For example, cloud SQL samples query insights. A runtime of at least 30 minutes is advised at the moment.
After each iteration of load-test, we should consult the After test procedure to conclude an outcome:
- Scale
- Log potential issuer and scale
- Terminate testing and resolve issues
Methodology
Benchmark definition
Tests are implemented in the ecosystem of k6. The tests are publicly available in the zitadel repository. Custom extensions of k6 are implemented in the xk6-modules repository.
The tests must at least measure the request duration for each API call. This gives an indication on how zitadel behaves over the duration of the load test.
Metrics
The following metrics must be collected for each test iteration. The metrics are used to follow the decision path of the After test procedure:
| Metric | Type | Description | Unit |
|---|---|---|---|
| Baseline | Comparison | Defines the baseline the test is compared against. If not specified the baseline defined in this document is used. | Link to test result |
| Purpose | Description | Description what should been proved with this test run | text |
| Test start | Setup | Timestamp when the test started. This is useful for gathering additional data like metrics or logs later | Date |
| Test duration | Setup | Duration of the test | Duration |
| Executed test | Setup | Name of the make recipe executed. Further information about specific test cases can be found here. | Name of the make recipe |
| k6 version | Setup | Version of the test client (k6) used | semantic version |
| VUs | Setup | Virtual Users which execute the test scenario in parallel | Number |
| Client location | Setup | Region or location of the machine which executed the test client. If not further specified the hoster is Google Cloud | Location / Region |
| Client machine specification | Setup | Definition of the client machine the test client ran on. The resources of the machine could be maxed out during tests therefore we collect this metric as well. The description must at least clarify the following metrics: vCPU Memory egress bandwidth | vCPU: Amount of threads (additional info) memory: GB egress bandwidth:Gbps |
| ZITADEL location | Setup | Region or location of the deployment of zitadel. If not further specified the hoster is Google Cloud | Location / Region |
| ZITADEL container specification | Setup | As ZITADEL is mainly run in cloud environments it should also be run as a container during the load tests. The description must at least clarify the following metrics: vCPU Memory egress bandwidth Scale | vCPU: Amount of threads (additional info) memory: GB egress bandwidth:Gbps scale: The amount of containers running during the test. The amount must not vary during the tests |
| ZITADEL Version | Setup | The version of zitadel deployed | Semantic version or commit |
| ZITADEL Configuration | Setup | Configuration of zitadel which deviates from the defaults and is not secret | yaml |
| ZITADEL feature flags | Setup | Changed feature flags | yaml |
| Database | Setup | Database type and version | type: psql version: semantic version |
| Database location | Setup | Region or location of the deployment of the database. If not further specified the hoster is Google Cloud SQL | Location / Region |
| Database specification | Setup | The description must at least clarify the following metrics: vCPU, Memory and egress bandwidth (Scale) | vCPU: Amount of threads (additional info) memory: GB egress bandwidth:Gbps |
| ZITADEL metrics during test | Result | This metric helps understanding the bottlenecks of the executed test. At least the following metrics must be provided: CPU usage Memory usage | CPU usage in percent Memory usage in percent |
| Observed errors | Result | Errors worth mentioning, mostly unexpected errors | description |
| Top 3 most expensive database queries | Result | The execution plan of the top 3 most expensive database queries during the test execution | database execution plan |
| Database metrics during test | Result | This metric helps understanding the bottlenecks of the executed test. At least the following metrics must be provided: CPU usage Memory usage | CPU usage in percent Memory usage in percent |
| k6 Iterations per second | Result | How many test iterations were done per second | Number |
| k6 overview | Result | Shows some basic metrics aggregated over the test run At least the following metrics must be included: duration per request (min, max, avg, p50, p95, p99) VUS For simplicity just add the whole test result printed to the terminal | terminal output |
| k6 output | Result | Trends and metrics generated during the test, this contains detailed information for each step executed during each iteration | csv |
Test setup
Make recipes
Details about the tests implemented can be found in this readme.
Test conclusion
After each iteration of load-test, we should consult the Flowchart to conclude an outcome:
- Scale
- Log potential issue and scale
- Terminate testing and resolve issues
Scale
An outcome of scale means that the service hit some kind of resource limit, like CPU or RAM which can be increased. In such cases we increase the suggested parameter and rerun the load-test for the same target. On the next test we should analyze if the increase in scale resulted in a performance improvement proportional to the scale parameter. For example if we scale from 1 to 2 containers, it might be reasonable to expect a doubling of iterations / sec. If such an increase is not noticed, there might be another bottleneck or underlying issue, such as locking.
Potential issues
A potential issue has an impact on performance, but does not prevent us to scale. Such issues must be logged in GH issues and load-testing can continue. The issue can be resolved at a later time and the load-tests repeated when it is. This is primarily for issues which require big changes to ZITADEL.
Termination
Scaling no longer improves iterations / second, or some kind of critical error or bug is experienced. The root cause of the issue must be resolved before we can continue with increasing scale.
After test procedure
This flowchart shows the procedure after running a test.
Baseline
Will be established as soon as the goal described above is reached.
Test results
This chapter provides a table linking to the detailed test results.
Apps Docs Content Concepts Eventstore Overview (`apps/docs/content/concepts/eventstore/overview.mdx`)
title: ZITADEL Event Store sidebar_label: Overview
ZITADEL is built on the Event Sourcing pattern, where changes are stored as events in an Event Store.
What is an Event Store?
Traditionally, data is stored in relations as a state
- A request needs to know the relations to select valid data
- If a relation changes, the requests need to change as well
- That is valid for actual, as well as for historical data
An Event Store on the other hand stores events, meaning every change that happens to any piece of data relates to an event.
The data is stored as events in an append-only log.
- Think of it as a ledger that gets new entries over time, accumulative
- To request data, all you have to do is to sum the events as the summary reflects the actual state
- To investigate past changes to your system, you just select the events from your time range of interest
- That makes audit/analytics very powerful, due to the historical data available to build queries
Benefits
- Audit: You have a built-in audit trail that tracks all changes over an unlimited period of time.
- Travel back in time: With our way of storing data we can show you all of your resources at a given point in time.
- Future Projections: It is easy to compute projections with new business logic by replaying all events since installation.
Definitions
Event Sourcing has some specific terms that are often used in our documentation. To understand how ZITADEL works it is important to understand this key definitions.
Events
An event is something that happens in the system and gets written to the database. This is the single source of truth.
Events are immutable and the current state of your system is derived from the events.
Possible Events:
- user.added
- user.changed
- product.added
- user.password.checked
Aggregate
An aggregate consist of multiple events. All events together from an aggregate will lead to the current state of the aggregate.
The aggregate can be compared with an object or a resources. An aggregates should be used as transaction boundary.
Projections
Projections contain the computed objects, that will be used on the query side for all the requests.
Think of this as a normalized view of specific events of one or multiple aggregates.
Apps Docs Content Concepts Features Index (`apps/docs/content/concepts/features/index.mdx`)
title: Features
Apps Docs Content Concepts Knowledge Index (`apps/docs/content/concepts/knowledge/index.mdx`)
title: Knowledge
Apps Docs Content Concepts Structure Index (`apps/docs/content/concepts/structure/index.mdx`)
title: Structure
Apps Docs Content Examples Introduction Index (`apps/docs/content/examples/introduction/index.mdx`)
title: "Example Applications"
{/* THIS FILE IS AUTO-GENERATED FROM SIDEBAR-DATA.
ANY MANUAL CHANGES WILL BE OVERWRITTEN.
*/}
import { Card, Cards } from 'fumadocs-ui/components/card';
import { FileText, Folder, Link as LinkIcon } from 'lucide-react';
Apps Docs Content Guides Integrate Index (`apps/docs/content/guides/integrate/index.mdx`)
title: "Integrate"
{/* THIS FILE IS AUTO-GENERATED FROM SIDEBAR-DATA.
ANY MANUAL CHANGES WILL BE OVERWRITTEN.
*/}
import { Card, Cards } from 'fumadocs-ui/components/card';
import { FileText, Folder, Link as LinkIcon } from 'lucide-react';
Apps Docs Content Guides Solution Scenarios Index (`apps/docs/content/guides/solution-scenarios/index.mdx`)
title: Solution Scenarios
Learn how to use ZITADEL for different scenarios.
Apps Docs Content Guides Start Quickstart (`apps/docs/content/guides/start/quickstart.mdx`)
title: The ZITADEL Quick Start Guide sidebar_label: Quick Start Guide keywords: [ZITADEL, OIDC, PKCE, Authentication, Identity Management]
import { Tab } from 'fumadocs-ui/components/tabs';
import { FrameworkSelector } from '@/components/framework_selector';
import AppConfig from './_app_config.mdx';
import AppValues from './_app_values.mdx';
In this guide, youβll set up a Zitadel account and configure it to work with our pre-built example applications.
You can simply clone the repository, follow the console setup, and have a working authentication flow in minutes.
Get Started with ZITADEL Cloud
Set up your ZITADEL account and organization to begin managing identities for your applications.
1. Create your Account and Organization
You first need access to the ZITADEL Cloud Customer Portal.
This is the administrative hub for managing your billing, teams, and instances.
- Sign Up: Go to zitadel.com and select Sign Up.
- Onboarding: Follow the prompts to verify your email and set up your Portal Team.
- Tip: We recommend using Passkeys for a secure, passwordless login experience.
- Access: Once authenticated, you will be redirected to the Customer Portal dashboard.
2. Quick Onboarding
Complete the brief onboarding questions.
This data helps us prioritize the development of new features, SDKs, and integrations that matter most to our community.
3. Create your ZITADEL instance
An Instance is a fully isolated identity environment with its own users, policies, and data.
Most developers use separate instances to isolate Development, Test, and Production workflows.
Follow these steps to deploy your first instance:
- Start: Click Create Instance on your dashboard.
- Identity: Provide an Instance Name (e.g., dev-environment). This will be used to generate your default domain (e.g., dev-environment-xxxx.zitadel.cloud).
- Locality: Select your Region.
- Note: Choosing a region close to your users minimizes latency and helps with data residency compliance.
- Admin Setup: Create your Instance Administrator. This user has "root" permissions to manage all organizations, policies, and settings within this specific instance.
- Deploy: Review your settings and click Create Instance.
4. Create your Project and Application
In ZITADEL, Applications are grouped into Projects.
This allows multiple applications (like a React frontend and a Go backend) to share the same roles and role assignments.
Launch the Management Console
Click Create your app. This opens the Management Console for your instance in a new tab.
Log in using the Admin credentials you just created.
Step 1: Define your Project
- Name: Enter a name (e.g., Project1).
- Framework: Select your preferred framework
- Continue: Click the Continue button.
Step 2: Review Default Settings
ZITADEL automatically configures the best security settings for your selected framework.
5. Collect your Integration Keys
Integrate ZITADEL into your App
How the Authentication Flow Works
ZITADEL handles the complexity of the OIDC handshake so your app stays secure without manual token management.
- Login: App redirects the user to ZITADEL with a PKCE challenge.
- Auth: User authenticates on the ZITADEL hosted login page.
- Exchange: ZITADEL returns an Auth Code, which the app exchanges for an Access Token.
- Tokens: The app shows the Access and ID Token
- Logout: The app clears local tokens and terminates the ZITADEL session.
1. Prerequisites
2. Get the Example Project
3. Configure your Credentials
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
PORT=3000
NG_APP_ZITADEL_DOMAIN="https://your-zitadel-domain"
NG_APP_ZITADEL_CLIENT_ID="your-client-id"
NG_APP_ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback"
NG_APP_ZITADEL_POST_LOGOUT_URL="http://localhost:3000/auth/logout/callback"
NG_APP_ZITADEL_POST_LOGIN_URL="/profile"
```
</Tab>
<Tab value="Astro">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID, ZITADEL_CLIENT_SECRET and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
NODE_ENV=development
PORT=3000
SESSION_SECRET="your-very-secret-and-strong-session-key"
SESSION_DURATION=3600
ZITADEL_DOMAIN="https://your-zitadel-domain"
ZITADEL_CLIENT_ID="your-zitadel-application-client-id"
ZITADEL_CLIENT_SECRET="your-zitadel-application-client-secret"
ZITADEL_CALLBACK_URL="http://localhost:3000/api/auth/callback/zitadel"
ZITADEL_POST_LOGIN_URL="/profile"
ZITADEL_POST_LOGOUT_URL="http://localhost:3000/api/auth/logout/callback"
NEXTAUTH_URL="http://localhost:3000"
```
</Tab>
<Tab value="ASP.NET Core">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID, ZITADEL_CLIENT_SECRET and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
PORT=3000
SESSION_DURATION=3600
ZITADEL_DOMAIN="https://your-zitadel-domain"
ZITADEL_CLIENT_ID="your-zitadel-application-client-id"
ZITADEL_CLIENT_SECRET="your-randomly-generated-client-secret"
ZITADEL_POST_LOGOUT_URL="http://localhost:3000/auth/logout/callback"
```
</Tab>
<Tab value="Django">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
PY_ENV=development
PORT=3000
SESSION_SECRET="your-very-secret-and-strong-session-key"
SESSION_DURATION=3600
ZITADEL_DOMAIN="https://your-zitadel-domain"
ZITADEL_CLIENT_ID="your-zitadel-application-client-id"
ZITADEL_CLIENT_SECRET="your-randomly-generated-client-secret"
ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback"
ZITADEL_POST_LOGIN_URL="/profile"
ZITADEL_POST_LOGOUT_URL="http://localhost:3000/auth/logout/callback"
```
</Tab>
<Tab value="Express.js">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID, ZITADEL_CLIENT_SECRET and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
NODE_ENV=development
PORT=3000
SESSION_SECRET="your-very-secret-and-strong-session-key"
SESSION_DURATION=3600
ZITADEL_DOMAIN="https://your-zitadel-domain"
ZITADEL_CLIENT_ID="your-zitadel-application-client-id"
ZITADEL_CLIENT_SECRET="your-zitadel-application-client-secret"
ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback/zitadel"
ZITADEL_POST_LOGIN_URL="/profile"
ZITADEL_POST_LOGOUT_URL="http://localhost:3000/auth/logout/callback"
```
</Tab>
<Tab value="FastAPI">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID, ZITADEL_CLIENT_SECRET and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
PY_ENV=development
PORT=3000
SESSION_SECRET="your-very-secret-and-strong-session-key"
SESSION_DURATION=3600
ZITADEL_DOMAIN="https://your-zitadel-domain"
ZITADEL_CLIENT_ID="your-zitadel-application-client-id"
ZITADEL_CLIENT_SECRET="your-zitadel-application-client-secret"
ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback"
ZITADEL_POST_LOGIN_URL="/profile"
ZITADEL_POST_LOGOUT_URL="http://localhost:3000/auth/logout/callback"
```
</Tab>
<Tab value="Fastify">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID, ZITADEL_CLIENT_SECRET and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
NODE_ENV=development
PORT=3000
SESSION_SECRET="your-very-secret-and-strong-session-key"
SESSION_DURATION=3600
ZITADEL_DOMAIN="https://your-zitadel-domain"
ZITADEL_CLIENT_ID="your-zitadel-application-client-id"
ZITADEL_CLIENT_SECRET="your-zitadel-application-client-secret"
ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback/zitadel"
ZITADEL_POST_LOGIN_URL="/profile"
ZITADEL_POST_LOGOUT_URL="http://localhost:3000/auth/logout/callback"
```
</Tab>
<Tab value="Flask">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID, ZITADEL_CLIENT_SECRET and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
PY_ENV=development
PORT=3000
SESSION_SECRET="your-very-secret-and-strong-session-key"
SESSION_DURATION=3600
ZITADEL_DOMAIN="https://your-zitadel-domain"
ZITADEL_CLIENT_ID="your-zitadel-application-client-id"
ZITADEL_CLIENT_SECRET="your-zitadel-application-client-secret"
ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback"
ZITADEL_POST_LOGIN_URL="/profile"
ZITADEL_POST_LOGOUT_URL="http://localhost:3000/auth/logout/callback"
```
</Tab>
<Tab value="Flutter">
No action required for this step.
The issuer and client Id will be passed directly when running the app (next step)
</Tab>
<Tab value="Go">
No action required for this step.
The issuer and client Id will be passed directly when running the app (next step)
</Tab>
<Tab value="Hono">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID, ZITADEL_CLIENT_SECRET and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
NODE_ENV=development
PORT=3000
SESSION_SECRET="your-very-secret-and-strong-session-key"
SESSION_DURATION=3600
ZITADEL_DOMAIN="https://your-zitadel-domain"
ZITADEL_CLIENT_ID="your-zitadel-application-client-id"
ZITADEL_CLIENT_SECRET="your-zitadel-application-client-secret"
ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback/zitadel"
ZITADEL_POST_LOGIN_URL="/profile"
ZITADEL_POST_LOGOUT_URL="http://localhost:3000/auth/logout/callback"
```
</Tab>
<Tab value="Laravel">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID, ZITADEL_CLIENT_SECRET and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
3. Generate app key, this will update the APP_KEY variable in the .env file
```bash
php artisan key:generate
```
```bash
APP_KEY="your-app-key"
APP_ENV=local
APP_DEBUG=true
SERVER_URL="http://localhost:3000"
SERVER_PORT=3000
DB_CONNECTION=sqlite
ZITADEL_DOMAIN="https://your-zitadel-domain"
ZITADEL_CLIENT_ID="your-zitadel-application-client-id"
ZITADEL_CLIENT_SECRET="your-randomly-generated-client-secret"
ZITADEL_POST_LOGOUT_URL="http://localhost:3000/auth/logout/callback"
```
</Tab>
<Tab value="NestJS">
1. Copy+paste the .env.example to .env.local
2. Update the ZITADEL_CLIENT_ID, ZITADEL_CLIENT_SECRET and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
NODE_ENV=development
PORT=3000
SESSION_SECRET="your-very-secret-and-strong-session-key"
SESSION_SALT="your-very-secret-and-strong-session-salt"
SESSION_DURATION=3600
ZITADEL_DOMAIN="https://your-zitadel-domain"
ZITADEL_CLIENT_ID="your-zitadel-application-client-id"
ZITADEL_CLIENT_SECRET="your-zitadel-application-client-secret"
ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback/zitadel"
ZITADEL_POST_LOGIN_URL="/profile"
ZITADEL_POST_LOGOUT_URL="http://localhost:3000/auth/logout/callback"
```
</Tab>
<Tab value="Next.js">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID, ZITADEL_CLIENT_SECRET and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
NODE_ENV=development
PORT=3000
SESSION_SECRET="your-very-secret-and-strong-session-key"
SESSION_DURATION=3600
ZITADEL_DOMAIN="[https://your-instance.zitadel.cloud/](https://your-instance.zitadel.cloud/)"
ZITADEL_CLIENT_ID="zitadel-client-id"
ZITADEL_CLIENT_SECRET="zitadel-client-secret"
ZITADEL_CALLBACK_URL="http://localhost:3000/api/auth/callback/zitadel"
ZITADEL_POST_LOGIN_URL="/profile"
ZITADEL_POST_LOGOUT_URL="http://localhost:3000/api/auth/logout/callback"
NEXTAUTH_URL="http://localhost:3000"
```
</Tab>
<Tab value="Nuxt">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID, ZITADEL_CLIENT_SECRET and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
NODE_ENV=development
PORT=3000
SESSION_SECRET="your-very-secret-and-strong-session-key"
SESSION_DURATION=3600
ZITADEL_DOMAIN="https://your-zitadel-domain"
ZITADEL_CLIENT_ID="your-zitadel-application-client-id"
ZITADEL_CLIENT_SECRET="your-zitadel-application-client-secret"
ZITADEL_CALLBACK_URL="http://localhost:3000/api/auth/callback/zitadel"
ZITADEL_POST_LOGIN_URL="/profile"
ZITADEL_POST_LOGOUT_URL="http://localhost:3000"
NEXTAUTH_URL="http://localhost:3000"
```
</Tab>
<Tab value="Qwik">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID, ZITADEL_CLIENT_SECRET and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
NODE_ENV=development
VITE_PORT=3000
VITE_SESSION_SECRET="your-very-secret-and-strong-session-key"
VITE_SESSION_DURATION=3600
VITE_ZITADEL_DOMAIN="https://your-zitadel-domain"
VITE_ZITADEL_CLIENT_ID="your-zitadel-application-client-id"
VITE_ZITADEL_CLIENT_SECRET="your-zitadel-application-client-secret"
VITE_ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback/zitadel"
VITE_ZITADEL_POST_LOGOUT_URL="http://localhost:3000/api/auth/logout/callback"
```
</Tab>
<Tab value="React">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
NODE_ENV=development
PORT=3000
VITE_ZITADEL_DOMAIN="https://your-zitadel-domain"
VITE_ZITADEL_CLIENT_ID="your-client-id"
VITE_ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback"
VITE_ZITADEL_POST_LOGIN_URL="/profile"
VITE_ZITADEL_POST_LOGOUT_URL="http://localhost:3000"
```
</Tab>
<Tab value="SolidStart">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID, ZITADEL_CLIENT_SECRET and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
NODE_ENV=development
PORT=3000
SESSION_SECRET="your-very-secret-and-strong-session-key"
SESSION_DURATION=3600
ZITADEL_DOMAIN="https://your-zitadel-domain"
ZITADEL_CLIENT_ID="your-zitadel-application-client-id"
ZITADEL_CLIENT_SECRET="your-zitadel-application-client-secret"
ZITADEL_CALLBACK_URL="http://localhost:3000/api/auth/callback/zitadel"
ZITADEL_POST_LOGIN_URL="/profile"
ZITADEL_POST_LOGOUT_URL="http://localhost:3000/api/auth/logout/callback"
NEXTAUTH_URL="http://localhost:3000"
```
</Tab>
<Tab value="Spring">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID, ZITADEL_CLIENT_SECRET and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
SPRING_PROFILES_ACTIVE=development
PORT=3000
SESSION_SECRET="your-very-secret-and-strong-session-key"
SESSION_DURATION=3600
ZITADEL_DOMAIN="https://your-zitadel-domain"
ZITADEL_CLIENT_ID="your-zitadel-application-client-id"
ZITADEL_CLIENT_SECRET="your-randomly-generated-client-secret"
ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback"
ZITADEL_POST_LOGOUT_URL="http://localhost:3000/auth/logout/callback"
```
</Tab>
<Tab value="Symfony">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID, ZITADEL_CLIENT_SECRET and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
APP_SECRET="your-app-secret-key"
SERVER_URL="http://localhost:3000"
SERVER_PORT=3000
ZITADEL_DOMAIN="https://your-zitadel-domain"
ZITADEL_CLIENT_ID="your-zitadel-application-client-id"
ZITADEL_CLIENT_SECRET="your-randomly-generated-client-secret"
ZITADEL_POST_LOGOUT_URL="http://localhost:3000/auth/logout/callback"
```
</Tab>
<Tab value="Svelte">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID, ZITADEL_CLIENT_SECRET and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
SESSION_SECRET="your-very-secret-and-strong-session-key"
SESSION_DURATION=3600
# Example: https://my-org-a1b2c3.zitadel.cloud
ZITADEL_DOMAIN="https://your-zitadel-domain"
ZITADEL_CLIENT_ID="your-zitadel-application-client-id"
ZITADEL_CLIENT_SECRET="your-zitadel-application-client-secret"
ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback/zitadel"
ZITADEL_POST_LOGIN_URL="/profile"
ZITADEL_POST_LOGOUT_URL="http://localhost:3000/auth/logout/callback"
NEXTAUTH_URL="http://localhost:3000"
```
</Tab>
<Tab value="Vue.js">
1. Copy+paste the .env.example to .env
2. Update the ZITADEL_CLIENT_ID and ZITADEL_DOMAIN with the client id and issuer you collected in Step 5.
```bash
NODE_ENV=development
PORT=3000
VITE_ZITADEL_DOMAIN="https://your-zitadel-domain"
VITE_ZITADEL_CLIENT_ID="your-client-id"
VITE_ZITADEL_CALLBACK_URL="http://localhost:3000/auth/callback"
VITE_ZITADEL_POST_LOGIN_URL="/profile"
VITE_ZITADEL_POST_LOGOUT_URL="http://localhost:3000"
```
</Tab>4. Build and Run
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="Astro">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="ASP.NET Core">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="Django">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="Express.js">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="Fastify">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="FastAPI">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="Flask">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="Flutter">
Make sure to replace the [zitadel_issuer] and [zitadel_client_id] with your own value before running the command
```bash
flutter run -d chrome --web-port=4444 --dart-define zitadel_url=[zitadel_issuer] --dart-define zitadel_client_id=[zitadel_client_id]
```
Your app will be live at `http://localhost:4444`.
</Tab>
<Tab value="Go">
Make sure to replace the [zitadel_domain] (use the domain from the issuer without the https://) and [zitadel_client_id] with your own value before running the command
```bash
go run example/app/app.go --domain [zitadel_domain] --key XKv2Lqd7YAq13NUZVUWZEWZeruqyzViM --clientID [zitadel_client_id] --redirectURI http://localhost:8089/auth/callback
```
Your app will be live at `http://localhost:8089`.
</Tab>
<Tab value="Hono">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="Laravel">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="NestJS">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="Next.js">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="Nuxt">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="Qwik">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="React">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="SolidStart">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="Spring">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="Symfony">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="Svelte">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>
<Tab value="Vue.js">
```bash
make start
```
Your app will be live at `http://localhost:3000`.
</Tab>Success! π
Youβve successfully integrated ZITADEL into an application.
Whatβs next?
- Example Applications: Find more comprehensive guides and examples for the different frameworks
- SSO: Learn how to add SSO to your services
- Customize the UI: Make the login page your own with Branding.
- Explore the API: Check out the ZITADEL API Reference for advanced integrations.
Need help? Join our Discord community or explore the full Documentation. Happy coding!
Prefer watching over reading? Check out our video walkthrough of this quickstart.
Apps Docs Content Legal Policies Index (`apps/docs/content/legal/policies/index.mdx`)
title: "Policies"
{/* THIS FILE IS AUTO-GENERATED FROM SIDEBAR-DATA.
ANY MANUAL CHANGES WILL BE OVERWRITTEN.
*/}
import { Card, Cards } from 'fumadocs-ui/components/card';
import { FileText, Folder, Link as LinkIcon } from 'lucide-react';
Apps Docs Content Legal Service Description Index (`apps/docs/content/legal/service-description/index.mdx`)
title: "Service description"
{/* THIS FILE IS AUTO-GENERATED FROM SIDEBAR-DATA.
ANY MANUAL CHANGES WILL BE OVERWRITTEN.
*/}
import { Card, Cards } from 'fumadocs-ui/components/card';
import { FileText, Folder, Link as LinkIcon } from 'lucide-react';
Apps Docs Content Self Hosting Deploy Overview (`apps/docs/content/self-hosting/deploy/overview.mdx`)
title: Deploy ZITADEL sidebar_label: Overview
Choose your platform and run ZITADEL with the most minimal configuration possible.
Prerequisites
- For test environments, ZITADEL does not need many resources, 1 CPU and 512MB memory are more than enough. (With more CPU, the password hashing might be faster)
- A PostgreSQL instance. Make sure to check the database configuration options in our Production Guide.
Releases
The easiest way to use ZITADEL is to run one of our container releases
- ZITADEL does provide latest and stable container images
- stable is the current production release of ZITADEL.
- latest is the last created release from our pipelines that gets updated in a high frequency.
Production Setup
After you have successfully created your first test environment using one of the deployment guides in this section,
you might want to configure ZITADEL for production and embed it into your system landscape.
To do so, jump straight to the production setup guide.
To achieve high availability, we recommend using a Kubernetes Cluster.
We have an official Helm chart for easy deployment and maintenance.
Apps Docs Content Examples Introduction Backend Index (`apps/docs/content/examples/introduction/backend/index.mdx`)
title: "APIs / Backend Quickstart Guides"
{/* THIS FILE IS AUTO-GENERATED FROM SIDEBAR-DATA.
ANY MANUAL CHANGES WILL BE OVERWRITTEN.
*/}
import { Card, Cards } from 'fumadocs-ui/components/card';
import { FileText, Folder, Link as LinkIcon } from 'lucide-react';
Apps Docs Content Examples Introduction Frontend Index (`apps/docs/content/examples/introduction/frontend/index.mdx`)
title: "Frontend (SPA) Quickstart Guides"
{/* THIS FILE IS AUTO-GENERATED FROM SIDEBAR-DATA.
ANY MANUAL CHANGES WILL BE OVERWRITTEN.
*/}
import { Card, Cards } from 'fumadocs-ui/components/card';
import { FileText, Folder, Link as LinkIcon } from 'lucide-react';
Apps Docs Content Examples Introduction Fullstack Index (`apps/docs/content/examples/introduction/fullstack/index.mdx`)
title: "Full-Stack / SSR Quickstart Guides"
{/* THIS FILE IS AUTO-GENERATED FROM SIDEBAR-DATA.
ANY MANUAL CHANGES WILL BE OVERWRITTEN.
*/}
import { Card, Cards } from 'fumadocs-ui/components/card';
import { FileText, Folder, Link as LinkIcon } from 'lucide-react';
Apps Docs Content Examples Introduction Mobile Index (`apps/docs/content/examples/introduction/mobile/index.mdx`)
title: "Mobile & Native Quickstart Guides"
{/* THIS FILE IS AUTO-GENERATED FROM SIDEBAR-DATA.
ANY MANUAL CHANGES WILL BE OVERWRITTEN.
*/}
import { Card, Cards } from 'fumadocs-ui/components/card';
import { FileText, Folder, Link as LinkIcon } from 'lucide-react';
Apps Docs Content Examples Introduction Webapp Index (`apps/docs/content/examples/introduction/webapp/index.mdx`)
title: "Web App (Server-Side) Quickstart Guides"
{/* THIS FILE IS AUTO-GENERATED FROM SIDEBAR-DATA.
ANY MANUAL CHANGES WILL BE OVERWRITTEN.
*/}
import { Card, Cards } from 'fumadocs-ui/components/card';
import { FileText, Folder, Link as LinkIcon } from 'lucide-react';
Apps Docs Content Guides Integrate Identity Providers Idps Overview (`apps/docs/content/guides/integrate/identity-providers/_idps_overview.mdx`)
Go to the settings page of your instance or organization and choose "Identity Providers".
In the table you can see all the providers you have configured.
Also, you see all provider templates that are available.
Select the {props.templates} Provider template.
Apps Docs Content Guides Integrate Identity Providers Intro (`apps/docs/content/guides/integrate/identity-providers/_intro.mdx`)
This guides shows you how to connect {props.provider} as an identity provider in ZITADEL.
In ZITADEL you can connect an Identity Provider (IdP) like {props.provider} to your instance and provide it as default to all organizations.
Also, you can register the IdP to a specific organization only.
If you allow so, your organizations members can do the same in self-service.
Apps Docs Content Guides Integrate Login Ui Index (`apps/docs/content/guides/integrate/login-ui/index.mdx`)
title: "Build your own Login UI"
{/* THIS FILE IS AUTO-GENERATED FROM SIDEBAR-DATA.
ANY MANUAL CHANGES WILL BE OVERWRITTEN.
*/}
import { Card, Cards } from 'fumadocs-ui/components/card';
import { FileText, Folder, Link as LinkIcon } from 'lucide-react';
Apps Docs Content Guides Integrate Login Index (`apps/docs/content/guides/integrate/login/index.mdx`)
title: "Login users with ZITADEL"
{/* THIS FILE IS AUTO-GENERATED FROM SIDEBAR-DATA.
ANY MANUAL CHANGES WILL BE OVERWRITTEN.
*/}
import { Card, Cards } from 'fumadocs-ui/components/card';
import { FileText, Folder, Link as LinkIcon } from 'lucide-react';
Apps Docs Content Guides Integrate Onboarding Index (`apps/docs/content/guides/integrate/onboarding/index.mdx`)
title: "Onboard Customers and Users"
{/* THIS FILE IS AUTO-GENERATED FROM SIDEBAR-DATA.
ANY MANUAL CHANGES WILL BE OVERWRITTEN.
*/}
import { Card, Cards } from 'fumadocs-ui/components/card';
import { FileText, Folder, Link as LinkIcon } from 'lucide-react';
Apps Docs Content Guides Integrate Services Index (`apps/docs/content/guides/integrate/services/index.mdx`)
title: "Integrate ZITADEL with your Favorite Services"
{/* THIS FILE IS AUTO-GENERATED FROM SIDEBAR-DATA.
ANY MANUAL CHANGES WILL BE OVERWRITTEN.
*/}
import { Card, Cards } from 'fumadocs-ui/components/card';
import { FileText, Folder, Link as LinkIcon } from 'lucide-react';
Apps Docs Content Guides Integrate Token Introspection Index (`apps/docs/content/guides/integrate/token-introspection/index.mdx`)
title: Token introspection sidebar_label: Token introspection
import DocCardList from '@/components/docusaurus/doc-card-list';
Token introspection is the process of checking whether an access token is valid and can be used to access protected resources.
You have an API that acts as an OAuth resource server and can be accessed by user-facing applications.
To validate an access token by calling the ZITADEL introspection API, you can use the JSON Web Token (JWT) Profile (recommended) or Basic Authentication for token introspection.
It's crucial to understand that the API is entirely separate from the front end.
The API shouldnβt concern itself with the token type received.
Instead, it's about how the API chooses to call the introspection endpoint, either through JWT Profile or Basic Authentication.
Many APIs assume they might receive a JWT and attempt to verify it based on signature or expiration.
However, with ZITADEL, you can send either a JWT or an opaque Bearer token from the client end to the API.
This flexibility is one of ZITADEL's standout features.
API application
If you have an API that behaves as an OAuth resource server that can be accessed by user-facing applications and need to validate an access token by calling the ZITADEL introspection API, you can use the following methods to register these APIs in ZITADEL:
Service accounts
If there are client APIs or systems that need to access other protected APIs, these APIs or systems must be declared as service accounts.
A service account is not considered an application type in ZITADEL.
Read the introduction on how to authenticate service accounts.
Further references
- Introspection API reference
- JWT vs. opaque tokens
- Python examples for securing an API and invoking it as a service account
Apps Docs Content Guides Manage Console Actions Overview (`apps/docs/content/guides/manage/console/actions-overview.mdx`)
title: Actions sidebar_label: Overview
Overview
An Identity and Access Management system is a highly interactive environment. ZITADEL includes a powerful feature called Actions, which allows you to programmatically react to specific events within the system.
Actions allow you to define custom scripts (JavaScript) that are executed based on specific triggers (Flows). This enables advanced customization, such as modifying tokens, calling external APIs during login, or customizing authentication flows.
How Actions Work
The Actions architecture consists of three main components:
- Action: The JavaScript code containing your business logic.
- Trigger Type: The specific event in ZITADEL (e.g., "Post Authentication") where code execution is allowed.
- Flow: The settings that links an Action to a Trigger Type.
The JavaScript Runtime
ZITADEL interprets your Action scripts as JavaScript.
- Compliance: Scripts must be ECMAScript 5.1(+) compliant.
- Engine: The underlying engine is goja. Refer to their documentation for detailed references about the underlying library features and limitations.
Structure of an Action Script
The script of an action must contain a function that matches the Action's name. ZITADEL calls this function at runtime.
The function receives two primary objects:
ctx(Context): Provides readable information about the current request (User, Request Info, etc.).api(API): Provides methods to mutate state (Set Claims, Deny Access, etc.).
Example:
If your action is named doSomething, your script must look like this:
function doSomething(ctx, api){
// read from ctx and manipulate with api
}Available Modules
You can use the following built-in modules inside your JavaScript code:
- HTTP module: To call external APIs / Webhooks.
- Logging module: To log information to stdout (useful for debugging).
- UUID module: To generate UUIDs.
Stuck customizing ZITADEL actions? Find samples for setting OIDC claims, SAML attributes, extending JIT provisioning data, calling external APIs, and more in this repository.
Managing Actions in Management Console
1. Create an Action
To add an action, navigate to your Organization's top navigation and select Actions. Click the New button and provide:
- Name: Must match the function name in your script.
- Script: Your JavaScript code.
- Timeout: How long the script is allowed to run before being terminated.
- Allowed to Fail: If checked, the flow will continue even if the script throws an error.
2. Create a Flow (Link Action to Trigger)
Merely creating an Action does not run it. You must create a Flow to define when it runs.
- Select the Flow Type (e.g., External Authentication).
- Select the Trigger (e.g., Post Authentication).
- Add your Action to the list of executed scripts.
Example Scenario:
You create an External Authentication Flow with a Post Authentication trigger. Now, whenever a user authenticates via an external IDP (like Google or Azure AD), your Action is triggered immediately after the authentication step but before the session is finalized.
Available Flow Types
Trigger types define the point during the execution of a request. Each trigger defines which readable information (ctx) and mutable properties (api) are passed into the called function.
Currently, ZITADEL supports the following flows:
- Internal Authentication: Triggers during login with ZITADEL (username/password).
- External Authentication: Triggers during login with an external Identity Provider.
- Complement Token: Triggers when tokens (ID Token / Access Token) are created, allowing you to add custom claims.
- Customize SAML Response: Triggers when a SAML response is generated.
References
Apps Docs Content Guides Manage Console Applications Overview (`apps/docs/content/guides/manage/console/applications-overview.mdx`)
title: Applications
sidebar_label: Applications
sidebar_position: 5
import ThemedImage from "@/components/docusaurus/themed-image";
import AuthType from "../../integrate/application/_auth-type.mdx";
import ReviewConfig from "../../integrate/application/_review-config.mdx";
import AppType from "./_application-types.mdx";
What is an application?
Applications are the entry point to your Project Overview
. Users either login into one of your applications (Frontend) and interact with them directly, or use one of your APIs (Backend).
All applications within a project share the same Roles and Role Assignments. This means you define a role once (e.g., admin) on the Project level, and it applies across all your web, mobile, and API applications.
To access your applications, navigate to your Project in the Management Console and select your application.
Create an Application
To add an application to your project, click on the New button and select your application type.
Application Types
ZITADEL offers five application types to cover different architectural patterns:
The first three options (Web, Native, and User Agent) require user interaction. The fourth option (API) is for machine-to-machine communication without direct user interaction.
Depending on the app type, there are small differences in the possible settings. To get a good understanding about user profiles and recommended flows, read the Recommended Flows Guide.
Web
Web applications are server-side rendered applications that users interact with.
- Examples: Applications using Java (Spring/Thymeleaf), .NET (Razor), PHP, Python (Django/Flask), or enabling SSO in tools like GitLab.
- NextJS: A NextJS app is typically a Web Application because it can execute server-side code (SSR/API routes) to keep secrets safe.
- Authentication: Uses Authorization Code Flow (PKCE recommended) with a Client Secret.
Native
Native Applications are installed on a thin client, such as a smartphone or desktop computer.
- Examples: Android Apps, iOS Apps, Desktop Apps (Electron, Tauri).
- Authentication: Uses the Key file generated by ZITADEL to authenticate or Authorization Code Flow with PKCE (for user login).
Native app links
For native passkeys, configure OS association on the OIDC app under Native App Links:
- iOS: Team ID and Bundle ID (published in
/.well-known/apple-app-site-association) - Android: Package name and SHA-256 certificate fingerprints (published in
/.well-known/assetlinks.json)
See Native app links for passkeys for endpoint details, caching, and verification.
User Agent
User Agent Applications are executed entirely in the web browser (Client-Side).
- Examples: Single Page Applications (SPA) built with React, Angular, Vue, or Svelte that do not have a backend server.
- Authentication: Uses Authorization Code Flow with PKCE (implicit flow is supported but not recommended).
API
These are applications without human interaction, accessed by other applications or services (Machine-to-Machine).
- Examples: Background workers, CLIs, Daemons, Microservices.
- Authentication: Uses Client Credentials (JWT Profile or Basic Auth) or Private Key JWT.
SAML
If your application doesn't support the OIDC standard but supports SAML 2.0, choose this type. SAML is an XML-based open standard for exchanging authentication and authorization data.
After creating a SAML app, you can either:
- Add a link to a SAML metadata file.
- Upload the metadata XML file directly.
You can find example settings for SAML 2.0 in our integrate services guides.
Settings
Redirect URIs
App Types with user interaction (Web, Native, and User Agent) require Redirect URIs. These are the allowed URLs where ZITADEL sends the user after a successful login.
- Security: ZITADEL strictly checks these URIs during the login process. They must match exactly what is defined in your application code.
- Protocols: Native applications can use custom protocols (e.g.,
myapp://) instead ofhttp/https.
Development Mode
If you are developing locally or need to redirect users to a non-secure protocol (other than https://), you must enable Development mode.
When disabled, ZITADEL enforces strict security and only allows https.
Glob Patterns:
Development mode allows the use of glob patterns in Redirect URIs for flexibility:
| Special Terms | Meaning |
|---|---|
* |
Matches any sequence of non-path-separators. |
/**/ |
Matches zero or more directories. |
? |
Matches any single non-path-separator character. |
[class] |
Matches any single character against a class of characters (e.g., [a-z]). |
{alt1,...} |
Matches a sequence if one of the comma-separated alternatives matches. |
Review Settings
Application Settings
After creating an application, you can modify its settings.
- Auth Method: You can switch authentication methods (e.g., from Basic to Private Key JWT) via the toggle or dropdowns.
- OIDC Compliance: The Management Console checks if your settings are OIDC compliant and shows tasks for completion if anything is missing.
Use New Login UI
The Use new login UI checkbox and Custom base URL for the new Login UI field control which login interface your application uses:
Checkbox Behavior: This checkbox only has an effect when the instance-level Login V2 feature flag is disabled. When the instance-wide feature is off, checking this box enables Login V2 specifically for this application while other applications continue using Login V1.
Custom Base URL: This field is used when you're running a self-hosted Login UI at a different domain (e.g.,
https://login.acme.com). If you leave this field empty, ZITADEL redirects to its built-in/ui/v2/loginendpoint.
Configuration Steps:
Per-Application Login V2 (when instance flag is off):
- Check the Use new login UI checkbox in your application settings
- Optionally enter a custom base URL if using a self-hosted Login UI
- This enables Login V2 only for this specific application
Self-Hosted Login UI:
- Deploy your Login UI to a custom domain
- Enter the full base URL (e.g.,
https://login.acme.com) in the Custom base URL field - Ensure your Login UI is properly configured with the required environment variables and service account permissions
Instance-Wide Login V2:
- Enable the Login V2 feature flag at the instance level (in Default Settings β Features)
- When enabled, all applications use Login V2 regardless of individual application settings
- The custom base URL field still applies if you want to use a self-hosted Login UI
For detailed setup instructions for self-hosted Login UI, see Connect your Self-Hosted Login UI to ZITADEL and Hosted Login UI: Authenticate Your Users.
Token Settings
In the Token Settings section, you can customize the tokens issued for this application:
- Token Type: Switch between Bearer Token (Opaque) and JWT.
- Content: Check options to include User Roles and User Information inside the ID Token.
- ClockSkew: Optionally set a time buffer added to the expiration time of the issued token to handle server time differences.
Additional Origins
If your application makes requests from domains other than the Redirect URI (e.g., a Javascript app fetching data from an API on a different domain), you can specify them here to configure CORS (Cross-Origin Resource Sharing).
Security Considerations
Ensure the management of application settings is limited to authorized users only.
- Use Administrator roles to limit permissions for your users to make changes to your applications.
- When granting projects to other organizations, the receiving organization cannot see or change the application settings. They can only assign roles.
References
Apps Docs Content Guides Manage Console Console Overview (`apps/docs/content/guides/manage/console/console-overview.mdx`)
title: Management Console sidebar_label: Management Console
Overview
The ZITADEL Management Console is the web-based Dashboard UI designed to facilitate the management and administration of ZITADEL resources and settings. It serves as a central hub where Administrators can perform tasks related to identity and access management, configure authentication methods, and manage the organization's infrastructure.
While the Management Console is primarily a tool for administrators, it can also be accessed by end-users to manage their own profiles (e.g., password reset, MFA setup), unless you restrict access to build your own custom UI.
Accessing the Management Console
The management console is available by navigating to the Custom Domain of your instance and appending the path /ui/console.
Navigation and Context
When logged in, you are greeted by the home page, which allows you to set shortcuts to frequently used settings and projects.
Context Switcher
ZITADEL is a multi-tenant system. The Management Console features a Context Switcher in the top-left corner. This allows you to switch between the different Organizations you manage.
Depending on your use case:
- B2C: You might stick to your global organization.
- B2B: You will frequently switch between multiple organizations to manage specific customer settings.
To understand how to structure your organizations, read our Solution Scenario guides.
Key Capabilities
The Management Console enables administrators to perform the following critical tasks:
- Default Settings: Administrators can configure global system defaults. This includes authentication methods, security policies (like password complexity or lockout policies), and other system-wide parameters.
- Resource Management: Create, update, and delete essential resources such as Organizations, Projects, and Applications.
- User Management: Manage the lifecycle of User accounts. This includes creating new users, updating profiles, resetting passwords, and deactivating accounts.
- Access Control: Define and manage permissions. Administrators can assign Roles to users and configure fine-grained access controls for specific resources.
- Administrator Assignment: Delegate administrative tasks by assigning Administrator roles (e.g., Org Owner, Project Owner) to specific users, ensuring proper oversight and segregation of duties.
- Customization and Branding: Customize the look and feel of ZITADEL. You can upload custom logos, select color schemes, and apply branding to match your corporate identity.
- Audit Logging: Access Audit Logs to track user activity and setting changes. This is essential for monitoring security events and maintaining regulatory compliance.
Security and Restrictions
Prevent Management Console Access
In many implementations, specifically white-label B2C scenarios, you may want to prevent end-users from accessing the generic ZITADEL Management Console entirely.
Administrators can restrict access to the management console, forcing users to interact only with your own applications or custom user interfaces.
Please follow the Restrict Management Console Access guide to achieve this.
References
Apps Docs Content Guides Manage Console Organizations Overview (`apps/docs/content/guides/manage/console/organizations-overview.mdx`)
title: Organizations sidebar_label: Organizations
Overview
ZITADEL is organized around the idea of multi-tenancy. An Organization is the vessel where your projects and users live. It is comparable to a tenant in a SaaS system or an organizational unit (OU) in a directory-based system.
Key characteristics of Organizations in ZITADEL include:
- Multi-tenancy: Multiple organizations can be managed within one instance.
- Isolation: Users and data from one organization are separated from others.
- Delegation: Organizations can grant each other rights to self-manage certain aspects of the IAM (e.g., roles for access management).
In a B2B use case, an organization typically represents a business partner who requires their own branding, specific access settings, or distinct federated login providers.
Structure and Delegation
Projects within Organizations
You can use Projects within your organization to manage the security context of closely related components, such as roles, grants, and authorizations for multiple applications. You can set up multiple projects within a single organization.
Project Grants
ZITADEL allows you to give other organizations permission to manage certain aspects of a project within your organization.
For example, you could set up a project with roles that define access to your software, but allow a partner organization to allocate those roles to their own users independently. As a service provider, this allows you to establish a self-service culture for your business customers.
Managing Organizations
Create a new organization
To create a new organization, click on the organizations dropdown in the Management Console and select New organization.
You have two options regarding the initial administrator:
- Current User: Create the organization with your currently logged-in user as the organization manager. A membership for the new organization will be added to your account.
- New Account: Directly create a new account to manage the organization.
Self-Service Registration
If you want to enable your customers to create organizations themselves, ZITADEL provides a built-in registration form at:https://$CUSTOM-DOMAIN/ui/login/register/org
The customer simply fills in the organization name and contact details to get started.
Default Organization
On the Default settings page (${CUSTOM_DOMAIN}/ui/console/orgs), you can designate a specific organization as the "Default".
- Click the ... on the right-hand side of the table and select Set as default organization.
- The current default is marked by a "Default" label.
When no specific organization is selected (e.g., during an auth request or via Domain Discovery), users are directed to this default organization for login and self-registration.
Usernames and Domains
Each organization has its own pool of users, covering both users and service accounts. How these users authenticate depends on your domain settings.
Login Name Formats
By default, if the setting User Loginname must contain orgdomain is disabled, usernames are unique across the entire instance.
If you require usernames to be scoped to the organization (common in multi-tenant setups), you can enable User Loginname must contain orgdomain in your Domain settings. Login names will then follow the format:
{username}@{domainname}.{zitadeldomain}
Example:
If a user has the username john.doe in an organization with the domain acme, the generated login name is:[email protected]
Custom Domain Names
You can verify your own domain names (e.g., acme.ch) to simplify the user experience. Once verified:
- ZITADEL generates additional login names for users.
- The user
john.doecan log in via[email protected]OR[email protected].
Organization Domain
An organization can have multiple domain names, but only one is configured as the Organization Domain. The Organization Domain determines:
- Which login name is displayed to the user in the UI.
- What information is asserted in
access_tokens(specifically thepreferred_usernameclaim).
Domain Verification Guide
If the validate Organization Domains setting in Domain Settings is set to true, you must prove ownership of your domain via DNS or HTTP challenge.
Navigate to your Organization Settings.
Select the menu entry Organization Domains.
Click on the domain name you wish to verify. A dialog will appear offering DNS or HTTP challenge methods.
DNS Challenge Example: Create a TXT record with your DNS provider using the value provided by ZITADEL.
Once verified, click Verify.
(Optional) Click Set as primary to make this the default domain for user login names.
Organization Settings
Organizations can inherit settings from the instance defaults or override them with specific policies. Settings configured at the Organization level take priority over Default settings.
- Login Behavior and Security: MFA options, passwordless authentication rules, and session lifetimes.
- Identity Providers: Configure IDPs available specifically for this organization.
- Password Complexity: Specific requirements for passwords (length, symbols, etc.).
- Lockout: Max login attempts before an account is locked.
- Branding: Custom appearance for the login interface.
- Message Texts: Custom text and internationalization for emails.
- Login Interface Texts: Custom text for the login UI.
- External Links: Links to your specific Terms of Service, Privacy Policy, and Support.
Applying Custom Branding
To apply a custom design (e.g., for a specific B2B customer):
- Navigate to the Organization settings.
- Configure the Branding section.
- Ensure the Login Behavior on your Project is configured to allow organization-specific branding. Read more about project branding here.
Triggering Organization Context
When a user begins the login process, ZITADEL automatically determines the user's organization based on their entered login name and redirects them to the appropriate organization context. Users cannot select their organization manually.
By default, the ZITADEL Login uses the instance default settings. To trigger the specific settings (and branding) of an organization, you must provide the organization scope in your authentication request:
urn:zitadel:iam:org:id:{id}This value is a reserved scope within ZITADEL.
Apps Docs Content Guides Manage Console Projects Overview (`apps/docs/content/guides/manage/console/projects-overview.mdx`)
title: "ZITADEL Projects: Manage Apps, Services & Roles" sidebar_label: Projects sidebar_position: 4
import ProjectDescription from "../../../concepts/structure/_project_description.mdx";
What is a project?
A Project is the vessel that holds your Applications and Roles. It defines the security context for a specific software solution.
Example Scenario
Imagine you are building a Point of Sales (POS) platform. In ZITADEL, you would create one Project (e.g., named POS).
- Applications: Your web portal for administration, your iOS app, and your Android app would all be defined as Applications within this single Project.
- Roles: You would create Roles (e.g.,
admin,cashier,viewer) inside this Project. - Role assignment: All applications in this project share these roles, allowing you to create unified role assignments for your users across all platforms.
Core Components
Applications
Applications define the different clients (web apps, native mobile apps, server-side APIs) that share the same roles and security context.
At the moment, we support OIDC and almost every OAuth2 client. We'll be expanding this with SAML shortly.
Go to Applications for more details.
Roles
A role consists of different attributes, but only the Key is relevant to the role assignment and must be unique within the project.
- Key: The identifier used in code (e.g.,
role.admin). - Display Name: A human-readable name for the UI.
- Group: Enables better handling in the ZITADEL Management Console (e.g., giving a user all roles of a specific group).
Read more about managing roles here.
The Default Project
When creating a new ZITADEL instance, you will find an automatically created project in the first organization.
This Default Project (named "ZITADEL") protects the ZITADEL Management Console and APIs.
Create a Project
To create a project:
Navigate to your Organization in the Console.
Go to Projects (or visit
https://${CUSTOM_DOMAIN}.zitadel.cloud/ui/console/projects).Click the Create New Project button.
Enter your project name and continue.
Granted Projects (B2B)
A powerful feature of ZITADEL is the ability to Grant a project to other organizations. This is essential for B2B scenarios where you sell your software to business partners.
- The Concept: You enable another organization to use your Project.
- Delegation: The granted organization can manage the role assignments of their own users for your project. They can assign the roles you defined to their employees without your intervention.
- Isolation: You can select specifically which roles are available to the granted organization. This allows you to restrict features (e.g., "Premium" roles) per customer.
Using the POS example above: You could grant the POS project to a partner organization. That partner can then log in with their own domain, use their own branding, and manage their own cashier users, all while using your underlying application structure.
How to Grant a Project
Navigate to the Project you want to share (e.g.,
POS).In the Project Grants section, click New.
Enter the Domain of the partner organization you want to grant access to.
- Tip: If you don't know the domain, navigate to the Organization detail page to find it.
Search and select the organization.
Select the Roles you want to grant to this organization and click Save.
Project Settings
You can customize the behavior of your project, particularly regarding how login screens look and how tokens are issued.
Branding
If you have different designs for your organizations (Private Labeling), you can define the login behavior on the project detail page.
| Setting | Description |
|---|---|
| Unspecified | If nothing is specified, the system default settings will trigger. |
| Enforce project's policy | This forces the branding of the organization that owns the project throughout the entire login process. Useful if you want your users to always see your brand, even if they belong to a partner org. |
| Allow login user policy | The login starts with the project's branding. However, as soon as the user is identified (e.g., by entering their email), the branding switches to match the user's organization. |
In a B2B use case, you would typically use Allow login user policy. If you want to skip the detection step, you can preselect an organization using the Organization Domain scope (e.g., urn:zitadel:iam:org:domain:primary:{domainname}).
Role Settings
You can configure strict security checks regarding roles during authentication.
- Assert Roles on Authentication: Role information is sent from the Userinfo endpoint (and in tokens, depending on app settings).
- Check Role Assignment on Authentication: Users are only allowed to log in if they have at least one role assigned for this project. If they have no roles, access is denied immediately.
- Check for Project on Authentication: Checks if the user's organization actually has a grant for this project. If not, the user cannot be authenticated.
Roles in Tokens
If you want roles to appear directly inside your Access or ID Tokens (to avoid calling the Userinfo endpoint), you must enable this per application.
- Navigate to your Application.
- Open Token Settings.
- Check Assert Roles on Authentication.
You can learn more about Application and Token settings here.
Apps Docs Content Guides Manage Console Users Overview (`apps/docs/content/guides/manage/console/users-overview.mdx`)
title: Users sidebar_label: Users sidebar_position: 3
import CreateUser from './_create-user.mdx';
Overview
ZITADEL supports authentication and authorization for different user types. We mainly differentiate between users (interactive) and Service Accounts (machine-to-machine).
Types of Users
Users (Human)
Users represent actual people who log in via an interactive interface (e.g., a login page).
- Profile: Has an email address, password, and optional profile data (phone, nickname, gender, language).
- Authentication: Can authenticate via password, multiple factors (MFA), or passwordless authentication (Passkeys).
- Flow: The application redirects the user to ZITADEL, which handles the credentials and issues a token to the application.
Read more on how to login users with ZITADEL.
Service Accounts
<TerminologyUpdate
newTerm="Service Accounts"
oldTerms={["Service User", "Machine Users", "Technical Account"]}
/>
Service accounts represent machines, backend services, or IoT devices requiring non-interactive access.
- Profile: Only has a name, description, and username.
- Authentication: Authenticates via JWT Profile or Personal Access Tokens (PAT). Both methods support expiration settings.
- Usage: Primarily used to gain access to the ZITADEL Management API or to secure backend-to-backend communication.
To see how service accounts are utilized in practice, check out our NextJS B2B Demo application.
Federated Users
Federated users are identities managed by a third-party Identity Provider (IdP) such as Google, Azure AD, or GitHub.
- Identity Brokering: Users log in via the external IdP ("Single Sign-On").
- Account Linking: Federated identities are linked to internal ZITADEL users to facilitate role assignment and audit trails.
External Users
In a multi-tenancy architecture, users are typically isolated within Organizations.
However, using External User Grants, an organization can invite users from another organization to access their projects. These invited users are referred to as External Users within the context of the inviting organization.
Administrators
Any userβwhether User or Service Accountβcan be assigned an Administrator Role.
A user with an administrator role is not just an end-user of your application but also has permissions to manage specific aspects of the ZITADEL instance, organization, or project (e.g., ORG_OWNER, PROJECT_OWNER).
Considerations
Uniqueness of Users
- Scope: Users exist strictly within one Organization. It is currently not possible to move users between organizations.
- Identifier: User accounts are uniquely identified by their
idor theirloginnamecombined with theOrganization Domain(e.g.,[email protected]). - Emails: You can reuse the same email address for different user accounts across organizations.
Structuring User Pools
How you organize users depends on your scenario:
- B2B / Multi-Tenancy: We recommend creating separate organizations for each business customer (e.g., based on their domain). Grant your projects to these organizations so they can manage their own users.
- B2C / CIAM: You might want to store all users in a single organization and enable a specific set of social logins for that organization.
Hierarchy
ZITADEL does not enforce a native hierarchy or inheritance for users or organizations. We recommend structuring users along the smallest unit of groups (Organizations). You can use organization metadata or your own business logic to map complex hierarchies if needed.
Managing Users
Create User
Metadata
ZITADEL provides a key-value storage system for users, which is essential for building complex applications.
Example Use Case:
In a Point of Sales application, you could add a stripeCustomerId as a metadata key to a user. Your client application can then read this metadata to fetch payment details directly from the Stripe API.
Accessing Metadata:
Metadata can be requested via the Auth and Management APIs, the Userinfo endpoint, or asserted directly into the ID Token.
- Userinfo Endpoint: Add the scope
urn:zitadel:iam:user:metadatato your authentication request. - ID Token: To include metadata in the token, navigate to your Application Settings and toggle User Info inside ID Token.
Role Assignments
The roles assigned to a user are displayed on user profile pages.
To access these roles in your application:
- Userinfo Endpoint: Check the Assert roles on authentication box in your Project Settings.
- ID Token: Toggle User roles inside ID Token in your Application Settings.
References
Apps Docs Content Guides Solution Scenarios Introduction Index (`apps/docs/content/guides/solution-scenarios/introduction/index.mdx`)
title: "Use Cases"
{/* THIS FILE IS AUTO-GENERATED FROM SIDEBAR-DATA.
ANY MANUAL CHANGES WILL BE OVERWRITTEN.
*/}
import { Card, Cards } from 'fumadocs-ui/components/card';
import { FileText, Folder, Link as LinkIcon } from 'lucide-react';
Apps Docs Content Self Hosting Deploy Kubernetes Index (`apps/docs/content/self-hosting/deploy/kubernetes/index.mdx`)
title: Deploy ZITADEL on Kubernetes sidebar_label: Overview
This guide takes you from zero to a running ZITADEL instance on Kubernetes and then shows you how to harden it for production.
Stage 1 β Quickstart
The ZITADEL chart ships with an optional PostgreSQL subchart so a single helm install deploys the database alongside ZITADEL. You still need a routing controller running in your cluster to expose the service.
Prerequisites
- A Kubernetes cluster (1.30+)
- An Ingress controller (e.g., Traefik, NGINX) OR a Gateway API controller
- kubectl
- Helm 3.x or 4.x
Install the full stack
mkdir zitadel-helm && cd zitadel-helm &&
curl -fsSLO https://raw.githubusercontent.com/zitadel/zitadel-charts/main/examples/0-quickstart/quickstart-values.yamlEdit quickstart-values.yaml before installing. For a local k3d or k3s cluster, these standard Ingress values usually work as-is:
zitadel:
configmapConfig:
ExternalDomain: localhost
ExternalPort: 80
ingress:
className: traefik
login:
ingress:
className: traefikIf you are using a different ingress controller, replace both className values with that controller's IngressClass name.
helm repo add zitadel https://charts.zitadel.com &&
helm repo update &&
helm upgrade --install zitadel zitadel/zitadel --values quickstart-values.yaml --waitThat's it. Visit http://localhost/ui/[email protected] and log in with password Password1!.
Swap out components
The bundled PostgreSQL subchart is for quickstart use only. You can replace it independently:
| Component | How to replace |
|---|---|
| Database | Set postgresql.enabled: false and configure ZITADEL_DATABASE_POSTGRES_DSN pointing to your own PostgreSQL. Use the postgres maintenance database so ZITADEL can create its own database during initialization. |
| Routing / Ingress | Update ingress.className to match your controller, or disable the Helm ingress (ingress.enabled: false) to manage your own Gateway API HTTPRoute resources. |
| Caching | Add Redis by configuring zitadel.configmapConfig.Caches (see Caching). |
Stage 2 β Production Cluster
For production you need:
- A Kubernetes cluster (1.30+)
- A routing solution: Ingress controller (Traefik, NGINX) or a Gateway API implementation
- A domain with DNS configured
- TLS certificates (via cert-manager, ACME, or manually)
- PostgreSQL 14+ (managed service or in-cluster)
- Helm 3.x+
Create secrets
# Masterkey β generate once, store safely, cannot be changed after first run
kubectl create secret generic zitadel-masterkey \
--from-literal=masterkey="$(tr -dc A-Za-z0-9 </dev/urandom | head -c 32)"
# Database credentials β store the full DSN
kubectl create secret generic zitadel-db-credentials \
--from-literal=dsn="postgresql://zitadel:[email protected]:5432/postgres?sslmode=verify-full"Configure values
Save the base configuration below as values.yaml. Replace zitadel.example.com with your domain:
replicaCount: 2
zitadel:
masterkeySecretName: zitadel-masterkey
env:
- name: ZITADEL_DATABASE_POSTGRES_DSN
valueFrom:
secretKeyRef:
name: zitadel-db-credentials
key: dsn
configmapConfig:
ExternalDomain: "zitadel.example.com"
ExternalSecure: true
ExternalPort: 443
TLS:
Enabled: false
FirstInstance:
Org:
Human:
UserName: "admin"
Email: "[email protected]"
Password: "YourSecurePassword123!"
PasswordChangeRequired: true
podDisruptionBudget:
enabled: true
minAvailable: 1Exposing ZITADEL (Choose your routing method)
ZITADEL can be exposed using standard Kubernetes Ingress or the newer Gateway API. Choose the method that matches your cluster's architecture.
Option A: Using Standard Ingress (e.g., Traefik)
Append the following routing block to your values.yaml to have Helm automatically generate standard Ingress objects:
ingress:
enabled: true
className: traefik
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
traefik.ingress.kubernetes.io/router.tls.certresolver: letsencrypt
hosts:
- host: zitadel.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: zitadel-tls
hosts:
- zitadel.example.com
login:
ingress:
enabled: true
className: traefik
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
traefik.ingress.kubernetes.io/router.tls.certresolver: letsencrypt
hosts:
- host: zitadel.example.com
paths:
- path: /ui/v2/login
pathType: Prefix
tls:
- secretName: zitadel-tls
hosts:
- zitadel.example.comOption B: Using Gateway API
If your cluster utilizes the Kubernetes Gateway API, disable the Helm chart's built-in ingress generation by ensuring both ingress.enabled: false and login.ingress.enabled: false are set (which is the default).
After deploying the Helm chart, apply an HTTPRoute resource to route traffic to the ZITADEL services via your Gateway:
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: zitadel-route
namespace: zitadel
spec:
parentRefs:
- name: your-cluster-gateway
namespace: gateway-system
hostnames:
- "zitadel.example.com"
rules:
- matches:
- path:
type: PathPrefix
value: /ui/v2/login
backendRefs:
- name: zitadel-login
port: 8080
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: zitadel
port: 8080(Note: Ensure your Gateway controller supports h2c/HTTP2 backend connections).
Install
helm repo add zitadel https://charts.zitadel.com && helm repo update
helm install zitadel zitadel/zitadel --values values.yaml --waitVerify
Watch the pods come up:
kubectl get pods --watchYou should see the zitadel-init and zitadel-setup jobs complete, followed by the zitadel deployment pods becoming Ready.
Check the Helm release status:
helm status zitadelAccess the console at https://zitadel.example.com/ui/console.
What's next
Review the Production Checklist before going live, then use the detailed guides for each concern:
| Guide | Description |
|---|---|
| Configuration | All configmap and secret options, autoscaling, security contexts |
| Routing | Ingress, Gateway API, and cloud-native setup |
| Database | PostgreSQL TLS modes, credentials, and connection pooling |
| Operations | Upgrades, manual and automatic scaling, resource limits |
| Caching | Redis/Valkey caching configuration |
| Observability | Traces (OTLP), Prometheus metrics, and log collection |
| Uninstalling | Remove ZITADEL from your cluster |
Apps Docs Content Self Hosting Manage Cli Overview (`apps/docs/content/self-hosting/manage/cli/overview.mdx`)
title: ZITADEL Command Line Interface sidebar_label: Overview
This documentation serves as your guide to interacting with Zitadel through the command line interface (CLI). The Zitadel CLI empowers you to manage various aspects of your Zitadel system efficiently from your terminal.
This introductory section provides a brief overview of what the Zitadel CLI offers and who can benefit from using it.
Let's dive in!
Download the CLI
Download the CLI for Linux or MacOS.
Quick start
The easiest way to start ZITADEL is by following the docker compose example which executes the commands for you.
Initialize the database
The zitadel init-command sets up the zitadel database. The statements executed need a user with ADMIN-privilege. See init phase for more information.
Setup ZITADEL
The zitadel setup-command further sets up the database created using zitadel init. This command only requires the user created in the previous step. See setup phase for more information.
Start ZITADEL
The zitadel start-command runs the ZITADEL server. See runtime phase for more information.
The zitadel start-from-setup-command first executes the setup phase and afterwards runs the ZITADEL server.
The zitadel start-from-init-command first executes the init phase, afterwards the setup phase and lastly runs the ZITADEL server.
Apps Docs Content Self Hosting Manage Configure Index (`apps/docs/content/self-hosting/manage/configure/index.mdx`)
title: Configure ZITADEL
Detailed configuration options for ZITADEL.
Apps Docs Content Self Hosting Manage Database Index (`apps/docs/content/self-hosting/manage/database/index.mdx`)
title: Database
Database Configuration
The command is zitadel init schema (alias: zitadel init zitadel for backwards compatibility).
ZITADEL with Postgres
PostgreSQL is the default database for ZITADEL due to its reliability, robustness, and adherence to SQL standards. It is well-suited for handling the complex data requirements of an identity management system.
If you are using Zitadel v2 and want to use a PostgreSQL database, you can overwrite the default configuration.
Currently, versions 14 to 18 are supported.
Connect ZITADEL to your PostgreSQL database by providing a DSN (connection URL) via the environment variable:
export ZITADEL_DATABASE_POSTGRES_DSN=postgresql://zitadel:password@localhost:5432/zitadel?sslmode=disableIf you prefer configuration files, set the DSN in your YAML config:
Database:
postgres:
DSN: postgresql://zitadel:password@localhost:5432/zitadel?sslmode=disable
MaxOpenConns: 15
MaxIdleConns: 10
MaxConnLifetime: 1h
MaxConnIdleTime: 5mPool and tuning settings can be configured alongside the DSN as overlays.
SSL is configured through DSN query parameters. For example, to require TLS with certificate verification:
postgresql://zitadel:[email protected]:5432/zitadel?sslmode=verify-full&sslrootcert=/path/to/ca.crtManaged PostgreSQL / No Admin Access
If you don't have a PostgreSQL superuser available (e.g. managed services like RDS, Cloud SQL, or Azure Database),
you can pre-provision the user and database yourself and skip the admin-credential requirement.
The init command performs two steps that require different privileges:
- Provisioning step β
CREATE ROLE,CREATE DATABASE,GRANTβ requires a superuser/admin. - Schema bootstrapping step β creates schemas (
eventstore,projections,system) and tables β requires only database owner privileges.
If you handle the provisioning step manually, you still must run the schema bootstrapping step. Use the dedicated sub-command zitadel init schema, which performs only schema bootstrapping using the service user credentials β no admin privileges needed.
Provisioning step β Provision user and database (run as superuser)
CREATE ROLE zitadel LOGIN PASSWORD '<strong-password>';
CREATE DATABASE zitadel WITH OWNER zitadel;
-- The GRANT below is redundant when zitadel is the database owner,
-- but is included for clarity. Owners implicitly hold all privileges.
GRANT CONNECT, CREATE ON DATABASE zitadel TO zitadel;Adjust pg_hba.conf if needed to allow the zitadel user to connect.
Schema bootstrapping step β Bootstrap schemas and tables (run as the service user)
Provide the DSN with the service user credentials. For managed/remote PostgreSQL, set sslmode to require or verify-full to encrypt the connection. disable is only appropriate for local development.
ZITADEL_DATABASE_POSTGRES_DSN=postgresql://zitadel:<strong-password>@<your-host>:5432/zitadel?sslmode=require \
zitadel init schemaRun setup and start
ZITADEL_DATABASE_POSTGRES_DSN=postgresql://zitadel:<strong-password>@<your-host>:5432/zitadel?sslmode=require \
zitadel start-from-setup --masterkey "<32-character-key>"See the phases guide for details on separating init, setup, and runtime for production deployments.
Zitadel Credentials
The init phase of ZITADEL creates the ZITADEL database user if it does not exist and admin credentials are provided. Init does not update or deprecate existing users or passwords. If you need to change the ZITADEL database user or rotate its password, you must do this manually.
Rotating Database Credentials
If you must rotate the credentials:
- You can change the password for the existing ZITADEL user, but you must manually update the password wherever ZITADEL needs it.
- Creating a new database user requires manual reassignment of ownership and privileges for all required database objects (schemas, tables, etc.) to the new user.
- After migration, remove or deprecate the old user using admin access and commands appropriate for your database provider.
Attempting to run init a second time with new credentials will fail if the user already exists, and will not change existing permissions or migrate data.
Apps Docs Content Self Hosting Manage Metrics Overview (`apps/docs/content/self-hosting/manage/metrics/overview.mdx`)
title: Metrics
Metrics
ZITADEL exposes operational and performance metrics to support monitoring, alerting, and capacity planning.
Metrics are enabled by default in standard deployments and are exposed via an HTTP endpoint that can be consumed by Prometheus and other monitoring systems that understand the Prometheus exposition format or use an OpenTelemetry pipeline.
Metrics endpoint
ZITADEL exposes metrics at the following endpoint:/debug/metrics
This endpoint returns a snapshot of the current metrics in Prometheus-compatible exposition format.
If you changed ports, paths, or network exposure as part of your deployment (for example via Helm values, reverse proxies, or ingress), adjust the endpoint accordingly.
Instrumentation model
Internally, ZITADEL instruments metrics using OpenTelemetry (OTel).
The exposed metrics include:
Process and runtime metrics
(for example Go runtime, memory usage, goroutines)HTTP and gRPC server metrics
(request counts, latencies, error rates)ZITADEL-specific metrics
(server behavior and internal components available in your version)
The exact set of metrics and labels may evolve between ZITADEL releases.
Collection and compatibility
The /debug/metrics endpoint can be consumed in multiple ways:
- Prometheus can scrape the endpoint directly.
- OpenTelemetry Collector can scrape the endpoint using a Prometheus receiver and forward metrics to other backends.
- Managed monitoring platforms (for example Grafana Cloud, Amazon Managed Service for Prometheus, Datadog, New Relic) can ingest the same endpoint via Prometheus-compatible agents or collectors.
ZITADEL does not require a specific metrics backend. Any system capable of scraping or ingesting Prometheus-format metrics can be used.
Settings
Metrics are enabled by default in standard ZITADEL deployments.
If metrics were explicitly disabled in your configuration, re-enable them before proceeding. The default configuration is defined in the project's defaults.yaml file:
Refer to the configuration documentation for details on enabling or adjusting metrics behavior.
Next steps
Choose how you want to collect and store metrics:
- Prometheus β scrape metrics directly from ZITADEL
- OpenTelemetry Collector β aggregate and forward metrics to another backend
- Managed observability platforms β use their Prometheus-compatible agents
The following sections describe concrete setups, starting with Prometheus.
Apps Docs Content Self Hosting Manage Reverseproxy Proxy Guide Overview (`apps/docs/content/self-hosting/manage/reverseproxy/_proxy_guide_overview.mdx`)
import BaseDockerCompose from './docker-compose.yaml';
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock';
<>With these examples, you create and run a minimal {props.link} configuration for Zitadel with Docker Compose.
Whereas the guide focuses on the configuration for {props.name}, you can inspect the settings for the Zitadel API, the Zitadel login and the database in the base Docker Compose file.</>
base docker-compose.yaml
<DynamicCodeBlock lang="yaml" code={BaseDockerCompose} /><>For running {props.name}, you will extend the base Docker Compose file with the {props.name} specific Docker Compose file.</>
specific docker-compose.yaml
<DynamicCodeBlock lang="yaml" code={props.compose} />Apps Docs Content Apis Benchmarks V2.65.0 Machine Jwt Profile Grant Index (`apps/docs/content/apis/benchmarks/v2.65.0/machine_jwt_profile_grant/index.mdx`)
title: machine jwt profile grant benchmark of zitadel v2.65.0 sidebar_label: machine jwt profile grant
import OutputSource from "./output.json";
import { BenchmarkChart } from '@/components/benchmark_chart';
Tests are halted after this test run because of too many client read events on the database.
Performance test results
| Metric | Value |
|---|---|
| Baseline | none |
| Test start | 22-10-2024 16:20 UTC |
| Test duration | 30min |
| Executed test | machine_jwt_profile_grant |
| k6 version | v0.54.0 |
| VUs | 50 |
| Client location | US1 |
| Client machine specification | e2-high-cpu-4 |
| Zitadel location | US1 |
| Zitadel container specification | vCPUs: 2Memory: 512 MiBContainer count: 2 |
| Zitadel feature flags | none |
| Database | postgres v15 |
| Database location | US1 |
| Database specification | vCPUs: 4Memory: 16 GiB |
| Zitadel metrics during test | |
| Observed errors | Many client read events during push |
| Top 3 most expensive database queries | 1: Query events instance_id = $1 AND aggregate_type = $2 AND aggregate_id = $3 AND event_type = ANY($4)2: latest sequence query during push events3: writing events during push (caused lock wait events) |
| k6 iterations per second | 193 |
| k6 overview | output |
| flowchart outcome | Halt tests, must resolve an issue |
/token endpoint latencies
k6 output
/* Detailed source-code truncated for AI context efficiency. */Apps Docs Content Apis Benchmarks V2.66.0 Machine Jwt Profile Grant Index (`apps/docs/content/apis/benchmarks/v2.66.0/machine_jwt_profile_grant/index.mdx`)
title: machine jwt profile grant benchmark of zitadel v2.66.0 sidebar_label: machine jwt profile grant
import OutputSource from "./output.json";
import { BenchmarkChart } from '@/components/benchmark_chart';
The tests showed heavy database load by time by the first two database queries. These queries need to be analyzed further.
Performance test results
| Metric | Value |
|---|---|
| Baseline | none |
| Purpose | Test current performance |
| Test start | 15:39 UTC |
| Test duration | 30min |
| Executed test | machine_jwt_profile_grant |
| k6 version | v0.54.0 |
| VUs | 150 |
| Client location | US1 |
| ZITADEL location | US1 |
| ZITADEL container specification | vCPU: 2 Memory: 512 Mib Container count: 5 |
| ZITADEL Version | v2.66.0 |
| ZITADEL feature flags | webKey: true, improvedPerformance: ["IMPROVED_PERFORMANCE_ORG_BY_ID", "IMPROVED_PERFORMANCE_PROJECT", "IMPROVED_PERFORMANCE_USER_GRANT", "IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED", "IMPROVED_PERFORMANCE_PROJECT_GRANT"] |
| Database | type: psqlversion: v15.8 |
| Database location | US1 |
| Database specification | vCPU: 8 memory: 32Gib |
| ZITADEL metrics during test | |
| Observed errors | |
| Top 3 most expensive database queries | 1: Write events using the newly added eventstore.push function2: Query events by instance_id, aggregate_type, aggregate_id, event_types3: Query user |
| k6 Iterations per second | 439 |
| k6 output | output |
| flowchart outcome | Scale out |
Endpoint latencies
k6 output
/* Detailed source-code truncated for AI context efficiency. */Apps Docs Content Apis Benchmarks V2.70.0 Machine Jwt Profile Grant Index (`apps/docs/content/apis/benchmarks/v2.70.0/machine_jwt_profile_grant/index.mdx`)
title: machine jwt profile grant benchmark of zitadel v2.70.0 sidebar_label: machine jwt profile grant
import OutputSource from "./output.json";
import { BenchmarkChart } from '@/components/benchmark_chart';
The performance goals of this issue are reached. Next we will test linear scalability.
Performance test results
| Metric | Value |
|---|---|
| Baseline | none |
| Purpose | Test current performance |
| Test start | 09:48 UTC |
| Test duration | 30min |
| Executed test | machine_jwt_profile_grant |
| k6 version | v0.57.0 |
| VUs | 600 |
| Client location | US1 |
| ZITADEL location | US1 |
| ZITADEL container specification | vCPU: 6 Memory: 6 Gi Container min scale: 2Container max scale: 7 |
| ZITADEL Version | v2.70.0 |
| ZITADEL feature flags | webKey: true, improvedPerformance: ["IMPROVED_PERFORMANCE_ORG_BY_ID", "IMPROVED_PERFORMANCE_PROJECT", "IMPROVED_PERFORMANCE_USER_GRANT", "IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED", "IMPROVED_PERFORMANCE_PROJECT_GRANT"] |
| Database | type: psqlversion: v17.2 |
| Database location | US1 |
| Database specification | vCPU: 8 memory: 32Gib |
| ZITADEL metrics during test | |
| Observed errors | |
| Top 3 most expensive database queries | 1: Write events using eventstore.push function2: Query user3: Query events by instance id, aggregate type, aggregate id, event types, owner |
| k6 Iterations per second | 1806 |
| k6 output | output |
| flowchart outcome | Scale out |
Endpoint latencies
k6 output
/* Detailed source-code truncated for AI context efficiency. */Apps Docs Content Apis Benchmarks V2.70.0 Oidc Session Index (`apps/docs/content/apis/benchmarks/v2.70.0/oidc_session/index.mdx`)
title: oidc session benchmark of Zitadel v2.70.0 sidebar_label: oidc session
import OutputSource from "./output.json";
import { BenchmarkChart } from '@/components/benchmark_chart';
The test implements Support for (OIDC) Standard in a Custom Login UI flow.
The tests showed that querying the user takes too much time because Zitadel ensures the projection is up to date. This performance bottleneck must be resolved.
Performance test results
| Metric | Value |
|---|---|
| Baseline | none |
| Purpose | Test current performance |
| Test start | 14:24 UTC |
| Test duration | 30min |
| Executed test | oidc_session |
| k6 version | v0.57.0 |
| VUs | 600 |
| Client location | US1 |
| ZITADEL location | US1 |
| ZITADEL container specification | vCPU: 6 Memory: 6 Gi Container min scale: 2Container max scale: 7 |
| ZITADEL Version | v2.70.0 |
| ZITADEL feature flags | webKey: true, improvedPerformance: ["IMPROVED_PERFORMANCE_ORG_BY_ID", "IMPROVED_PERFORMANCE_PROJECT", "IMPROVED_PERFORMANCE_USER_GRANT", "IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED", "IMPROVED_PERFORMANCE_PROJECT_GRANT"] |
| Database | type: psqlversion: v17.2 |
| Database location | US1 |
| Database specification | vCPU: 8 memory: 32Gib |
| ZITADEL metrics during test | |
| Observed errors | |
| Top 3 most expensive database queries | 1: lock current_states table2: write events3: get events for projection |
| k6 Iterations per second | 153 |
| k6 output | output |
| flowchart outcome | Resolve locking issue |
Endpoint latencies
k6 output
/* Detailed source-code truncated for AI context efficiency. */Apps Docs Content Apis Benchmarks V4.17.1 Add Session Index (`apps/docs/content/apis/benchmarks/v4.17.1/add_session/index.mdx`)
title: add session benchmark of zitadel v4.17.1 sidebar_label: add session
import OutputSource from "./output.json";
import { BenchmarkChart } from "@/components/benchmark_chart";
Benchmark results of the v4.17.1 release of Zitadel.
Performance test results
| Metric | Value |
|---|---|
| Baseline | none |
| Purpose | Test current performance |
| Test start | 2026-08-27 14:58:50 UTC |
| Test end | 2026-08-27 15:28:51 UTC |
| Test duration | 30min |
| Executed test | add_session |
| k6 version | v2.1.0 |
| VUs | 600 |
| Client location | US1 |
| ZITADEL location | US1 |
| ZITADEL container specification | vCPU: 6 Memory: 6 Gi Container min scale: 7Container max scale: 7 |
| ZITADEL Version | v4.17.1 |
| ZITADEL Settings | Eventstore autovacuum (new in v4.17): Enabled: trueVacuumThreshold: 1000000AnalyzeThreshold: 1000000Tuned for the ~4,000 events/s expected during the benchmark, per the tuning guide. |
| ZITADEL feature flags | Enabled: loginDefaultOrg (instance), oidcTokenExchange (system), enableBackChannelLogout (system), consoleUseV2UserApi (instance)improvedPerformance (instance): IMPROVED_PERFORMANCE_PROJECT_GRANT, IMPROVED_PERFORMANCE_PROJECT, IMPROVED_PERFORMANCE_USER_GRANT, IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIEDDisabled: loginV2 (explicitly false at instance), userSchema, debugOidcParentError, oidcSingleV1SessionTermination, permissionCheckV2Captured from the instance before the run (sequence 7, set 2026-08-27 13:35:31 UTC); the same capture covers manipulate_user at 13:41 and the rest of the sweep from 14:56, so all eleven targets ran the same configuration.This restores like-for-like comparison with the v4 pages, which ran five improvedPerformance options. The fifth, IMPROVED_PERFORMANCE_ORG_BY_ID, is reserved in the proto and no longer exists. |
| Database | type: psqlversion: v17.4 |
| Database location | US1 |
| Database specification | vCPU: 8 memory: 32Gib |
| ZITADEL metrics during test | CPU: p50 18%, p99 26% (peak 28%)Memory: p50 6%, peak 12%Instances: 7 (constant), no container startups recordedServer-side: 790 req/s, latency p50 80ms / p95 3.5s / p99 3.9s |
| Observed errors | 1 of 1,416,546 requests failed (0.00%): none of the 1 individually logged (see k6 output). 1 of 2,831,284 checks failed (0.00%): add Session status ok (1 failed) |
| Top 3 most expensive database queries | 1: Push events (eventstore.push) (5,059 s)2: Query events by instance_id, aggregate_types, event_types, position (paged) (3,497 s)3: Shared advisory lock on events2, taken by every push β lock wait (585 s)Ranked by total accumulated execution time summed across concurrent sessions (Cloud SQL Query Insights) β not CPU time; it can exceed the wall-clock window. |
| Database metrics during test | CPU: 97% median, 98% peakMemory: 40%Connections: 46Transactions: 9,895/sIOPS: read 0, write 787CPU-saturated β the bottleneck for this target. |
| k6 Iterations per second | 767 |
| k6 output | output |
| flowchart outcome | Scale. Database CPU is the limit: 97% median against ZITADEL at 18%, with advisory lock wait only 6% of the top-5 query time. Raising the database beyond 8 vCPU is the next step, and throughput should be re-measured against the increase. |
Endpoint latencies
k6 output
/* Detailed source-code truncated for AI context efficiency. */Apps Docs Content Apis Benchmarks V4.17.1 Human Password Login Index (`apps/docs/content/apis/benchmarks/v4.17.1/human_password_login/index.mdx`)
title: human password login benchmark of zitadel v4.17.1 sidebar_label: human password login
import OutputSource from "./output.json";
import { BenchmarkChart } from "@/components/benchmark_chart";
Benchmark results of the v4.17.1 release of Zitadel.
Performance test results
| Metric | Value |
|---|---|
| Baseline | none |
| Purpose | Test current performance |
| Test start | 2026-08-27 19:24:36 UTC |
| Test end | 2026-08-27 19:54:52 UTC |
| Test duration | 30min |
| Executed test | human_password_login |
| k6 version | v2.1.0 |
| VUs | 600 |
| Client location | US1 |
| ZITADEL location | US1 |
| ZITADEL container specification | vCPU: 6 Memory: 6 Gi Container min scale: 7Container max scale: 7 |
| ZITADEL Version | v4.17.1 |
| ZITADEL Settings | Eventstore autovacuum (new in v4.17): Enabled: trueVacuumThreshold: 1000000AnalyzeThreshold: 1000000Tuned for the ~4,000 events/s expected during the benchmark, per the tuning guide. |
| ZITADEL feature flags | Enabled: loginDefaultOrg (instance), oidcTokenExchange (system), enableBackChannelLogout (system), consoleUseV2UserApi (instance)improvedPerformance (instance): IMPROVED_PERFORMANCE_PROJECT_GRANT, IMPROVED_PERFORMANCE_PROJECT, IMPROVED_PERFORMANCE_USER_GRANT, IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIEDDisabled: loginV2 (explicitly false at instance), userSchema, debugOidcParentError, oidcSingleV1SessionTermination, permissionCheckV2Captured from the instance before the run (sequence 7, set 2026-08-27 13:35:31 UTC); the same capture covers manipulate_user at 13:41 and the rest of the sweep from 14:56, so all eleven targets ran the same configuration.This restores like-for-like comparison with the v4 pages, which ran five improvedPerformance options. The fifth, IMPROVED_PERFORMANCE_ORG_BY_ID, is reserved in the proto and no longer exists. |
| Database | type: psqlversion: v17.4 |
| Database location | US1 |
| Database specification | vCPU: 8 memory: 32Gib |
| ZITADEL metrics during test | CPU: p50 48%, p99 60% (peak 64%)Memory: p50 6%, peak 16%Instances: 7 (constant), no container startups recordedServer-side: 338 req/s, latency p50 207ms / p95 4.9s / p99 32.9s |
| Observed errors | 9,227 of 683,256 requests failed (1.35%). Corrected by hand from the generated row, which reported these as one population; the status breakdown shows two with different causes and different shapes. (1) 8,178 request timeouts (1.20%), sustained across the whole run β not a burst: they run from 19:26 to 19:54 at a steady 125β360 per minute, with no onset and no recovery. This is ZITADEL under 600 VUs on this target and is the number to read. (2) 1,044 HTTP 503 platform errors, confined to 19:37β19:44 β Service error -27, an HTML page from the Google frontend rather than a ZITADEL JSON error, in the same bounded-burst shape seen on manipulate_user at 13:43 the same day and pending the same GCP post-mortem (see benchmark/postmortems/2026-08-27-503-burst.md). Plus 4x HTTP 502 and 1x connection reset, scattered singles. 9,093 of 1,007,953 checks failed (0.90%): login name status ok (8,345), authorize status ok (333), token status ok (138), password status ok (137), userinfo status ok (119), password callback (21). The failed checks track the timeouts rather than the 503 burst. |
| Top 3 most expensive database queries | 1: Projection handler advisory lock, one per projection per instance β lock wait, not query work (17,902 s)2: Eventstore read barrier: advisory lock + unlock on events2 β lock wait (8,920 s)3: Query events by instance_id, aggregate_types, event_types, position (paged) (3,810 s)Ranked by total accumulated execution time summed across concurrent sessions (Cloud SQL Query Insights) β not CPU time; it can exceed the wall-clock window. |
| Database metrics during test | CPU: 87% median, 90% peakMemory: 40%Connections: 46Transactions: 12,351/sIOPS: read 0, write 711CPU-saturated β the bottleneck for this target. |
| k6 Iterations per second | 49 |
| k6 output | output |
| flowchart outcome | Potential issues. Not resource-bound: database CPU 87%, ZITADEL CPU 48%, yet 86% of the top-5 query time is advisory lock wait β predominantly the projection handler lock, which serialises this workload. Additional vCPU will not help. Logged as an issue rather than blocking further scale testing. The run also contains a 1,044-request platform 503 burst (19:37-19:44) under separate investigation in benchmark/postmortems/2026-08-27-503-burst.md; it does not affect this verdict. |
Endpoint latencies
k6 output
/* Detailed source-code truncated for AI context efficiency. */Apps Docs Content Apis Benchmarks V4.17.1 Introspect Index (`apps/docs/content/apis/benchmarks/v4.17.1/introspect/index.mdx`)
title: introspect benchmark of zitadel v4.17.1 sidebar_label: introspect
import OutputSource from "./output.json";
import { BenchmarkChart } from "@/components/benchmark_chart";
Benchmark results of the v4.17.1 release of Zitadel.
Performance test results
| Metric | Value |
|---|---|
| Baseline | none |
| Purpose | Test current performance |
| Test start | 2026-08-27 15:31:22 UTC |
| Test end | 2026-08-27 16:01:22 UTC |
| Test duration | 30min |
| Executed test | introspect |
| k6 version | v2.1.0 |
| VUs | 600 |
| Client location | US1 |
| ZITADEL location | US1 |
| ZITADEL container specification | vCPU: 6 Memory: 6 Gi Container min scale: 7Container max scale: 7 |
| ZITADEL Version | v4.17.1 |
| ZITADEL Settings | Eventstore autovacuum (new in v4.17): Enabled: trueVacuumThreshold: 1000000AnalyzeThreshold: 1000000Tuned for the ~4,000 events/s expected during the benchmark, per the tuning guide. |
| ZITADEL feature flags | Enabled: loginDefaultOrg (instance), oidcTokenExchange (system), enableBackChannelLogout (system), consoleUseV2UserApi (instance)improvedPerformance (instance): IMPROVED_PERFORMANCE_PROJECT_GRANT, IMPROVED_PERFORMANCE_PROJECT, IMPROVED_PERFORMANCE_USER_GRANT, IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIEDDisabled: loginV2 (explicitly false at instance), userSchema, debugOidcParentError, oidcSingleV1SessionTermination, permissionCheckV2Captured from the instance before the run (sequence 7, set 2026-08-27 13:35:31 UTC); the same capture covers manipulate_user at 13:41 and the rest of the sweep from 14:56, so all eleven targets ran the same configuration.This restores like-for-like comparison with the v4 pages, which ran five improvedPerformance options. The fifth, IMPROVED_PERFORMANCE_ORG_BY_ID, is reserved in the proto and no longer exists. |
| Database | type: psqlversion: v17.4 |
| Database location | US1 |
| Database specification | vCPU: 8 memory: 32Gib |
| ZITADEL metrics during test | CPU: p50 39%, p99 50% (peak 58%)Memory: p50 6%, peak 15%Instances: 7 (constant), no container startups recordedServer-side: 2,325 req/s, latency p50 33ms / p95 1.1s / p99 1.3s |
| Observed errors | 1,400 of 4,159,863 requests failed (0.03%): 2x connection reset, 1,398x not individually logged (see k6 output). 2,800 of 8,317,316 checks failed (0.03%): introspect status ok (1400 failed), introspect active (1400 failed) |
| Top 3 most expensive database queries | 1: Query events by aggregate_id and event_types, ordered by sequence (4,034 s)2: Query events by instance_id, aggregate_types, event_types, position (paged) (1,765 s)3: Load user with primary login name and human profile (1,497 s)Ranked by total accumulated execution time summed across concurrent sessions (Cloud SQL Query Insights) β not CPU time; it can exceed the wall-clock window. |
| Database metrics during test | CPU: 98% median, 99% peakMemory: 40%Connections: 46Transactions: 11,597/sIOPS: read 0, write 10CPU-saturated β the bottleneck for this target. |
| k6 Iterations per second | 2297 |
| k6 output | output |
| flowchart outcome | Scale. Database CPU is the limit: 98% median against ZITADEL at 39%, with advisory lock wait only 0% of the top-5 query time. Raising the database beyond 8 vCPU is the next step, and throughput should be re-measured against the increase. |
Endpoint latencies
k6 output
/* Detailed source-code truncated for AI context efficiency. */Apps Docs Content Apis Benchmarks V4.17.1 Machine Client Credentials Login Index (`apps/docs/content/apis/benchmarks/v4.17.1/machine_client_credentials_login/index.mdx`)
title: machine client credentials login benchmark of zitadel v4.17.1 sidebar_label: machine client credentials login
import OutputSource from "./output.json";
import { BenchmarkChart } from "@/components/benchmark_chart";
Benchmark results of the v4.17.1 release of Zitadel.
Performance test results
| Metric | Value |
|---|---|
| Baseline | none |
| Purpose | Test current performance |
| Test start | 2026-08-27 16:03:44 UTC |
| Test end | 2026-08-27 16:33:45 UTC |
| Test duration | 30min |
| Executed test | machine_client_credentials_login |
| k6 version | v2.1.0 |
| VUs | 600 |
| Client location | US1 |
| ZITADEL location | US1 |
| ZITADEL container specification | vCPU: 6 Memory: 6 Gi Container min scale: 7Container max scale: 7 |
| ZITADEL Version | v4.17.1 |
| ZITADEL Settings | Eventstore autovacuum (new in v4.17): Enabled: trueVacuumThreshold: 1000000AnalyzeThreshold: 1000000Tuned for the ~4,000 events/s expected during the benchmark, per the tuning guide. |
| ZITADEL feature flags | Enabled: loginDefaultOrg (instance), oidcTokenExchange (system), enableBackChannelLogout (system), consoleUseV2UserApi (instance)improvedPerformance (instance): IMPROVED_PERFORMANCE_PROJECT_GRANT, IMPROVED_PERFORMANCE_PROJECT, IMPROVED_PERFORMANCE_USER_GRANT, IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIEDDisabled: loginV2 (explicitly false at instance), userSchema, debugOidcParentError, oidcSingleV1SessionTermination, permissionCheckV2Captured from the instance before the run (sequence 7, set 2026-08-27 13:35:31 UTC); the same capture covers manipulate_user at 13:41 and the rest of the sweep from 14:56, so all eleven targets ran the same configuration.This restores like-for-like comparison with the v4 pages, which ran five improvedPerformance options. The fifth, IMPROVED_PERFORMANCE_ORG_BY_ID, is reserved in the proto and no longer exists. |
| Database | type: psqlversion: v17.4 |
| Database location | US1 |
| Database specification | vCPU: 8 memory: 32Gib |
| ZITADEL metrics during test | CPU: p50 26%, p99 36% (peak 44%)Memory: p50 6%, peak 12%Instances: 7 (constant), no container startups recordedServer-side: 1,674 req/s, latency p50 46ms / p95 1.8s / p99 2.3s |
| Observed errors | 1,789 of 3,073,497 requests failed (0.05%): 3x connection reset, 1,786x not individually logged (see k6 output). 1 iteration aborted on a null response body. 1,789 of 4,607,991 checks failed (0.03%): client credentials status ok (905 failed), userinfo status ok (884 failed) |
| Top 3 most expensive database queries | 1: Query events by aggregate_id and event_types, ordered by sequence (4,057 s)2: Push events (eventstore.push) (3,810 s)3: Query events by instance_id, aggregate_types, event_types, position (paged) (3,573 s)Ranked by total accumulated execution time summed across concurrent sessions (Cloud SQL Query Insights) β not CPU time; it can exceed the wall-clock window. |
| Database metrics during test | CPU: 96% median, 98% peakMemory: 40%Connections: 46Transactions: 10,804/sIOPS: read 0, write 857CPU-saturated β the bottleneck for this target. |
| k6 Iterations per second | 834 |
| k6 output | output |
| flowchart outcome | Scale. Database CPU is the limit: 96% median against ZITADEL at 26%, with advisory lock wait only 0% of the top-5 query time. Raising the database beyond 8 vCPU is the next step, and throughput should be re-measured against the increase. |
Endpoint latencies
k6 output
/* Detailed source-code truncated for AI context efficiency. */Apps Docs Content Apis Benchmarks V4.17.1 Machine Jwt Profile Grant Index (`apps/docs/content/apis/benchmarks/v4.17.1/machine_jwt_profile_grant/index.mdx`)
title: machine jwt profile grant benchmark of zitadel v4.17.1 sidebar_label: machine jwt profile grant
import OutputSource from "./output.json";
import { BenchmarkChart } from "@/components/benchmark_chart";
Benchmark results of the v4.17.1 release of Zitadel.
Performance test results
| Metric | Value |
|---|---|
| Baseline | none |
| Purpose | Test current performance |
| Test start | 2026-08-27 16:34:57 UTC |
| Test end | 2026-08-27 17:04:57 UTC |
| Test duration | 30min |
| Executed test | machine_jwt_profile_grant |
| k6 version | v2.1.0 |
| VUs | 600 |
| Client location | US1 |
| ZITADEL location | US1 |
| ZITADEL container specification | vCPU: 6 Memory: 6 Gi Container min scale: 7Container max scale: 7 |
| ZITADEL Version | v4.17.1 |
| ZITADEL Settings | Eventstore autovacuum (new in v4.17): Enabled: trueVacuumThreshold: 1000000AnalyzeThreshold: 1000000Tuned for the ~4,000 events/s expected during the benchmark, per the tuning guide. |
| ZITADEL feature flags | Enabled: loginDefaultOrg (instance), oidcTokenExchange (system), enableBackChannelLogout (system), consoleUseV2UserApi (instance)improvedPerformance (instance): IMPROVED_PERFORMANCE_PROJECT_GRANT, IMPROVED_PERFORMANCE_PROJECT, IMPROVED_PERFORMANCE_USER_GRANT, IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIEDDisabled: loginV2 (explicitly false at instance), userSchema, debugOidcParentError, oidcSingleV1SessionTermination, permissionCheckV2Captured from the instance before the run (sequence 7, set 2026-08-27 13:35:31 UTC); the same capture covers manipulate_user at 13:41 and the rest of the sweep from 14:56, so all eleven targets ran the same configuration.This restores like-for-like comparison with the v4 pages, which ran five improvedPerformance options. The fifth, IMPROVED_PERFORMANCE_ORG_BY_ID, is reserved in the proto and no longer exists. |
| Database | type: psqlversion: v17.4 |
| Database location | US1 |
| Database specification | vCPU: 8 memory: 32Gib |
| ZITADEL metrics during test | CPU: p50 22%, p99 31% (peak 36%)Memory: p50 6%, peak 13%Instances: 7 (constant), no container startups recordedServer-side: 1,108 req/s, latency p50 70ms / p95 2.6s / p99 2.8s |
| Observed errors | 97 of 1,986,156 requests failed (0.00%): none of the 97 individually logged (see k6 output). 194 of 3,969,305 checks failed (0.00%): token status ok (97 failed), access token returned (97 failed) |
| Top 3 most expensive database queries | 1: Push events (eventstore.push) (6,040 s)2: Query events by instance_id, aggregate_types, event_types, position (paged) (1,773 s)3: Load user with primary login name and human profile (1,022 s)Ranked by total accumulated execution time summed across concurrent sessions (Cloud SQL Query Insights) β not CPU time; it can exceed the wall-clock window. |
| Database metrics during test | CPU: 96% median, 97% peakMemory: 40%Connections: 46Transactions: 8,909/sIOPS: read 0, write 887CPU-saturated β the bottleneck for this target. |
| k6 Iterations per second | 1076 |
| k6 output | output |
| flowchart outcome | Scale. Database CPU is the limit: 96% median against ZITADEL at 22%, with advisory lock wait only 7% of the top-5 query time. Raising the database beyond 8 vCPU is the next step, and throughput should be re-measured against the increase. Lock share fell from 64.8% to 7.3% when improvedPerformance was enabled, moving this target from lock-bound to CPU-bound. |
Endpoint latencies
k6 output
/* Detailed source-code truncated for AI context efficiency. */Apps Docs Content Apis Benchmarks V4.17.1 Machine Pat Login Index (`apps/docs/content/apis/benchmarks/v4.17.1/machine_pat_login/index.mdx`)
title: machine pat login benchmark of zitadel v4.17.1 sidebar_label: machine pat login
import OutputSource from "./output.json";
import { BenchmarkChart } from "@/components/benchmark_chart";
Benchmark results of the v4.17.1 release of Zitadel.
Performance test results
| Metric | Value |
|---|---|
| Baseline | none |
| Purpose | Test current performance |
| Test start | 2026-08-27 17:06:10 UTC |
| Test end | 2026-08-27 17:36:10 UTC |
| Test duration | 30min |
| Executed test | machine_pat_login |
| k6 version | v2.1.0 |
| VUs | 600 |
| Client location | US1 |
| ZITADEL location | US1 |
| ZITADEL container specification | vCPU: 6 Memory: 6 Gi Container min scale: 7Container max scale: 7 |
| ZITADEL Version | v4.17.1 |
| ZITADEL Settings | Eventstore autovacuum (new in v4.17): Enabled: trueVacuumThreshold: 1000000AnalyzeThreshold: 1000000Tuned for the ~4,000 events/s expected during the benchmark, per the tuning guide. |
| ZITADEL feature flags | Enabled: loginDefaultOrg (instance), oidcTokenExchange (system), enableBackChannelLogout (system), consoleUseV2UserApi (instance)improvedPerformance (instance): IMPROVED_PERFORMANCE_PROJECT_GRANT, IMPROVED_PERFORMANCE_PROJECT, IMPROVED_PERFORMANCE_USER_GRANT, IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIEDDisabled: loginV2 (explicitly false at instance), userSchema, debugOidcParentError, oidcSingleV1SessionTermination, permissionCheckV2Captured from the instance before the run (sequence 7, set 2026-08-27 13:35:31 UTC); the same capture covers manipulate_user at 13:41 and the rest of the sweep from 14:56, so all eleven targets ran the same configuration.This restores like-for-like comparison with the v4 pages, which ran five improvedPerformance options. The fifth, IMPROVED_PERFORMANCE_ORG_BY_ID, is reserved in the proto and no longer exists. |
| Database | type: psqlversion: v17.4 |
| Database location | US1 |
| Database specification | vCPU: 8 memory: 32Gib |
| ZITADEL metrics during test | CPU: p50 29%, p99 46% (peak 50%)Memory: p50 6%, peak 14%Instances: 7 (constant), no container startups recordedServer-side: 3,562 req/s, latency p50 11ms / p95 863ms / p99 1.0s |
| Observed errors | 29 of 6,335,633 requests failed (0.00%): 29x connection reset. 29 of 6,335,036 checks failed (0.00%): userinfo status ok (29 failed) |
| Top 3 most expensive database queries | 1: Load user with primary login name and human profile (2,135 s)2: Query events by instance_id, aggregate_types, event_types, position (paged) (1,778 s)3: Query events by aggregate_id, event_types and created_at (474 s)Ranked by total accumulated execution time summed across concurrent sessions (Cloud SQL Query Insights) β not CPU time; it can exceed the wall-clock window. |
| Database metrics during test | CPU: 86% median, 95% peakMemory: 40%Connections: 46Transactions: 21,329/sIOPS: read 0, write 12CPU-saturated β the bottleneck for this target. |
| k6 Iterations per second | 3452 |
| k6 output | output |
| flowchart outcome | Scale. Database CPU is the limit: 86% median against ZITADEL at 29%, with advisory lock wait only 0% of the top-5 query time. Raising the database beyond 8 vCPU is the next step, and throughput should be re-measured against the increase. |
Endpoint latencies
k6 output
/* Detailed source-code truncated for AI context efficiency. */Apps Docs Content Apis Benchmarks V4.17.1 Manipulate User Index (`apps/docs/content/apis/benchmarks/v4.17.1/manipulate_user/index.mdx`)
title: manipulate user benchmark of zitadel v4.17.1 sidebar_label: manipulate user
import OutputSource from "./output.json";
import { BenchmarkChart } from "@/components/benchmark_chart";
Benchmark results of the v4.17.1 release of Zitadel.
Performance test results
| Metric | Value |
|---|---|
| Baseline | none |
| Purpose | Test current performance |
| Test start | 2026-08-27 13:41:19 UTC |
| Test end | 2026-08-27 14:11:30 UTC |
| Test duration | 30min |
| Executed test | manipulate_user |
| k6 version | v2.1.0 |
| VUs | 200 |
| Client location | US1 |
| ZITADEL location | US1 |
| ZITADEL container specification | vCPU: 6 Memory: 6 Gi Container min scale: 7Container max scale: 7 |
| ZITADEL Version | v4.17.1 |
| ZITADEL Settings | Eventstore autovacuum (new in v4.17): Enabled: trueVacuumThreshold: 1000000AnalyzeThreshold: 1000000Tuned for the ~4,000 events/s expected during the benchmark, per the tuning guide. |
| ZITADEL feature flags | Enabled: loginDefaultOrg (instance), oidcTokenExchange (system), enableBackChannelLogout (system), consoleUseV2UserApi (instance)improvedPerformance (instance): IMPROVED_PERFORMANCE_PROJECT_GRANT, IMPROVED_PERFORMANCE_PROJECT, IMPROVED_PERFORMANCE_USER_GRANT, IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIEDDisabled: loginV2 (explicitly false at instance), userSchema, debugOidcParentError, oidcSingleV1SessionTermination, permissionCheckV2Captured from the instance before the run (sequence 7, set 2026-08-27 13:35:31 UTC); the same capture covers manipulate_user at 13:41 and the rest of the sweep from 14:56, so all eleven targets ran the same configuration.This restores like-for-like comparison with the v4 pages, which ran five improvedPerformance options. The fifth, IMPROVED_PERFORMANCE_ORG_BY_ID, is reserved in the proto and no longer exists. |
| Database | type: psqlversion: v17.4 |
| Database location | US1 |
| Database specification | vCPU: 8 memory: 32Gib |
| ZITADEL metrics during test | CPU: p50 16%, p99 23% (peak 41%)Memory: p50 7%, peak 12%Instances: 7 (constant), no container startups recordedServer-side: 89 req/s, latency p50 300ms / p95 12.9s / p99 36.6s |
| Observed errors | 225 of 171,987 requests failed (0.13%). Corrected by hand from the generated row, which reported these as a single population; they are two unrelated ones, 25 minutes apart. (1) 150 platform errors, not ZITADEL errors: HTTP 503 Service error -27, an HTML page from the Google frontend rather than a ZITADEL JSON error, confined entirely to a 55-second burst from 13:43:19 to 13:44:13 UTC, two minutes into the run, with no recurrence in the following 25 minutes. The shape is a container restart or replacement; a GCP post-mortem (restarts, panics, instance count) is pending and its findings so far are recorded in benchmark/postmortems/2026-08-27-503-burst.md. (2) 75 request timeouts from 14:08:48 to 14:11:02 UTC, the documented degradation-over-sustained-churn behaviour of this target: the first arrives 1,658s (~28min) into the run and they cluster in the final minutes alongside a steady latency climb. The previous 200-VU run saw the equivalent 77 timeouts beginning at 1,255s. 127 of 137,522 checks failed (0.09%): create user (29), update user (41), lock user (25), delete user (32) β all of them within the two windows above. The failed-check count is not comparable to the previous run's zero: before commit cdde3ab3e a timeout killed the iteration before its check could be recorded (77 timeouts, 77 aborted iterations, 0 recorded check failures); with the response body now guarded, 75 timeouts aborted 0 iterations and the failures are recorded instead of being silently fatal. This target ran at 200 VUs, not the 600 used for every other target: at 600 VUs the same failure begins after 179s and produces a far higher error rate for identical throughput. |
| Top 3 most expensive database queries | 1: Query events by a multi-aggregate / event_type filter set (13,352 s)2: Projection handler advisory lock, one per projection per instance β lock wait, not query work (6,438 s)3: Query events by instance_id, aggregate_types, event_types, position (paged) (3,970 s)Ranked by total accumulated execution time summed across concurrent sessions (Cloud SQL Query Insights) β not CPU time; it can exceed the wall-clock window. |
| Database metrics during test | CPU: 98% median, 100% peakMemory: 40%Connections: 46Transactions: 1,487/sIOPS: read 0, write 539CPU-saturated β the bottleneck for this target. |
| k6 Iterations per second | 19 |
| k6 output | output |
| flowchart outcome | Potential issues. Not resource-bound: database CPU 98%, ZITADEL CPU 16%, yet 35% of the top-5 query time is advisory lock wait β predominantly the projection handler lock, which serialises this workload. Additional vCPU will not help. Logged as an issue rather than blocking further scale testing. This target also shows the documented degradation over sustained single-org churn, with per-operation latency climbing across the run. |
Endpoint latencies
k6 output
/* Detailed source-code truncated for AI context efficiency. */Apps Docs Content Apis Benchmarks V4.17.1 Oidc Session Index (`apps/docs/content/apis/benchmarks/v4.17.1/oidc_session/index.mdx`)
title: oidc session benchmark of zitadel v4.17.1 sidebar_label: oidc session
import OutputSource from "./output.json";
import { BenchmarkChart } from "@/components/benchmark_chart";
Benchmark results of the v4.17.1 release of Zitadel.
Performance test results
| Metric | Value |
|---|---|
| Baseline | none |
| Purpose | Test current performance |
| Test start | 2026-08-27 17:38:43 UTC |
| Test end | 2026-08-27 18:08:45 UTC |
| Test duration | 30min |
| Executed test | oidc_session |
| k6 version | v2.1.0 |
| VUs | 600 |
| Client location | US1 |
| ZITADEL location | US1 |
| ZITADEL container specification | vCPU: 6 Memory: 6 Gi Container min scale: 7Container max scale: 7 |
| ZITADEL Version | v4.17.1 |
| ZITADEL Settings | Eventstore autovacuum (new in v4.17): Enabled: trueVacuumThreshold: 1000000AnalyzeThreshold: 1000000Tuned for the ~4,000 events/s expected during the benchmark, per the tuning guide. |
| ZITADEL feature flags | Enabled: loginDefaultOrg (instance), oidcTokenExchange (system), enableBackChannelLogout (system), consoleUseV2UserApi (instance)improvedPerformance (instance): IMPROVED_PERFORMANCE_PROJECT_GRANT, IMPROVED_PERFORMANCE_PROJECT, IMPROVED_PERFORMANCE_USER_GRANT, IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIEDDisabled: loginV2 (explicitly false at instance), userSchema, debugOidcParentError, oidcSingleV1SessionTermination, permissionCheckV2Captured from the instance before the run (sequence 7, set 2026-08-27 13:35:31 UTC); the same capture covers manipulate_user at 13:41 and the rest of the sweep from 14:56, so all eleven targets ran the same configuration.This restores like-for-like comparison with the v4 pages, which ran five improvedPerformance options. The fifth, IMPROVED_PERFORMANCE_ORG_BY_ID, is reserved in the proto and no longer exists. |
| Database | type: psqlversion: v17.4 |
| Database location | US1 |
| Database specification | vCPU: 8 memory: 32Gib |
| ZITADEL metrics during test | CPU: p50 20%, p99 34% (peak 37%)Memory: p50 6%, peak 12%Instances: 7 (constant), no container startups recordedServer-side: 1,001 req/s, latency p50 59ms / p95 2.8s / p99 3.3s |
| Observed errors | 3 of 1,767,162 requests failed (0.00%): 2x connection reset, 1x not individually logged (see k6 output). 3 of 2,355,414 checks failed (0.00%): add Session status ok (1 failed), finalize auth request status ok (2 failed) |
| Top 3 most expensive database queries | 1: Push events (eventstore.push) (3,945 s)2: Query events by instance_id, aggregate_types, event_types, position (paged) (3,572 s)3: Shared advisory lock on events2, taken by every push β lock wait (1,973 s)Ranked by total accumulated execution time summed across concurrent sessions (Cloud SQL Query Insights) β not CPU time; it can exceed the wall-clock window. |
| Database metrics during test | CPU: 92% median, 94% peakMemory: 40%Connections: 46Transactions: 10,721/sIOPS: read 1, write 1,086CPU-saturated β the bottleneck for this target. |
| k6 Iterations per second | 326 |
| k6 output | output |
| flowchart outcome | Scale. Database CPU is the limit: 92% median against ZITADEL at 20%, with advisory lock wait only 20% of the top-5 query time. Raising the database beyond 8 vCPU is the next step, and throughput should be re-measured against the increase. |
Endpoint latencies
k6 output
/* Detailed source-code truncated for AI context efficiency. */Apps Docs Content Apis Benchmarks V4.17.1 Otp Session Index (`apps/docs/content/apis/benchmarks/v4.17.1/otp_session/index.mdx`)
title: otp session benchmark of zitadel v4.17.1 sidebar_label: otp session
import OutputSource from "./output.json";
import { BenchmarkChart } from "@/components/benchmark_chart";
Benchmark results of the v4.17.1 release of Zitadel.
Performance test results
| Metric | Value |
|---|---|
| Baseline | none |
| Purpose | Test current performance |
| Test start | 2026-08-27 18:49:09 UTC |
| Test end | 2026-08-27 19:19:16 UTC |
| Test duration | 30min |
| Executed test | otp_session |
| k6 version | v2.1.0 |
| VUs | 600 |
| Client location | US1 |
| ZITADEL location | US1 |
| ZITADEL container specification | vCPU: 6 Memory: 6 Gi Container min scale: 7Container max scale: 7 |
| ZITADEL Version | v4.17.1 |
| ZITADEL Settings | Eventstore autovacuum (new in v4.17): Enabled: trueVacuumThreshold: 1000000AnalyzeThreshold: 1000000Tuned for the ~4,000 events/s expected during the benchmark, per the tuning guide. |
| ZITADEL feature flags | Enabled: loginDefaultOrg (instance), oidcTokenExchange (system), enableBackChannelLogout (system), consoleUseV2UserApi (instance)improvedPerformance (instance): IMPROVED_PERFORMANCE_PROJECT_GRANT, IMPROVED_PERFORMANCE_PROJECT, IMPROVED_PERFORMANCE_USER_GRANT, IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIEDDisabled: loginV2 (explicitly false at instance), userSchema, debugOidcParentError, oidcSingleV1SessionTermination, permissionCheckV2Captured from the instance before the run (sequence 7, set 2026-08-27 13:35:31 UTC); the same capture covers manipulate_user at 13:41 and the rest of the sweep from 14:56, so all eleven targets ran the same configuration.This restores like-for-like comparison with the v4 pages, which ran five improvedPerformance options. The fifth, IMPROVED_PERFORMANCE_ORG_BY_ID, is reserved in the proto and no longer exists. |
| Database | type: psqlversion: v17.4 |
| Database location | US1 |
| Database specification | vCPU: 8 memory: 32Gib |
| ZITADEL metrics during test | CPU: p50 9%, p99 20% (peak 22%)Memory: p50 6%, peak 14%Instances: 7 (constant), no container startups recordedServer-side: 256 req/s, latency p50 2.8s / p95 8.4s / p99 9.3s |
| Observed errors | 182 of 466,756 requests failed (0.03%): none of the 182 individually logged (see k6 output). 182 of 466,159 checks failed (0.03%): add Session status ok (56 failed), set Session status ok (126 failed) |
| Top 3 most expensive database queries | 1: Projection handler advisory lock, one per projection per instance β lock wait, not query work (13,149 s)2: Query events by instance_id, aggregate_types, event_types, position (paged) (3,760 s)3: Load user with primary login name and human profile (1,615 s)Ranked by total accumulated execution time summed across concurrent sessions (Cloud SQL Query Insights) β not CPU time; it can exceed the wall-clock window. |
| Database metrics during test | CPU: 63% median, 64% peakMemory: 40%Connections: 46Transactions: 3,554/sIOPS: read 3, write 860 |
| k6 Iterations per second | 84 |
| k6 output | output |
| flowchart outcome | Potential issues. Not resource-bound: database CPU 63%, ZITADEL CPU 9%, yet 69% of the top-5 query time is advisory lock wait β predominantly the projection handler lock, which serialises this workload. Additional vCPU will not help. Logged as an issue rather than blocking further scale testing. |
Endpoint latencies
k6 output
/* Detailed source-code truncated for AI context efficiency. */Apps Docs Content Apis Benchmarks V4.17.1 Password Session Index (`apps/docs/content/apis/benchmarks/v4.17.1/password_session/index.mdx`)
title: password session benchmark of zitadel v4.17.1 sidebar_label: password session
import OutputSource from "./output.json";
import { BenchmarkChart } from "@/components/benchmark_chart";
Benchmark results of the v4.17.1 release of Zitadel.
Performance test results
| Metric | Value |
|---|---|
| Baseline | none |
| Purpose | Test current performance |
| Test start | 2026-08-27 20:02:39 UTC |
| Test end | 2026-08-27 20:32:49 UTC |
| Test duration | 30min |
| Executed test | password_session |
| k6 version | v2.1.0 |
| VUs | 600 |
| Client location | US1 |
| ZITADEL location | US1 |
| ZITADEL container specification | vCPU: 6 Memory: 6 Gi Container min scale: 7Container max scale: 7 |
| ZITADEL Version | v4.17.1 |
| ZITADEL Settings | Eventstore autovacuum (new in v4.17): Enabled: trueVacuumThreshold: 1000000AnalyzeThreshold: 1000000Tuned for the ~4,000 events/s expected during the benchmark, per the tuning guide. |
| ZITADEL feature flags | Enabled: loginDefaultOrg (instance), oidcTokenExchange (system), enableBackChannelLogout (system), consoleUseV2UserApi (instance)improvedPerformance (instance): IMPROVED_PERFORMANCE_PROJECT_GRANT, IMPROVED_PERFORMANCE_PROJECT, IMPROVED_PERFORMANCE_USER_GRANT, IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIEDDisabled: loginV2 (explicitly false at instance), userSchema, debugOidcParentError, oidcSingleV1SessionTermination, permissionCheckV2Captured from the instance before the run (sequence 7, set 2026-08-27 13:35:31 UTC); the same capture covers manipulate_user at 13:41 and the rest of the sweep from 14:56, so all eleven targets ran the same configuration.This restores like-for-like comparison with the v4 pages, which ran five improvedPerformance options. The fifth, IMPROVED_PERFORMANCE_ORG_BY_ID, is reserved in the proto and no longer exists. |
| Database | type: psqlversion: v17.4 |
| Database location | US1 |
| Database specification | vCPU: 8 memory: 32Gib |
| ZITADEL metrics during test | CPU: p50 50%, p99 69% (peak 75%)Memory: p50 7%, peak 16%Instances: 7 (constant), no container startups recordedServer-side: 140 req/s, latency p50 2.6s / p95 10.7s / p99 11.5s |
| Observed errors | 1 of 253,280 requests failed (0.00%): 1x connection reset. 1 iteration aborted on a null response body. 1 of 252,683 checks failed (0.00%): set Session status ok (1 failed) |
| Top 3 most expensive database queries | 1: Projection handler advisory lock, one per projection per instance β lock wait, not query work (18,303 s)2: Eventstore read barrier: advisory lock + unlock on events2 β lock wait (6,904 s)3: Query events by instance_id, aggregate_types, event_types, position (paged) (3,794 s)Ranked by total accumulated execution time summed across concurrent sessions (Cloud SQL Query Insights) β not CPU time; it can exceed the wall-clock window. |
| Database metrics during test | CPU: 51% median, 52% peakMemory: 40%Connections: 46Transactions: 2,029/sIOPS: read 3, write 597 |
| k6 Iterations per second | 68 |
| k6 output | output |
| flowchart outcome | Potential issues. Not resource-bound: database CPU 51%, ZITADEL CPU 50%, yet 86% of the top-5 query time is advisory lock wait β predominantly the projection handler lock, which serialises this workload. Additional vCPU will not help. Logged as an issue rather than blocking further scale testing. |
Endpoint latencies
k6 output
/* Detailed source-code truncated for AI context efficiency. */Apps Docs Content Apis Benchmarks V4.17.1 User Info Index (`apps/docs/content/apis/benchmarks/v4.17.1/user_info/index.mdx`)
title: user info benchmark of zitadel v4.17.1 sidebar_label: user info
import OutputSource from "./output.json";
import { BenchmarkChart } from "@/components/benchmark_chart";
Benchmark results of the v4.17.1 release of Zitadel.
Performance test results
| Metric | Value |
|---|---|
| Baseline | none |
| Purpose | Test current performance |
| Test start | 2026-08-27 18:11:39 UTC |
| Test end | 2026-08-27 18:41:40 UTC |
| Test duration | 30min |
| Executed test | user_info |
| k6 version | v2.1.0 |
| VUs | 600 |
| Client location | US1 |
| ZITADEL location | US1 |
| ZITADEL container specification | vCPU: 6 Memory: 6 Gi Container min scale: 7Container max scale: 7 |
| ZITADEL Version | v4.17.1 |
| ZITADEL Settings | Eventstore autovacuum (new in v4.17): Enabled: trueVacuumThreshold: 1000000AnalyzeThreshold: 1000000Tuned for the ~4,000 events/s expected during the benchmark, per the tuning guide. |
| ZITADEL feature flags | Enabled: loginDefaultOrg (instance), oidcTokenExchange (system), enableBackChannelLogout (system), consoleUseV2UserApi (instance)improvedPerformance (instance): IMPROVED_PERFORMANCE_PROJECT_GRANT, IMPROVED_PERFORMANCE_PROJECT, IMPROVED_PERFORMANCE_USER_GRANT, IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIEDDisabled: loginV2 (explicitly false at instance), userSchema, debugOidcParentError, oidcSingleV1SessionTermination, permissionCheckV2Captured from the instance before the run (sequence 7, set 2026-08-27 13:35:31 UTC); the same capture covers manipulate_user at 13:41 and the rest of the sweep from 14:56, so all eleven targets ran the same configuration.This restores like-for-like comparison with the v4 pages, which ran five improvedPerformance options. The fifth, IMPROVED_PERFORMANCE_ORG_BY_ID, is reserved in the proto and no longer exists. |
| Database | type: psqlversion: v17.4 |
| Database location | US1 |
| Database specification | vCPU: 8 memory: 32Gib |
| ZITADEL metrics during test | CPU: p50 26%, p99 42% (peak 44%)Memory: p50 6%, peak 14%Instances: 7 (constant), no container startups recordedServer-side: 3,303 req/s, latency p50 16ms / p95 939ms / p99 1.1s |
| Observed errors | 66 of 5,800,788 requests failed (0.00%): 1x connection reset, 65x not individually logged (see k6 output). 66 of 5,800,793 checks failed (0.00%): userinfo status ok (65 failed), org removed (1 failed) |
| Top 3 most expensive database queries | 1: Push events (eventstore.push) (3,583 s)2: Query events by instance_id, aggregate_types, event_types, position (paged) (3,576 s)3: Load user with primary login name and human profile (2,149 s)Ranked by total accumulated execution time summed across concurrent sessions (Cloud SQL Query Insights) β not CPU time; it can exceed the wall-clock window. |
| Database metrics during test | CPU: 96% median, 97% peakMemory: 40%Connections: 46Transactions: 16,545/sIOPS: read 0, write 12CPU-saturated β the bottleneck for this target. |
| k6 Iterations per second | 3217 |
| k6 output | output |
| flowchart outcome | Scale. Database CPU is the limit: 96% median against ZITADEL at 26%, with advisory lock wait only 15% of the top-5 query time. Raising the database beyond 8 vCPU is the next step, and throughput should be re-measured against the increase. |
Endpoint latencies
k6 output
/* Detailed source-code truncated for AI context efficiency. */Apps Docs Content Apis Benchmarks V4 Add Session Index (`apps/docs/content/apis/benchmarks/v4/add_session/index.mdx`)
title: create session benchmark of zitadel v4 sidebar_label: create session
import OutputSource from "./output.json";
import { BenchmarkChart } from '@/components/benchmark_chart';
Benchmark results of v4 release of Zitadel.
Performance test results
| Metric | Value |
|---|---|
| Baseline | none |
| Purpose | Test current performance |
| Test start | 11:31 UTC |
| Test duration | 30min |
| Executed test | add_session |
| k6 version | v1.0.0-rc1 |
| VUs | 600 |
| Client location | US1 |
| ZITADEL location | US1 |
| ZITADEL container specification | vCPU: 6 Memory: 6 Gi Container min scale: 2Container max scale: 7 |
| ZITADEL Version | v4.0.0-rc2 |