{
  "manifest_version": "1.0.0",
  "template": {
    "id": "1895f46a-6d02-4e1a-b792-7ab0e29d2b60",
    "slug": "keystone",
    "name": "Keystone",
    "description": "Headless CMS that builds a GraphQL API from a TypeScript schema",
    "url": "https://railway.com/deploy/keystone",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/keystone-railway"
    }
  },
  "services": [
    {
      "name": "Postgres",
      "source": {
        "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "keystone",
      "source": {
        "repo": "https://github.com/gridalpha/keystone-railway"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Cluster location on the volume",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "PGHOST",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGPORT",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGUSER",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGDATABASE",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PGPASSWORD",
      "service": "Postgres",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Database created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "DATABASE_URL",
      "service": "Postgres",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Superuser created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "postgres"
    },
    {
      "key": "SSL_CERT_DAYS",
      "service": "Postgres",
      "description": "SSL certificate expiry in days",
      "secret": false,
      "strategy": "default",
      "default": "820"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Superuser password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "Postgres",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "60"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Auth password, read by the server",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "keystone",
      "description": "HTTP server listening port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "REDIS_URL",
      "service": "keystone",
      "description": "Redis session store connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_BUCKET",
      "service": "keystone",
      "description": "Bucket receiving image and file uploads",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_REGION",
      "service": "keystone",
      "description": "Bucket placement region",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ADMIN_NAME",
      "service": "keystone",
      "description": "Display name for the first administrator",
      "secret": false,
      "strategy": "default",
      "default": "Admin"
    },
    {
      "key": "ADMIN_EMAIL",
      "service": "keystone",
      "description": "First administrator's sign-in email",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "S3_ENDPOINT",
      "service": "keystone",
      "description": "Object storage endpoint URL",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "keystone",
      "description": "Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "ADMIN_PASSWORD",
      "service": "keystone",
      "description": "First administrator's password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SESSION_SECRET",
      "service": "keystone",
      "description": "Signs session cookies, 32+ characters",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "SESSION_MAX_AGE",
      "service": "keystone",
      "description": "Session lifetime in seconds",
      "secret": false,
      "strategy": "default",
      "default": "2592000"
    },
    {
      "key": "S3_ACCESS_KEY_ID",
      "service": "keystone",
      "description": "Object storage access key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "GRAPHQL_PLAYGROUND",
      "service": "keystone",
      "description": "Set true to expose Apollo landing page",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "MAX_FILE_SIZE_BYTES",
      "service": "keystone",
      "description": "Upload size ceiling in bytes",
      "secret": false,
      "strategy": "default",
      "default": "52428800"
    },
    {
      "key": "S3_FORCE_PATH_STYLE",
      "service": "keystone",
      "description": "Path-style addressing, required here",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "S3_SECRET_ACCESS_KEY",
      "service": "keystone",
      "description": "Object storage secret key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_SIGNED_URL_EXPIRY_SECONDS",
      "service": "keystone",
      "description": "Lifetime of presigned asset URLs",
      "secret": false,
      "strategy": "default",
      "default": "3600"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "keystone"
      }
    },
    "cli": "railway deploy --template keystone",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "1895f46a-6d02-4e1a-b792-7ab0e29d2b60",
            "serializedConfig": {
              "buckets": {
                "7d045716-6533-484f-a645-9887a4207b20": {
                  "name": "keystone-assets"
                }
              },
              "services": {
                "30378f14-8476-48ae-911f-ba7071a4dfbd": {
                  "icon": "https://devicons.railway.app/i/postgresql.svg",
                  "name": "Postgres",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/railwayapp-templates/postgres-ssl:18"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Cluster location on the volume",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "PGHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "PGPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "5432"
                    },
                    "PGUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_USER}}"
                    },
                    "PGDATABASE": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_DB}}"
                    },
                    "PGPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{POSTGRES_PASSWORD}}"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Database created on first boot",
                      "defaultValue": "railway"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Superuser created on first boot",
                      "defaultValue": "postgres"
                    },
                    "SSL_CERT_DAYS": {
                      "isOptional": false,
                      "description": "SSL certificate expiry in days",
                      "defaultValue": "820"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "30378f14-8476-48ae-911f-ba7071a4dfbd": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "56206797-0e09-4b60-90c3-59d7feb74d0b": {
                  "icon": "https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Auth password, read by the server",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "56206797-0e09-4b60-90c3-59d7feb74d0b": {
                      "mountPath": "/data"
                    }
                  }
                },
                "c79b58dd-5b62-4087-9a8d-fe6b4f281c89": {
                  "icon": "https://raw.githubusercontent.com/keystonejs/keystone/main/docs/public/apple-touch-icon.png",
                  "name": "keystone",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/keystone-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP server listening port",
                      "defaultValue": "3000"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Redis session store connection string",
                      "defaultValue": "${{Redis.REDIS_URL}}"
                    },
                    "S3_BUCKET": {
                      "isOptional": false,
                      "description": "Bucket receiving image and file uploads",
                      "defaultValue": "${{keystone-assets.BUCKET}}"
                    },
                    "S3_REGION": {
                      "isOptional": false,
                      "description": "Bucket placement region",
                      "defaultValue": "${{keystone-assets.REGION}}"
                    },
                    "ADMIN_NAME": {
                      "isOptional": false,
                      "description": "Display name for the first administrator",
                      "defaultValue": "Admin"
                    },
                    "ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "First administrator's sign-in email",
                      "defaultValue": "admin@example.com"
                    },
                    "S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "Object storage endpoint URL",
                      "defaultValue": "${{keystone-assets.ENDPOINT}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "First administrator's password",
                      "defaultValue": "{{ADMIN_PASSWORD}}"
                    },
                    "SESSION_SECRET": {
                      "isOptional": false,
                      "description": "Signs session cookies, 32+ characters",
                      "defaultValue": "{{SESSION_SECRET}}"
                    },
                    "SESSION_MAX_AGE": {
                      "isOptional": false,
                      "description": "Session lifetime in seconds",
                      "defaultValue": "2592000"
                    },
                    "S3_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Object storage access key",
                      "defaultValue": "${{keystone-assets.ACCESS_KEY_ID}}"
                    },
                    "GRAPHQL_PLAYGROUND": {
                      "isOptional": false,
                      "description": "Set true to expose Apollo landing page",
                      "defaultValue": "false"
                    },
                    "MAX_FILE_SIZE_BYTES": {
                      "isOptional": false,
                      "description": "Upload size ceiling in bytes",
                      "defaultValue": "52428800"
                    },
                    "S3_FORCE_PATH_STYLE": {
                      "description": "Path-style addressing, required here",
                      "defaultValue": "true"
                    },
                    "S3_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Object storage secret key",
                      "defaultValue": "${{keystone-assets.SECRET_ACCESS_KEY}}"
                    },
                    "S3_SIGNED_URL_EXPIRY_SECONDS": {
                      "isOptional": false,
                      "description": "Lifetime of presigned asset URLs",
                      "defaultValue": "3600"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-20T10:14:37.339Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-19T13:09:40.318Z",
  "success_rate_30d": 0.1667,
  "validation": {
    "last_run_id": "run_2de0d4d9aeff48bdadf1",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": false,
        "detail": "Your workspace has been restricted. Please contact support to resolve this."
      }
    ],
    "typical_ready_seconds": 118
  }
}
