{
  "manifest_version": "1.0.0",
  "template": {
    "id": "7e976d6b-8a93-4ff8-bb6a-555a7af12e33",
    "slug": "logto-1",
    "name": "Logto",
    "description": "Logto — open-source auth provider: OIDC, OAuth 2.1, SSO, RBAC, MFA",
    "url": "https://railway.com/deploy/logto-1",
    "upstream": {
      "image": "svhd/logto:latest"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Logto Admin",
      "source": {
        "image": "svhd/logto:latest"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "postgres:17-alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Logto Core",
      "source": {
        "image": "svhd/logto:latest"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "DB_URL",
      "service": "Logto Admin",
      "description": "PostgreSQL connection string for Logto Admin. Points at the sibling Postgres service (POSTGRES_DB=logto). Password must match POSTGRES_PASSWORD on the Postgres service.",
      "secret": false,
      "strategy": "default",
      "default": "postgresql://postgres:postgres@postgres.railway.internal:5432/logto"
    },
    {
      "key": "ENDPOINT",
      "service": "Logto Admin",
      "description": "Public URL for the Logto core API (e.g. https://logto-auth.up.railway.app). Auto-detected from Railway domain ",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ADMIN_PORT",
      "service": "Logto Admin",
      "description": "Port for the Logto Admin Console. Logto starts the admin console on this port when ADMIN_PORT is set.",
      "secret": false,
      "strategy": "default",
      "default": "3002"
    },
    {
      "key": "ADMIN_ENDPOINT",
      "service": "Logto Admin",
      "description": "Public URL for this Admin Console service. Auto-detected from Railway domain",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "TRUST_PROXY_HEADER",
      "service": "Logto Admin",
      "description": "Set to '1' when behind HTTPS proxy (default on Railway).",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Postgres data directory. Must be a subdirectory of the volume mount path (/var/lib/postgresql/data) so lost+found stays outside PGDATA.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Initial database created on first boot. Must match the database name in Logto's DB_URL.",
      "secret": false,
      "strategy": "default",
      "default": "logto"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Postgres superuser name. Logto connects with these credentials.",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Postgres password. Default literal 'postgres' so a fresh template deploy authenticates out of the box. Rotate this in the dashboard AND update the Logto DB_URL to match before production.",
      "secret": true,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "PORT",
      "service": "Logto Core",
      "description": "Port for the Logto core API.",
      "secret": false,
      "strategy": "default",
      "default": "3001"
    },
    {
      "key": "DB_URL",
      "service": "Logto Core",
      "description": "PostgreSQL connection string for Logto. Points at the sibling Postgres service (POSTGRES_DB=logto). Password must match POSTGRES_PASSWORD on the Postgres service.",
      "secret": false,
      "strategy": "default",
      "default": "postgresql://postgres:postgres@postgres.railway.internal:5432/logto"
    },
    {
      "key": "ENDPOINT",
      "service": "Logto Core",
      "description": "Public URL for the Logto core API (e.g. https://logto-auth.up.railway.app). Auto-detected from Railway domain.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "ADMIN_ENDPOINT",
      "service": "Logto Core",
      "description": "Public URL for the Admin Console service (e.g. https://logto-admin.up.railway.app). Required for admin console to load correctly.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "TRUST_PROXY_HEADER",
      "service": "Logto Core",
      "description": "Set to '1' when behind HTTPS proxy (default on Railway).",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "ADMIN_DISABLE_LOCALHOST",
      "service": "Logto Core",
      "description": "Set to '1' to disable localhost-only admin access (required when Admin Console is on a separate public domain).",
      "secret": false,
      "strategy": "default",
      "default": "1"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "logto-1"
      }
    },
    "cli": "railway deploy --template logto-1",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "7e976d6b-8a93-4ff8-bb6a-555a7af12e33",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "1297228a-16e3-417d-a1dd-00c872a82c4a": {
                  "icon": "https://avatars.githubusercontent.com/u/84981374",
                  "name": "Logto Admin",
                  "deploy": {
                    "startCommand": "sh -c \"npm run cli db seed -- --swe; npm run alteration deploy latest; npm start\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "svhd/logto:latest"
                  },
                  "variables": {
                    "DB_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string for Logto Admin. Points at the sibling Postgres service (POSTGRES_DB=logto). Password must match POSTGRES_PASSWORD on the Postgres service.",
                      "defaultValue": "postgresql://postgres:postgres@postgres.railway.internal:5432/logto"
                    },
                    "ENDPOINT": {
                      "isOptional": false,
                      "description": "Public URL for the Logto core API (e.g. https://logto-auth.up.railway.app). Auto-detected from Railway domain ",
                      "defaultValue": "${{\"Logto Core\".ENDPOINT}}"
                    },
                    "ADMIN_PORT": {
                      "isOptional": false,
                      "description": "Port for the Logto Admin Console. Logto starts the admin console on this port when ADMIN_PORT is set.",
                      "defaultValue": "3002"
                    },
                    "ADMIN_ENDPOINT": {
                      "isOptional": false,
                      "description": "Public URL for this Admin Console service. Auto-detected from Railway domain",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "TRUST_PROXY_HEADER": {
                      "isOptional": false,
                      "description": "Set to '1' when behind HTTPS proxy (default on Railway).",
                      "defaultValue": "1"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                },
                "62bc51c8-645d-475b-ab57-4c7e29083e98": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:17-alpine"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Postgres data directory. Must be a subdirectory of the volume mount path (/var/lib/postgresql/data) so lost+found stays outside PGDATA.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Initial database created on first boot. Must match the database name in Logto's DB_URL.",
                      "defaultValue": "logto"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Postgres superuser name. Logto connects with these credentials.",
                      "defaultValue": "postgres"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Postgres password. Default literal 'postgres' so a fresh template deploy authenticates out of the box. Rotate this in the dashboard AND update the Logto DB_URL to match before production.",
                      "defaultValue": "postgres"
                    }
                  },
                  "volumeMounts": {
                    "62bc51c8-645d-475b-ab57-4c7e29083e98": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "95f2fbf4-6ee4-4ff2-b389-d4c7b6a794cb": {
                  "icon": "https://avatars.githubusercontent.com/u/84981374",
                  "name": "Logto Core",
                  "deploy": {
                    "startCommand": "sh -c \"npm run cli db seed -- --swe; npm run alteration deploy latest; npm start\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "svhd/logto:latest"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port for the Logto core API.",
                      "defaultValue": "3001"
                    },
                    "DB_URL": {
                      "isOptional": false,
                      "description": "PostgreSQL connection string for Logto. Points at the sibling Postgres service (POSTGRES_DB=logto). Password must match POSTGRES_PASSWORD on the Postgres service.",
                      "defaultValue": "postgresql://postgres:postgres@postgres.railway.internal:5432/logto"
                    },
                    "ENDPOINT": {
                      "isOptional": false,
                      "description": "Public URL for the Logto core API (e.g. https://logto-auth.up.railway.app). Auto-detected from Railway domain.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "ADMIN_ENDPOINT": {
                      "isOptional": false,
                      "description": "Public URL for the Admin Console service (e.g. https://logto-admin.up.railway.app). Required for admin console to load correctly.",
                      "defaultValue": "https://${{\"Logto Admin\".RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "TRUST_PROXY_HEADER": {
                      "isOptional": false,
                      "description": "Set to '1' when behind HTTPS proxy (default on Railway).",
                      "defaultValue": "1"
                    },
                    "ADMIN_DISABLE_LOCALHOST": {
                      "isOptional": false,
                      "description": "Set to '1' to disable localhost-only admin access (required when Admin Console is on a separate public domain).",
                      "defaultValue": "1"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-06T05:54:15.658Z",
  "generator_version": "0.1.0"
}
