# Zitadel (SSO)

# What is Zitadel?

Zitadel은 인증을 위한 플랫폼으로, SSO 또는 Social Logins(Google, Gitlab, Github, Microsoft) 등과 Multifactor 인증, 패스키 인증, API 인증 등 여러 인증을 관리할 수 있습니다.

  • SSO
  • Social Logins(Google, Gitlab, Github, Microsoft)
  • Multifactor Authentication
  • Passkeys
  • Role-Base access control

Zitadel Screenshot 01
Zitadel Screenshot 01
Zitadel Screenshot 02
Zitadel Screenshot 02
Zitadel Screenshot 03
Zitadel Screenshot 03

# Prerequisites


# Install

  • externaldomain 을 맞춰야, instance not found가 발생하지 않음
  • 관리자 설정에서 smtp 설정하기
version: '3.8'

services:
  zitadel:
    image: 'ghcr.io/zitadel/zitadel:latest'
    container_name: 'zitadel'
    restart: 'unless-stopped'
    command: 'start-from-init --masterkey "j6B2VFUXrSDZYLtWwDLEtESb45zr6KhD" --tlsMode disabled'
    environment:
      # https://zitadel.com/docs/self-hosting/manage/configure
      - 'ZITADEL_DATABASE_COCKROACH_HOST=crdb'
      - 'ZITADEL_EXTERNALSECURE=false'
      - 'ZITADEL_EXTERNALDOMAIN={your_domain}'
      - 'ZITADEL_FIRSTINSTANCE_ORG_NAME=taking'
      - 'ZITADEL_FIRSTINSTANCE_ORG_HUMAN_USERNAME={your_username}'
      - 'ZITADEL_FIRSTINSTANCE_ORG_HUMAN_PASSWORD={your_password}'
      - 'ZITADEL_FIRSTINSTANCE_ORG_HUMAN_EMAIL_ADDRESS={your_email}'
      - 'ZITADEL_FIRSTINSTANCE_ORG_HUMAN_EMAIL_VERIFIED=true'
      - 'ZITADEL_FIRSTINSTANCE_ORG_HUMAN_PASSWORDCHANGEREQUIRED=false'
    depends_on:
      crdb:
        condition: 'service_healthy'
    ports:
      - '8080:8080'

  crdb:
    image: 'cockroachdb/cockroach:latest-v22.2'
    restart: 'unless-stopped'
    container_name: 'crdb'
    command: 'start-single-node --insecure'
    healthcheck:
      test: ["CMD", "curl", "-f", "http://127.0.0.1:8080/health?ready=1"]
      interval: '10s'
      timeout: '30s'
      retries: 5
      start_period: '20s'
    ports:
      - '9090:8080'
      - '26257:26257'
    volumes:
      - "./cockroach-data:/cockroach/cockroach-data"
version: '3.8'

services:
  zitadel:
    image: 'ghcr.io/zitadel/zitadel:latest'
    container_name: 'zitadel'
    restart: 'unless-stopped'
    command: 'start-from-init --masterkey "j6B2VFUXrSDZYLtWwDLEtESb45zr6KhD" --tlsMode external'
    environment:
      # https://zitadel.com/docs/self-hosting/manage/configure
      - 'ZITADEL_DATABASE_COCKROACH_HOST=crdb'
      - 'ZITADEL_EXTERNALPORT=443'
      - 'ZITADEL_EXTERNALSECURE=true'
      - 'ZITADEL_TLS_ENABLED=false'
      - 'ZITADEL_EXTERNALDOMAIN={your_domain}'
      - 'ZITADEL_FIRSTINSTANCE_ORG_NAME=taking'
      - 'ZITADEL_FIRSTINSTANCE_ORG_HUMAN_USERNAME={your_username}'
      - 'ZITADEL_FIRSTINSTANCE_ORG_HUMAN_PASSWORD={your_password}'
      - 'ZITADEL_FIRSTINSTANCE_ORG_HUMAN_EMAIL_ADDRESS={your_email}'
      - 'ZITADEL_FIRSTINSTANCE_ORG_HUMAN_EMAIL_VERIFIED=true'
      - 'ZITADEL_FIRSTINSTANCE_ORG_HUMAN_PASSWORDCHANGEREQUIRED=false'
    depends_on:
      crdb:
        condition: 'service_healthy'
    ports:
      - '8080:8080'

  crdb:
    image: 'cockroachdb/cockroach:latest-v22.2'
    restart: 'unless-stopped'
    container_name: 'crdb'
    command: 'start-single-node --insecure'
    healthcheck:
      test: ["CMD", "curl", "-f", "http://127.0.0.1:8080/health?ready=1"]
      interval: '10s'
      timeout: '30s'
      retries: 5
      start_period: '20s'
    ports:
      - '9090:8080'
      - '26257:26257'
    volumes:
      - "./cockroach-data:/cockroach/cockroach-data"

That's it! 🎉


# memo