{
  "manifest_version": "1.0.0",
  "template": {
    "id": "901c9f02-0c7f-46ad-88f3-06147680bdd9",
    "slug": "zitadel",
    "name": "Zitadel",
    "description": "Deploy a modern IAM solution with Zitadel on Railway in minutes.",
    "url": "https://railway.com/deploy/zitadel",
    "upstream": {
      "image": "ghcr.io/railwayapp-templates/postgres-ssl:16"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "zitadel",
      "source": {
        "repo": "https://github.com/sethumadhavan-k/zitadel"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "zitadel-postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:16"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "ZITADEL_MASTERKEY",
      "service": "zitadel",
      "description": "A secure 32-byte encryption key used for cryptographic operations. Must remain secret",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "ZITADEL_EXTERNALDOMAIN",
      "service": "zitadel",
      "description": "Publicly accessible domain for your Zitadel instance (e.g., auth.example.com)",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "ZITADEL_EXTERNALSECURE",
      "service": "zitadel",
      "description": "Indicates if the external domain uses HTTPS. Set to \"true\" for production",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "ZITADEL_DATABASE_POSTGRES_HOST",
      "service": "zitadel",
      "description": "Hostname of the PostgreSQL database. Usually auto-injected by Railway as ${{postgres.PGHOST}}",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ZITADEL_DATABASE_POSTGRES_PORT",
      "service": "zitadel",
      "description": "Port number of the PostgreSQL database. Usually ${{postgres.PGPORT}}",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ZITADEL_DATABASE_POSTGRES_DATABASE",
      "service": "zitadel",
      "description": "Name of the Zitadel database (usually \"zitadel\")",
      "secret": false,
      "strategy": "default",
      "default": "zitadel"
    },
    {
      "key": "ZITADEL_DATABASE_POSTGRES_USER_PASSWORD",
      "service": "zitadel",
      "description": "Password for the above DB user. Default is \"zitadel\" for dev. Use strong password in production",
      "secret": true,
      "strategy": "default",
      "default": "zitadel"
    },
    {
      "key": "ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE",
      "service": "zitadel",
      "description": "SSL mode for application DB connection. Use \"disable\" for local/dev",
      "secret": false,
      "strategy": "default",
      "default": "disable"
    },
    {
      "key": "ZITADEL_DATABASE_POSTGRES_USER_USERNAME",
      "service": "zitadel",
      "description": "Application-specific DB user used by Zitadel. Default is \"zitadel\"",
      "secret": false,
      "strategy": "default",
      "default": "zitadel"
    },
    {
      "key": "ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD",
      "service": "zitadel",
      "description": "Admin password for PostgreSQL. Referenced from the Railway PostgreSQL plugin",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE",
      "service": "zitadel",
      "description": "SSL mode for the admin connection (usually \"disable\" in dev, use \"require\" in prod)",
      "secret": false,
      "strategy": "default",
      "default": "disable"
    },
    {
      "key": "ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME",
      "service": "zitadel",
      "description": "Admin username for the PostgreSQL instance. Populated from Railway's service variables",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATA",
      "service": "zitadel-postgres",
      "description": "Location where the database will be initialized",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "zitadel-postgres",
      "description": "Railway Private Domain Name.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "zitadel-postgres",
      "description": "Port to connect to Postgres.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "zitadel-postgres",
      "description": "Required variable for Data panel",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "zitadel-postgres",
      "description": "Required variable for the data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "zitadel-postgres",
      "description": "Required variable for Data panel",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "zitadel-postgres",
      "description": "Default database created when image is started.",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "zitadel-postgres",
      "description": "URL to connect to Postgres database.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "zitadel-postgres",
      "description": "User to connect to Postgres DB",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "zitadel-postgres",
      "description": "SSL certificate expiry in days.",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "zitadel-postgres",
      "description": "Password to connect to DB",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "zitadel-postgres",
      "description": "Public URL to connect to Postgres database, used by the Data panel.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "zitadel-postgres",
      "description": "Allow Postgres to cleanly shut down",
      "secret": false,
      "strategy": "default",
      "default": "60"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "zitadel"
      }
    },
    "cli": "railway deploy --template zitadel",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "901c9f02-0c7f-46ad-88f3-06147680bdd9",
            "serializedConfig": {
              "services": {
                "3b1dac89-ae9b-42e4-bd21-3d474135fd12": {
                  "icon": "https://raw.githubusercontent.com/zitadel/zitadel/3a4298c1794ad61c4fa3d3d186aa4235b8742424/console/src/assets/images/zitadel-logo-solo-light.svg",
                  "name": "zitadel",
                  "source": {
                    "repo": "sethumadhavan-k/zitadel",
                    "branch": null,
                    "rootDirectory": null
                  },
                  "variables": {
                    "ZITADEL_MASTERKEY": {
                      "description": "A secure 32-byte encryption key used for cryptographic operations. Must remain secret",
                      "defaultValue": "{{ZITADEL_MASTERKEY}}"
                    },
                    "ZITADEL_EXTERNALDOMAIN": {
                      "description": "Publicly accessible domain for your Zitadel instance (e.g., auth.example.com)",
                      "defaultValue": "{{ZITADEL_EXTERNALDOMAIN}}"
                    },
                    "ZITADEL_EXTERNALSECURE": {
                      "description": "Indicates if the external domain uses HTTPS. Set to \"true\" for production",
                      "defaultValue": "true"
                    },
                    "ZITADEL_DATABASE_POSTGRES_HOST": {
                      "description": "Hostname of the PostgreSQL database. Usually auto-injected by Railway as ${{postgres.PGHOST}}",
                      "defaultValue": "${{zitadel-postgres.PGHOST}}"
                    },
                    "ZITADEL_DATABASE_POSTGRES_PORT": {
                      "description": "Port number of the PostgreSQL database. Usually ${{postgres.PGPORT}}",
                      "defaultValue": "${{zitadel-postgres.PGPORT}}"
                    },
                    "ZITADEL_DATABASE_POSTGRES_DATABASE": {
                      "description": "Name of the Zitadel database (usually \"zitadel\")",
                      "defaultValue": "zitadel"
                    },
                    "ZITADEL_DATABASE_POSTGRES_USER_PASSWORD": {
                      "description": "Password for the above DB user. Default is \"zitadel\" for dev. Use strong password in production",
                      "defaultValue": "zitadel"
                    },
                    "ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE": {
                      "description": "SSL mode for application DB connection. Use \"disable\" for local/dev",
                      "defaultValue": "disable"
                    },
                    "ZITADEL_DATABASE_POSTGRES_USER_USERNAME": {
                      "description": "Application-specific DB user used by Zitadel. Default is \"zitadel\"",
                      "defaultValue": "zitadel"
                    },
                    "ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD": {
                      "description": "Admin password for PostgreSQL. Referenced from the Railway PostgreSQL plugin",
                      "defaultValue": "${{zitadel-postgres.POSTGRES_PASSWORD}}"
                    },
                    "ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE": {
                      "description": "SSL mode for the admin connection (usually \"disable\" in dev, use \"require\" in prod)",
                      "defaultValue": "disable"
                    },
                    "ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME": {
                      "description": "Admin username for the PostgreSQL instance. Populated from Railway's service variables",
                      "defaultValue": "${{zitadel-postgres.POSTGRES_USER}}"
                    }
                  }
                },
                "59d4a9ef-e22a-4ff8-9314-e2f7ca3502ce": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "zitadel-postgres",
                  "build": {},
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data"
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:16"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Location where the database will be initialized",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Railway Private Domain Name.",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Port to connect to Postgres.",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{ POSTGRES_USER }}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Required variable for the data panel.",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Required variable for Data panel",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Default database created when image is started.",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "URL to connect to Postgres database.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "User to connect to Postgres DB",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": true,
                      "description": "SSL certificate expiry in days.",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Password to connect to DB",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "description": "Public URL to connect to Postgres database, used by the Data panel.",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Allow Postgres to cleanly shut down",
                      "defaultValue": "60"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "59d4a9ef-e22a-4ff8-9314-e2f7ca3502ce": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  },
                  "haTemplateCode": "postgres-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxy",
                      "options": [
                        2,
                        3,
                        4,
                        5
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "Routes traffic to the primary",
                      "defaultValue": 3
                    },
                    "replica": {
                      "label": "Replicas",
                      "options": [
                        2,
                        3,
                        4,
                        5,
                        6,
                        7
                      ],
                      "nodeLabel": "Postgres",
                      "description": "Streaming replicas for automatic failover",
                      "defaultValue": 2
                    },
                    "internal": {
                      "label": "Coordinator Nodes",
                      "options": [
                        3,
                        5,
                        7,
                        9
                      ],
                      "nodeLabel": "etcd",
                      "defaultValue": 3
                    },
                    "description": "This will convert your Postgres database to an HA cluster with Patroni failover and etcd consensus."
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-14T22:14:43.073Z",
  "generator_version": "0.1.0"
}
