{
  "manifest_version": "1.0.0",
  "template": {
    "id": "1896d9c5-b21e-408d-932a-0e8439e35a1c",
    "slug": "07_f_Z",
    "name": "Logto (Auth)",
    "description": "🧑‍🚀 The better identity infrastructure for developers",
    "url": "https://railway.com/deploy/07_f_Z",
    "upstream": {
      "image": "svhd/logto"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:14"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Logto",
      "source": {
        "image": "svhd/logto"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Automatic",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Automatic",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Automatic",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Automatic",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Automatic",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Automatic",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Automatic",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Automatic",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Automatic",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "Automatic",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Automatic",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_PUBLIC_URL",
      "service": "Postgres",
      "description": "Automatic",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "DB_URL",
      "service": "Logto",
      "description": "The database URL for logto service.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ENDPOINT",
      "service": "Logto",
      "description": "The user-facing URL. The value should include 'https://' and should not include trailing '/'.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ADMIN_ENDPOINT",
      "service": "Logto",
      "description": "The URL for admin menu.  The value should include 'https://' and should not include trailing '/'.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "TRUST_PROXY_HEADER",
      "service": "Logto",
      "description": "Should be `1`",
      "secret": false,
      "strategy": "default",
      "default": "1"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "07_f_Z"
      }
    },
    "cli": "railway deploy --template 07_f_Z",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "1896d9c5-b21e-408d-932a-0e8439e35a1c",
            "serializedConfig": {
              "services": {
                "713ecc38-6ae0-49d2-8685-a7df313df014": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:14"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Automatic",
                      "defaultValue": "{{PGDATA}}"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Automatic",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Automatic",
                      "defaultValue": "{{PGPORT}}"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Automatic",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Automatic",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Automatic",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Automatic",
                      "defaultValue": "{{POSTGRES_DB}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Automatic",
                      "defaultValue": "{{DATABASE_URL}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Automatic",
                      "defaultValue": "{{POSTGRES_USER}}"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "Automatic",
                      "defaultValue": "{{SSL_CERT_DAYS}}"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Automatic",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "DATABASE_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Automatic",
                      "defaultValue": "{{DATABASE_PUBLIC_URL}}"
                    }
                  },
                  "volumeMounts": {
                    "713ecc38-6ae0-49d2-8685-a7df313df014": {
                      "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."
                  }
                },
                "d34f3652-e91a-41a1-96fc-c805c808fc0b": {
                  "icon": "https://logto.io/logo.svg",
                  "name": "Logto",
                  "deploy": {
                    "startCommand": "sh -c \"npm run cli db seed -- --swe; npm start\"",
                    "healthcheckPath": null
                  },
                  "source": {
                    "image": "svhd/logto"
                  },
                  "variables": {
                    "DB_URL": {
                      "isOptional": false,
                      "description": "The database URL for logto service.",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "ENDPOINT": {
                      "isOptional": false,
                      "description": "The user-facing URL. The value should include 'https://' and should not include trailing '/'.",
                      "defaultValue": "${{shared.ENDPOINT}}"
                    },
                    "ADMIN_ENDPOINT": {
                      "isOptional": false,
                      "description": "The URL for admin menu.  The value should include 'https://' and should not include trailing '/'.",
                      "defaultValue": "${{shared.ADMIN_ENDPOINT}}"
                    },
                    "TRUST_PROXY_HEADER": {
                      "isOptional": true,
                      "description": "Should be `1`",
                      "defaultValue": "1"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-07T17:54:24.783Z",
  "generator_version": "0.1.0"
}
