{
  "manifest_version": "1.0.0",
  "template": {
    "id": "1f7ba824-8ef1-440c-9e4c-4efebd5fee56",
    "slug": "payload-cms",
    "name": "Payload",
    "description": "Headless CMS for managing content behind a REST and GraphQL API",
    "url": "https://railway.com/deploy/payload-cms",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/payload-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": "payload",
      "source": {
        "repo": "https://github.com/gridalpha/payload-railway"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "payload-jobs",
      "source": {
        "repo": "https://github.com/gridalpha/payload-railway"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "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, read by the server",
      "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": "PORT",
      "service": "payload",
      "description": "HTTP listening port",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "S3_BUCKET",
      "service": "payload",
      "description": "Upload bucket name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_REGION",
      "service": "payload",
      "description": "Bucket placement region",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_ENDPOINT",
      "service": "payload",
      "description": "Bucket endpoint, scheme included",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "payload",
      "description": "Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PAYLOAD_ROLE",
      "service": "payload",
      "description": "Serves admin panel and APIs",
      "secret": false,
      "strategy": "default",
      "default": "web"
    },
    {
      "key": "PAYLOAD_SECRET",
      "service": "payload",
      "description": "Signs tokens, encrypts credentials",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "S3_ACCESS_KEY_ID",
      "service": "payload",
      "description": "Bucket access key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PAYLOAD_ADMIN_EMAIL",
      "service": "payload",
      "description": "First admin, seeded once",
      "secret": false,
      "strategy": "default",
      "default": "admin@example.com"
    },
    {
      "key": "S3_SECRET_ACCESS_KEY",
      "service": "payload",
      "description": "Bucket secret key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PAYLOAD_ADMIN_PASSWORD",
      "service": "payload",
      "description": "First admin password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "S3_BUCKET",
      "service": "payload-jobs",
      "description": "Upload bucket name",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_REGION",
      "service": "payload-jobs",
      "description": "Bucket placement region",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_ENDPOINT",
      "service": "payload-jobs",
      "description": "Bucket endpoint, scheme included",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "DATABASE_URL",
      "service": "payload-jobs",
      "description": "Postgres connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PAYLOAD_ROLE",
      "service": "payload-jobs",
      "description": "Runs the queue, no web server",
      "secret": false,
      "strategy": "default",
      "default": "jobs"
    },
    {
      "key": "PAYLOAD_SECRET",
      "service": "payload-jobs",
      "description": "Must match the web service",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "S3_ACCESS_KEY_ID",
      "service": "payload-jobs",
      "description": "Bucket access key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PAYLOAD_JOBS_CRON",
      "service": "payload-jobs",
      "description": "Queue drain schedule",
      "secret": false,
      "strategy": "default",
      "default": "* * * * *"
    },
    {
      "key": "S3_SECRET_ACCESS_KEY",
      "service": "payload-jobs",
      "description": "Bucket secret key",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "PAYLOAD_PUBLIC_SERVER_URL",
      "service": "payload-jobs",
      "description": "Public URL for generated links",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "payload-cms"
      }
    },
    "cli": "railway deploy --template payload-cms",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "1f7ba824-8ef1-440c-9e4c-4efebd5fee56",
            "serializedConfig": {
              "buckets": {
                "6bf56ac0-04e5-4c8a-858c-28e02e1ab7ad": {
                  "name": "payload-media"
                }
              },
              "services": {
                "282fa8cc-5fbb-46c9-8a55-1c72904abe96": {
                  "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, read by the server",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "60"
                    }
                  },
                  "volumeMounts": {
                    "282fa8cc-5fbb-46c9-8a55-1c72904abe96": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "2d1ba4be-78cb-4d25-8d6c-650ac3c62a69": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/payload-light.svg",
                  "name": "payload",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/payload-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP listening port",
                      "defaultValue": "3000"
                    },
                    "S3_BUCKET": {
                      "isOptional": false,
                      "description": "Upload bucket name",
                      "defaultValue": "${{payload-media.BUCKET}}"
                    },
                    "S3_REGION": {
                      "isOptional": false,
                      "description": "Bucket placement region",
                      "defaultValue": "${{payload-media.REGION}}"
                    },
                    "S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "Bucket endpoint, scheme included",
                      "defaultValue": "${{payload-media.ENDPOINT}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "PAYLOAD_ROLE": {
                      "isOptional": false,
                      "description": "Serves admin panel and APIs",
                      "defaultValue": "web"
                    },
                    "PAYLOAD_SECRET": {
                      "isOptional": false,
                      "description": "Signs tokens, encrypts credentials",
                      "defaultValue": "{{PAYLOAD_SECRET}}"
                    },
                    "S3_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Bucket access key",
                      "defaultValue": "${{payload-media.ACCESS_KEY_ID}}"
                    },
                    "PAYLOAD_ADMIN_EMAIL": {
                      "isOptional": false,
                      "description": "First admin, seeded once",
                      "defaultValue": "admin@example.com"
                    },
                    "S3_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Bucket secret key",
                      "defaultValue": "${{payload-media.SECRET_ACCESS_KEY}}"
                    },
                    "PAYLOAD_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "description": "First admin password",
                      "defaultValue": "{{PAYLOAD_ADMIN_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  }
                },
                "8690224f-d671-44a9-a8ba-acf9bef9f5fb": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/payload-light.svg",
                  "name": "payload-jobs",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/payload-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "S3_BUCKET": {
                      "isOptional": false,
                      "description": "Upload bucket name",
                      "defaultValue": "${{payload-media.BUCKET}}"
                    },
                    "S3_REGION": {
                      "isOptional": false,
                      "description": "Bucket placement region",
                      "defaultValue": "${{payload-media.REGION}}"
                    },
                    "S3_ENDPOINT": {
                      "isOptional": false,
                      "description": "Bucket endpoint, scheme included",
                      "defaultValue": "${{payload-media.ENDPOINT}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Postgres connection string",
                      "defaultValue": "${{Postgres.DATABASE_URL}}"
                    },
                    "PAYLOAD_ROLE": {
                      "isOptional": false,
                      "description": "Runs the queue, no web server",
                      "defaultValue": "jobs"
                    },
                    "PAYLOAD_SECRET": {
                      "isOptional": false,
                      "description": "Must match the web service",
                      "defaultValue": "${{payload.PAYLOAD_SECRET}}"
                    },
                    "S3_ACCESS_KEY_ID": {
                      "isOptional": false,
                      "description": "Bucket access key",
                      "defaultValue": "${{payload-media.ACCESS_KEY_ID}}"
                    },
                    "PAYLOAD_JOBS_CRON": {
                      "isOptional": false,
                      "description": "Queue drain schedule",
                      "defaultValue": "* * * * *"
                    },
                    "S3_SECRET_ACCESS_KEY": {
                      "isOptional": false,
                      "description": "Bucket secret key",
                      "defaultValue": "${{payload-media.SECRET_ACCESS_KEY}}"
                    },
                    "PAYLOAD_PUBLIC_SERVER_URL": {
                      "isOptional": false,
                      "description": "Public URL for generated links",
                      "defaultValue": "https://${{payload.RAILWAY_PUBLIC_DOMAIN}}"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "payload",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "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:41:45.783Z",
  "success_rate_30d": 0.1667,
  "validation": {
    "last_run_id": "run_7f7acadb630f4e8cb673",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": false,
        "detail": "Your workspace has been restricted. Please contact support to resolve this."
      }
    ],
    "typical_ready_seconds": 175
  }
}
