{
  "manifest_version": "1.0.0",
  "template": {
    "id": "f91b8015-0fda-43da-b339-ec7672498529",
    "slug": "siyuan-1",
    "name": "SiYuan",
    "description": "Self-host SiYuan with secure access, persistent notes, and tested recovery.",
    "url": "https://railway.com/deploy/siyuan-1",
    "upstream": {
      "repo_url": "https://github.com/l4time/railway-siyuan-template"
    }
  },
  "services": [
    {
      "name": "siyuan",
      "source": {
        "repo": "https://github.com/l4time/railway-siyuan-template"
      },
      "needs_volume": true,
      "volume_mount_path": "/siyuan/workspace",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGID",
      "service": "siyuan",
      "description": "Group ID for the non-root SiYuan process and workspace files.",
      "secret": false,
      "strategy": "default",
      "default": "1000"
    },
    {
      "key": "PORT",
      "service": "siyuan",
      "description": "Internal HTTP port used by Railway and the SiYuan wrapper.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "PUID",
      "service": "siyuan",
      "description": "User ID for the non-root SiYuan process and workspace files.",
      "secret": false,
      "strategy": "default",
      "default": "1000"
    },
    {
      "key": "SIYUAN_WORKSPACE_PATH",
      "service": "siyuan",
      "description": "Persistent workspace directory mounted on the Railway volume.",
      "secret": false,
      "strategy": "default",
      "default": "/siyuan/workspace"
    },
    {
      "key": "SIYUAN_ACCESS_AUTH_CODE",
      "service": "siyuan",
      "description": "Generated login code for SiYuan. Save it securely after deployment.",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "SIYUAN_ACCESS_AUTH_CODE_BYPASS",
      "service": "siyuan",
      "description": "Keeps SiYuan authentication bypass disabled.",
      "secret": false,
      "strategy": "default",
      "default": "false"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "siyuan-1"
      }
    },
    "cli": "railway deploy --template siyuan-1",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "f91b8015-0fda-43da-b339-ec7672498529",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "79a5d564-4c78-4e1e-b128-1b726c80fce7": {
                  "icon": null,
                  "name": "siyuan",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "sleepApplication": false,
                    "multiRegionConfig": {
                      "europe-west4-drams3a": {
                        "numReplicas": 1
                      }
                    },
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/l4time/railway-siyuan-template",
                    "branch": "main",
                    "commitSha": "fb1ccb5f9b8088aabd45b05c7640efc80bea85f0",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PGID": {
                      "isOptional": false,
                      "description": "Group ID for the non-root SiYuan process and workspace files.",
                      "defaultValue": "1000"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "Internal HTTP port used by Railway and the SiYuan wrapper.",
                      "defaultValue": "8080"
                    },
                    "PUID": {
                      "isOptional": false,
                      "description": "User ID for the non-root SiYuan process and workspace files.",
                      "defaultValue": "1000"
                    },
                    "SIYUAN_WORKSPACE_PATH": {
                      "isOptional": false,
                      "description": "Persistent workspace directory mounted on the Railway volume.",
                      "defaultValue": "/siyuan/workspace"
                    },
                    "SIYUAN_ACCESS_AUTH_CODE": {
                      "isOptional": false,
                      "description": "Generated login code for SiYuan. Save it securely after deployment.",
                      "defaultValue": "{{SIYUAN_ACCESS_AUTH_CODE}}"
                    },
                    "SIYUAN_ACCESS_AUTH_CODE_BYPASS": {
                      "isOptional": false,
                      "description": "Keeps SiYuan authentication bypass disabled.",
                      "defaultValue": "false"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "79a5d564-4c78-4e1e-b128-1b726c80fce7": {
                      "mountPath": "/siyuan/workspace"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "siyuan",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-15T10:14:39.124Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-14T21:04:26.743Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_8356bb02346143bdac0c",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": false,
        "detail": "got 204, expected 200"
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ]
  }
}
