{
  "manifest_version": "1.0.0",
  "template": {
    "id": "9efba657-8781-4300-af93-9941c61cb08d",
    "slug": "serverbee-server",
    "name": "ServerBee Server",
    "description": "Self-hosted VPS monitoring with real-time dashboard, alerts & web terminal",
    "url": "https://railway.com/deploy/serverbee-server",
    "upstream": {
      "repo_url": "https://github.com/ZingerLittleBee/ServerBee"
    }
  },
  "services": [
    {
      "name": "ServerBee",
      "source": {
        "repo": "https://github.com/ZingerLittleBee/ServerBee"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "ServerBee",
      "description": "服务监听端口（Railway 会自动注入，默认 8080）",
      "secret": false,
      "strategy": "default",
      "default": "9527"
    },
    {
      "key": "SERVERBEE_LOG__LEVEL",
      "service": "ServerBee",
      "description": "日志级别（trace/debug/info/warn/error）",
      "secret": false,
      "strategy": "default",
      "default": "info"
    },
    {
      "key": "SERVERBEE_ADMIN__USERNAME",
      "service": "ServerBee",
      "description": "管理员用户名（未填写自动生成 admin 用户，可在日志中查看）",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "SERVERBEE_SCHEDULER__TIMEZONE",
      "service": "ServerBee",
      "description": "时区，影响流量按天聚合（如 Asia/Shanghai）",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "SERVERBEE_RETENTION__RECORDS_DAYS",
      "service": "ServerBee",
      "description": "原始指标保留天数",
      "secret": false,
      "strategy": "default",
      "default": "7"
    },
    {
      "key": "SERVERBEE_OAUTH__ALLOW_REGISTRATION",
      "service": "ServerBee",
      "description": "首次登录自动创建账号（true=开放注册，false=仅已绑定用户可登录）",
      "secret": false,
      "strategy": "default",
      "default": "false"
    },
    {
      "key": "SERVERBEE_RETENTION__AUDIT_LOGS_DAYS",
      "service": "ServerBee",
      "description": "审计日志保留天数",
      "secret": false,
      "strategy": "default",
      "default": "180"
    },
    {
      "key": "SERVERBEE_RETENTION__RECORDS_HOURLY_DAYS",
      "service": "ServerBee",
      "description": "小时聚合保留天数",
      "secret": false,
      "strategy": "default",
      "default": "90"
    },
    {
      "key": "SERVERBEE_RETENTION__SERVICE_MONITOR_DAYS",
      "service": "ServerBee",
      "description": "服务监控保留天数",
      "secret": false,
      "strategy": "default",
      "default": "30"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "serverbee-server"
      }
    },
    "cli": "railway deploy --template serverbee-server",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "9efba657-8781-4300-af93-9941c61cb08d",
            "serializedConfig": {
              "services": {
                "a41b0838-586b-4dde-a66d-5b0068a08eff": {
                  "name": "ServerBee",
                  "source": {
                    "repo": "ZingerLittleBee/ServerBee",
                    "branch": null,
                    "rootDirectory": "/deploy/railway"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": true,
                      "description": "服务监听端口（Railway 会自动注入，默认 8080）",
                      "defaultValue": "9527"
                    },
                    "SERVERBEE_LOG__LEVEL": {
                      "isOptional": true,
                      "description": "日志级别（trace/debug/info/warn/error）",
                      "defaultValue": "info"
                    },
                    "SERVERBEE_ADMIN__PASSWORD": {
                      "isOptional": true,
                      "description": "管理员密码（未填写自动生成 admin 用户，可在日志中查看）",
                      "defaultValue": ""
                    },
                    "SERVERBEE_ADMIN__USERNAME": {
                      "isOptional": true,
                      "description": "管理员用户名（未填写自动生成 admin 用户，可在日志中查看）",
                      "defaultValue": "admin"
                    },
                    "SERVERBEE_OAUTH__BASE_URL": {
                      "isOptional": true,
                      "description": "OAuth 回调公网地址（如 https://xxx.up.railway.app）",
                      "defaultValue": ""
                    },
                    "SERVERBEE_SCHEDULER__TIMEZONE": {
                      "isOptional": true,
                      "description": "时区，影响流量按天聚合（如 Asia/Shanghai）",
                      "defaultValue": "UTC"
                    },
                    "SERVERBEE_RETENTION__RECORDS_DAYS": {
                      "isOptional": true,
                      "description": "原始指标保留天数",
                      "defaultValue": "7"
                    },
                    "SERVERBEE_AUTH__AUTO_DISCOVERY_KEY": {
                      "isOptional": true,
                      "description": "自动发现密钥（未填写自动生成，可在日志中查看）",
                      "defaultValue": ""
                    },
                    "SERVERBEE_OAUTH__GITHUB__CLIENT_ID": {
                      "isOptional": true,
                      "description": "GitHub OAuth Client ID",
                      "defaultValue": ""
                    },
                    "SERVERBEE_OAUTH__ALLOW_REGISTRATION": {
                      "isOptional": true,
                      "description": "首次登录自动创建账号（true=开放注册，false=仅已绑定用户可登录）",
                      "defaultValue": "false"
                    },
                    "SERVERBEE_RETENTION__AUDIT_LOGS_DAYS": {
                      "isOptional": true,
                      "description": "审计日志保留天数",
                      "defaultValue": "180"
                    },
                    "SERVERBEE_OAUTH__GITHUB__CLIENT_SECRET": {
                      "isOptional": true,
                      "description": "GitHub OAuth Client Secret",
                      "defaultValue": ""
                    },
                    "SERVERBEE_RETENTION__RECORDS_HOURLY_DAYS": {
                      "isOptional": true,
                      "description": "小时聚合保留天数",
                      "defaultValue": "90"
                    },
                    "SERVERBEE_RETENTION__SERVICE_MONITOR_DAYS": {
                      "isOptional": true,
                      "description": "服务监控保留天数",
                      "defaultValue": "30"
                    }
                  },
                  "volumeMounts": {
                    "a41b0838-586b-4dde-a66d-5b0068a08eff": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-12T22:14:39.841Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-11T14:31:38.417Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_87eef765841649f4aca8",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 67,
    "typical_build_seconds": 11,
    "typical_start_seconds": 10,
    "slowest_service": "ServerBee"
  }
}
