{
  "manifest_version": "1.0.0",
  "template": {
    "id": "c3a2d8d7-7d85-4e2a-80f3-a4fe373ac0aa",
    "slug": "ghost-cms-deploy",
    "name": "Ghost CMS with MySQL | One-Click Deploy",
    "description": "Self Host Ghost CMS + MySQL + SMTP — publishing platform on Railway",
    "url": "https://railway.com/deploy/ghost-cms-deploy",
    "upstream": {
      "image": "ghost:alpine"
    }
  },
  "services": [
    {
      "name": "MySQL",
      "source": {
        "image": "mysql:9.4"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    },
    {
      "name": "Ghost",
      "source": {
        "image": "ghost:alpine"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/ghost/content",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "MYSQLHOST",
      "service": "MySQL",
      "description": "Internal hostname for MySQL server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLPORT",
      "service": "MySQL",
      "description": "Default MySQL server port",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MYSQLUSER",
      "service": "MySQL",
      "description": "MySQL root administrator username",
      "secret": false,
      "strategy": "default",
      "default": "root"
    },
    {
      "key": "MYSQL_URL",
      "service": "MySQL",
      "description": "Internal MySQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQLDATABASE",
      "service": "MySQL",
      "description": "MySQL database name variable",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQLPASSWORD",
      "service": "MySQL",
      "description": "Password used for MySQL authentication",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "MySQL",
      "description": "Default database created on startup",
      "secret": false,
      "strategy": "default",
      "default": "railway"
    },
    {
      "key": "MYSQL_PUBLIC_URL",
      "service": "MySQL",
      "description": "External MySQL connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "MySQL",
      "description": "Root password for MySQL server",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "url",
      "service": "Ghost",
      "description": "Public URL of Ghost site",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "PORT",
      "service": "Ghost",
      "description": "HTTP server listening port",
      "secret": false,
      "strategy": "default",
      "default": "2368"
    },
    {
      "key": "mail__transport",
      "service": "Ghost",
      "description": "Email transport method",
      "secret": false,
      "strategy": "default",
      "default": "SMTP"
    },
    {
      "key": "database__client",
      "service": "Ghost",
      "description": "Database engine used by Ghost",
      "secret": false,
      "strategy": "default",
      "default": "mysql"
    },
    {
      "key": "database__connection__host",
      "service": "Ghost",
      "description": "MySQL server hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "database__connection__port",
      "service": "Ghost",
      "description": "MySQL server listening port",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "database__connection__user",
      "service": "Ghost",
      "description": "MySQL database username",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "database__connection__database",
      "service": "Ghost",
      "description": "MySQL database name for Ghost",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "database__connection__password",
      "service": "Ghost",
      "description": "Password for MySQL authentication",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "ghost-cms-deploy"
      }
    },
    "cli": "railway deploy --template ghost-cms-deploy",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "c3a2d8d7-7d85-4e2a-80f3-a4fe373ac0aa",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "30a90e2d-8c7c-49bc-994c-c0f7c56e856f": {
                  "icon": "https://devicons.railway.app/i/mysql.svg",
                  "name": "MySQL",
                  "deploy": {
                    "startCommand": "docker-entrypoint.sh mysqld --innodb-use-native-aio=0 --disable-log-bin --performance_schema=0 --innodb-buffer-pool-size=1G",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mysql:9.4"
                  },
                  "variables": {
                    "MYSQLHOST": {
                      "isOptional": false,
                      "description": "Internal hostname for MySQL server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQLPORT": {
                      "isOptional": false,
                      "description": "Default MySQL server port",
                      "defaultValue": "3306"
                    },
                    "MYSQLUSER": {
                      "isOptional": false,
                      "description": "MySQL root administrator username",
                      "defaultValue": "root"
                    },
                    "MYSQL_URL": {
                      "isOptional": false,
                      "description": "Internal MySQL connection string",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:3306/${{MYSQL_DATABASE}}"
                    },
                    "MYSQLDATABASE": {
                      "isOptional": false,
                      "description": "MySQL database name variable",
                      "defaultValue": "${{MYSQL_DATABASE}}"
                    },
                    "MYSQLPASSWORD": {
                      "isOptional": false,
                      "description": "Password used for MySQL authentication",
                      "defaultValue": "${{MYSQL_ROOT_PASSWORD}}"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "Default database created on startup",
                      "defaultValue": "railway"
                    },
                    "MYSQL_PUBLIC_URL": {
                      "isOptional": false,
                      "description": "External MySQL connection string",
                      "defaultValue": "mysql://${{MYSQLUSER}}:${{MYSQL_ROOT_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{MYSQL_DATABASE}}"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Root password for MySQL server",
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "30a90e2d-8c7c-49bc-994c-c0f7c56e856f": {
                      "mountPath": "/var/lib/mysql"
                    }
                  },
                  "haTemplateCode": "mysql-ha",
                  "haConversionConfig": {
                    "edge": {
                      "label": "Reverse Proxies",
                      "options": [
                        1,
                        2
                      ],
                      "nodeLabel": "HAProxy",
                      "description": "HAProxy instances routing writes to the primary",
                      "defaultValue": 2
                    },
                    "replica": {
                      "label": "MySQL Replicas",
                      "options": [
                        2,
                        4,
                        6,
                        8
                      ],
                      "nodeLabel": "MySQL",
                      "description": "Requires odd count for quorum",
                      "defaultValue": 2
                    },
                    "internal": null,
                    "description": "This will convert your MySQL instance to an HA cluster with Group Replication failover and HAProxy routing to the primary.",
                    "supportedImageMajorVersions": [
                      8,
                      9
                    ]
                  }
                },
                "6fa6f6eb-3c30-4985-afab-747ae2d64f91": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/ghost-light.png",
                  "name": "Ghost",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghost:alpine"
                  },
                  "variables": {
                    "url": {
                      "isOptional": false,
                      "description": "Public URL of Ghost site",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP server listening port",
                      "defaultValue": "2368"
                    },
                    "mail__from": {
                      "isOptional": true,
                      "description": "Sender email address for Ghost",
                      "defaultValue": ""
                    },
                    "mail__transport": {
                      "isOptional": false,
                      "description": "Email transport method",
                      "defaultValue": "SMTP"
                    },
                    "database__client": {
                      "isOptional": false,
                      "description": "Database engine used by Ghost",
                      "defaultValue": "mysql"
                    },
                    "mail__options__host": {
                      "isOptional": true,
                      "description": "SMTP server hostname",
                      "defaultValue": ""
                    },
                    "mail__options__port": {
                      "isOptional": true,
                      "description": "SMTP server port",
                      "defaultValue": ""
                    },
                    "mail__options__auth__pass": {
                      "isOptional": true,
                      "description": "SMTP authentication password",
                      "defaultValue": ""
                    },
                    "mail__options__auth__user": {
                      "isOptional": true,
                      "description": "SMTP authentication username",
                      "defaultValue": ""
                    },
                    "database__connection__host": {
                      "isOptional": false,
                      "description": "MySQL server hostname",
                      "defaultValue": "${{MySQL.MYSQLHOST}}"
                    },
                    "database__connection__port": {
                      "isOptional": false,
                      "description": "MySQL server listening port",
                      "defaultValue": "${{MySQL.MYSQLPORT}}"
                    },
                    "database__connection__user": {
                      "isOptional": false,
                      "description": "MySQL database username",
                      "defaultValue": "${{MySQL.MYSQLUSER}}"
                    },
                    "database__connection__database": {
                      "isOptional": false,
                      "description": "MySQL database name for Ghost",
                      "defaultValue": "${{MySQL.MYSQLDATABASE}}"
                    },
                    "database__connection__password": {
                      "isOptional": false,
                      "description": "Password for MySQL authentication",
                      "defaultValue": "${{MySQL.MYSQLPASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "6fa6f6eb-3c30-4985-afab-747ae2d64f91": {
                      "mountPath": "/var/lib/ghost/content"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-21T16:15:12.787Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-20T17:47:58.490Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_cc564a3375bf47eb848a",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 82,
    "typical_build_seconds": 0,
    "typical_start_seconds": 20,
    "slowest_service": "Ghost"
  }
}
