{
  "manifest_version": "1.0.0",
  "template": {
    "id": "78c823af-062f-4abb-8c09-20b2896bd951",
    "slug": "siyuan-2",
    "name": "SiYuan",
    "description": "Privacy-first personal knowledge management (unofficial SiYuan)",
    "url": "https://railway.com/deploy/siyuan-2",
    "upstream": {
      "image": "b3log/siyuan:v3.8.5"
    }
  },
  "services": [
    {
      "name": "b3log/siyuan:v3.8.5",
      "source": {
        "image": "b3log/siyuan:v3.8.5"
      },
      "needs_volume": true,
      "volume_mount_path": "/siyuan/workspace",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "TZ",
      "service": "b3log/siyuan:v3.8.5",
      "description": "Timezone for the SiYuan process, as an IANA name (for example Europe/London). Defaults to UTC.",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "PGID",
      "service": "b3log/siyuan:v3.8.5",
      "description": "Group ID the SiYuan process runs as inside the container. Leave at 1000; the image entrypoint sets workspace ownership to PUID/PGID.",
      "secret": false,
      "strategy": "default",
      "default": "1000"
    },
    {
      "key": "PORT",
      "service": "b3log/siyuan:v3.8.5",
      "description": "Port the SiYuan kernel listens on (6806). Railway routes the public domain to this port; do not change it.",
      "secret": false,
      "strategy": "default",
      "default": "6806"
    },
    {
      "key": "PUID",
      "service": "b3log/siyuan:v3.8.5",
      "description": "User ID the SiYuan process runs as inside the container. Leave at 1000; the image entrypoint sets workspace ownership to PUID/PGID.",
      "secret": false,
      "strategy": "default",
      "default": "1000"
    },
    {
      "key": "SIYUAN_WORKSPACE_PATH",
      "service": "b3log/siyuan:v3.8.5",
      "description": "Directory where SiYuan stores your notes and settings. This is the mounted volume path; do not change it or data will not persist.",
      "secret": false,
      "strategy": "default",
      "default": "/siyuan/workspace"
    },
    {
      "key": "SIYUAN_ACCESS_AUTH_CODE",
      "service": "b3log/siyuan:v3.8.5",
      "description": "Lock-screen password for your SiYuan instance, auto-generated (24 characters) at deploy. Find it in this service's Variables tab and enter it on the lock screen. Do not remove it.",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "siyuan-2"
      }
    },
    "cli": "railway deploy --template siyuan-2",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "78c823af-062f-4abb-8c09-20b2896bd951",
            "serializedConfig": {
              "services": {
                "f378a482-8925-4cdf-aa18-5bae2b7b8947": {
                  "name": "b3log/siyuan:v3.8.5",
                  "deploy": {
                    "healthcheckPath": "/api/system/version"
                  },
                  "source": {
                    "image": "b3log/siyuan:v3.8.5"
                  },
                  "variables": {
                    "TZ": {
                      "description": "Timezone for the SiYuan process, as an IANA name (for example Europe/London). Defaults to UTC.",
                      "defaultValue": "UTC"
                    },
                    "PGID": {
                      "description": "Group ID the SiYuan process runs as inside the container. Leave at 1000; the image entrypoint sets workspace ownership to PUID/PGID.",
                      "defaultValue": "1000"
                    },
                    "PORT": {
                      "description": "Port the SiYuan kernel listens on (6806). Railway routes the public domain to this port; do not change it.",
                      "defaultValue": "6806"
                    },
                    "PUID": {
                      "description": "User ID the SiYuan process runs as inside the container. Leave at 1000; the image entrypoint sets workspace ownership to PUID/PGID.",
                      "defaultValue": "1000"
                    },
                    "SIYUAN_WORKSPACE_PATH": {
                      "description": "Directory where SiYuan stores your notes and settings. This is the mounted volume path; do not change it or data will not persist.",
                      "defaultValue": "/siyuan/workspace"
                    },
                    "SIYUAN_ACCESS_AUTH_CODE": {
                      "description": "Lock-screen password for your SiYuan instance, auto-generated (24 characters) at deploy. Find it in this service's Variables tab and enter it on the lock screen. Do not remove it.",
                      "defaultValue": "{{SIYUAN_ACCESS_AUTH_CODE}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:6806": {
                        "port": 6806
                      }
                    }
                  },
                  "volumeMounts": {
                    "f378a482-8925-4cdf-aa18-5bae2b7b8947": {
                      "mountPath": "/siyuan/workspace"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "b3log/siyuan:v3.8.5",
      "method": "GET",
      "path": "/api/system/version",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-29T22:14:51.071Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-29T22:07:17.037Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_1a0b00a2aabd4ec491c6",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "FAILED"
      }
    ]
  }
}
