{
  "manifest_version": "1.0.0",
  "template": {
    "id": "84eaad68-4b82-4232-bb39-3f3d07b834e6",
    "slug": "opencode-cloud",
    "name": "OpenCode | AI Coding Agent in Your Browser, Free Models Included",
    "description": "Open-source AI coding agent in your browser. Free models, SSH, saved home.",
    "url": "https://railway.com/deploy/opencode-cloud",
    "upstream": {
      "repo_url": "https://github.com/nomideusz/opencode-railway"
    }
  },
  "services": [
    {
      "name": "OpenCode",
      "source": {
        "repo": "https://github.com/nomideusz/opencode-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/root",
      "tcp_ports": [
        22
      ],
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "TZ",
      "service": "OpenCode",
      "description": "Time zone inside the box.",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "PORT",
      "service": "OpenCode",
      "description": "Port of the web UI. Do not change.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "ROOT_PASSWORD",
      "service": "OpenCode",
      "description": "Password for ssh root@<tcp-proxy-host> -p <port>. Clear it for key-only SSH login.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "OPENCODE_SERVER_PASSWORD",
      "service": "OpenCode",
      "description": "Password for the web UI login. It gates an agent with a root shell - keep it strong.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "OPENCODE_SERVER_USERNAME",
      "service": "OpenCode",
      "description": "Username for the web UI login.",
      "secret": false,
      "strategy": "default",
      "default": "opencode"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "opencode-cloud"
      }
    },
    "cli": "railway deploy --template opencode-cloud",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "84eaad68-4b82-4232-bb39-3f3d07b834e6",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "094894f9-5041-43c5-ba25-4971b31ac2d4": {
                  "icon": "https://raw.githubusercontent.com/nomideusz/opencode-railway/main/icon.svg",
                  "name": "OpenCode",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthcheck",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/opencode-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "TZ": {
                      "isOptional": false,
                      "description": "Time zone inside the box.",
                      "defaultValue": "UTC"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "Port of the web UI. Do not change.",
                      "defaultValue": "8080"
                    },
                    "GH_TOKEN": {
                      "isOptional": true,
                      "description": "Optional. GitHub token so gh, git clone of private repos and git push work without a login.",
                      "defaultValue": ""
                    },
                    "ROOT_PASSWORD": {
                      "isOptional": true,
                      "description": "Password for ssh root@<tcp-proxy-host> -p <port>. Clear it for key-only SSH login.",
                      "defaultValue": "{{ROOT_PASSWORD}}"
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "Optional. OpenAI models.",
                      "defaultValue": ""
                    },
                    "AUTHORIZED_KEYS": {
                      "isOptional": true,
                      "description": "SSH public key(s), one per line, for key-based root login.",
                      "defaultValue": ""
                    },
                    "ANTHROPIC_API_KEY": {
                      "isOptional": true,
                      "description": "Optional. Claude models. Leave empty to use the free OpenCode Zen models or connect a provider in the UI.",
                      "defaultValue": ""
                    },
                    "OPENROUTER_API_KEY": {
                      "isOptional": true,
                      "description": "Optional. OpenRouter, for hundreds of models behind one key.",
                      "defaultValue": ""
                    },
                    "OPENCODE_SERVER_PASSWORD": {
                      "isOptional": false,
                      "description": "Password for the web UI login. It gates an agent with a root shell - keep it strong.",
                      "defaultValue": "{{OPENCODE_SERVER_PASSWORD}}"
                    },
                    "OPENCODE_SERVER_USERNAME": {
                      "isOptional": false,
                      "description": "Username for the web UI login.",
                      "defaultValue": "opencode"
                    }
                  },
                  "networking": {
                    "tcpProxies": {
                      "22": {}
                    },
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "094894f9-5041-43c5-ba25-4971b31ac2d4": {
                      "mountPath": "/root"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "OpenCode",
      "method": "GET",
      "path": "/healthcheck",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-29T22:14:51.071Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-29T21:34:32.205Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_bf06df37f1874271ba18",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 162,
    "typical_build_seconds": 93,
    "typical_start_seconds": 20,
    "slowest_service": "OpenCode"
  }
}
