ScriptsApr 10, 2026·3 min read

Zitadel — Open Source Identity Infrastructure

Zitadel is an open-source identity management platform with OIDC, SAML, SSO, MFA, passkeys, and multi-tenancy — built for cloud-native apps and enterprise needs.

TL;DR
Zitadel provides OIDC, SAML, SSO, MFA, and multi-tenancy as a self-hosted or cloud identity management platform.
§01

What it is

Zitadel is an open-source identity management platform that handles authentication and authorization for applications and APIs. It supports OIDC, SAML, SSO, multi-factor authentication (TOTP, WebAuthn, passkeys), and multi-tenancy out of the box. The platform provides a management console, API-first design, and event-sourced architecture.

Developers building SaaS products, platform engineers managing multi-tenant identity, and security teams needing audit trails will find Zitadel a capable alternative to Auth0 or Keycloak. It runs as a single binary with embedded CockroachDB or connects to external PostgreSQL.

§02

How it saves time or tokens

Implementing authentication from scratch requires handling token issuance, session management, MFA flows, and user provisioning. Zitadel provides all of these as a single service with pre-built login pages, OIDC-compliant token endpoints, and a management API. The event-sourced architecture means every identity change is auditable without additional logging infrastructure. Multi-tenancy support eliminates building tenant isolation logic in your application layer.

§03

How to use

  1. Start Zitadel with Docker:
docker run --name zitadel -p 8080:8080 \
  ghcr.io/zitadel/zitadel:latest start-from-init \
  --masterkey "MasterkeyNeedsToHave32Characters" \
  --tlsMode disabled
  1. Open http://localhost:8080 and log in with the default admin credentials.
  2. Create a project and application in the management console to get your OIDC client ID and secret.
  3. Integrate with your app using any OIDC client library:
// Example: Node.js with openid-client
import { Issuer } from 'openid-client';

const issuer = await Issuer.discover('http://localhost:8080');
const client = new issuer.Client({
  client_id: 'your-client-id',
  client_secret: 'your-client-secret',
  redirect_uris: ['http://localhost:3000/callback'],
  response_types: ['code'],
});
§04

Example

# Docker Compose production setup
version: '3.8'
services:
  zitadel:
    image: ghcr.io/zitadel/zitadel:latest
    command: start-from-init --masterkey "${ZITADEL_MASTERKEY}"
    environment:
      ZITADEL_EXTERNALSECURE: true
      ZITADEL_EXTERNALPORT: 443
      ZITADEL_EXTERNALDOMAIN: auth.example.com
      ZITADEL_DATABASE_POSTGRES_HOST: db
      ZITADEL_DATABASE_POSTGRES_PORT: 5432
    ports:
      - '8080:8080'
    depends_on:
      - db
  db:
    image: postgres:16
    environment:
      POSTGRES_PASSWORD: zitadel-pg-password
    volumes:
      - pgdata:/var/lib/postgresql/data
volumes:
  pgdata:
§05

Related on TokRepo

§06

Common pitfalls

  • The masterkey must be exactly 32 characters. A shorter or longer key causes a startup failure with a non-obvious error message.
  • Running with --tlsMode disabled is for local development only. Production deployments require TLS termination via a reverse proxy or the built-in TLS configuration.
  • Multi-tenancy in Zitadel uses Organizations. Each Organization has its own users, policies, and branding. Forgetting to scope API calls to the correct Organization returns unexpected results.

Before adopting this tool, evaluate whether it fits your team's existing workflow. Read the official documentation thoroughly, and start with a small proof-of-concept rather than a full migration. Community forums, GitHub issues, and Stack Overflow are valuable resources when you encounter edge cases not covered in the documentation.

Frequently Asked Questions

How does Zitadel compare to Auth0 and Keycloak?+

Zitadel offers similar OIDC, SAML, and MFA capabilities as Auth0 and Keycloak but with an event-sourced architecture that provides built-in audit trails. Unlike Auth0, Zitadel is open source and self-hostable. Compared to Keycloak, Zitadel runs as a single binary without requiring a Java runtime, simplifying deployment and resource usage.

Does Zitadel support passkeys and WebAuthn?+

Yes. Zitadel supports FIDO2/WebAuthn passwordless authentication including passkeys. Users can register platform authenticators (Touch ID, Windows Hello) or roaming authenticators (YubiKey) as primary or second-factor authentication methods.

What databases does Zitadel support?+

Zitadel supports PostgreSQL as its primary database backend. It also includes an embedded CockroachDB option for quick starts and development. For production, external PostgreSQL (version 14 or higher) is recommended with proper backup and replication configuration.

Can Zitadel handle multi-tenant SaaS applications?+

Yes. Zitadel has built-in multi-tenancy through its Organization concept. Each Organization gets isolated users, identity providers, security policies, and branding. You can create Organizations via API and scope all authentication requests to a specific Organization.

Is Zitadel suitable for production use?+

Yes. Zitadel is used in production by organizations that need self-hosted identity management. It supports horizontal scaling, PostgreSQL for persistent storage, TLS, and RBAC for administrative access. The event-sourced architecture ensures data consistency and provides a complete audit log of all identity operations.

Citations (3)
🙏

Source & Thanks

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets