{
  "manifest_version": "1.0.0",
  "template": {
    "id": "b37e2971-a1a9-45f8-8fcf-131d545e63ba",
    "slug": "opencode-web",
    "name": "OpenCode Web",
    "description": "OpenCode's web UI with a password, your projects and logins on a volume",
    "url": "https://railway.com/deploy/opencode-web",
    "upstream": {
      "repo_url": "https://github.com/dektionstudio/railway-template-images"
    }
  },
  "services": [
    {
      "name": "opencode",
      "source": {
        "repo": "https://github.com/dektionstudio/railway-template-images"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/dev",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "opencode",
      "description": "Port of the OpenCode web UI",
      "secret": false,
      "strategy": "default",
      "default": "4096"
    },
    {
      "key": "OPENCODE_URL",
      "service": "opencode",
      "description": "Open this and log in with the username and password above",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "OPENCODE_VERSION",
      "service": "opencode",
      "description": "OpenCode version, used at build time. Change it and redeploy to upgrade",
      "secret": false,
      "strategy": "default",
      "default": "1.18.32"
    },
    {
      "key": "OPENCODE_SERVER_PASSWORD",
      "service": "opencode",
      "description": "Login password (generated)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "OPENCODE_SERVER_USERNAME",
      "service": "opencode",
      "description": "Login username",
      "secret": false,
      "strategy": "default",
      "default": "opencode"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "opencode-web"
      }
    },
    "cli": "railway deploy --template opencode-web",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "b37e2971-a1a9-45f8-8fcf-131d545e63ba",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "5ca7d266-a253-406f-8968-2559eb63dc9d": {
                  "icon": "https://raw.githubusercontent.com/anomalyco/opencode/34aa427434b054afcce7184764aa681159b5d769/packages/console/app/src/asset/brand/opencode-logo-dark-square.png",
                  "name": "opencode",
                  "deploy": {
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "dektionstudio/railway-template-images",
                    "rootDirectory": "/opencode"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port of the OpenCode web UI",
                      "defaultValue": "4096"
                    },
                    "OPENCODE_URL": {
                      "isOptional": false,
                      "description": "Open this and log in with the username and password above",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "GIT_USER_NAME": {
                      "isOptional": true,
                      "description": "Optional: name for commits the agent makes",
                      "defaultValue": ""
                    },
                    "GIT_USER_EMAIL": {
                      "isOptional": true,
                      "description": "Optional: email for commits the agent makes",
                      "defaultValue": ""
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "Optional: OpenAI API key",
                      "defaultValue": ""
                    },
                    "OPENCODE_VERSION": {
                      "isOptional": false,
                      "description": "OpenCode version, used at build time. Change it and redeploy to upgrade",
                      "defaultValue": "1.18.32"
                    },
                    "ANTHROPIC_API_KEY": {
                      "isOptional": true,
                      "description": "Optional: Anthropic API key",
                      "defaultValue": ""
                    },
                    "OPENROUTER_API_KEY": {
                      "isOptional": true,
                      "description": "Optional: OpenRouter key. Or connect providers from the web UI",
                      "defaultValue": ""
                    },
                    "OPENCODE_SERVER_PASSWORD": {
                      "isOptional": false,
                      "description": "Login password (generated)",
                      "defaultValue": "{{OPENCODE_SERVER_PASSWORD}}"
                    },
                    "OPENCODE_SERVER_USERNAME": {
                      "isOptional": false,
                      "description": "Login username",
                      "defaultValue": "opencode"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:4096": {
                        "port": 4096
                      }
                    }
                  },
                  "volumeMounts": {
                    "76273f42-3253-47c6-89c8-43d55b82ceb0": {
                      "mountPath": "/home/dev"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-25T16:14:54.488Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-25T15:51:08.589Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_76377f0279c440489573",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 99,
    "typical_build_seconds": 61,
    "typical_start_seconds": 20,
    "slowest_service": "opencode"
  }
}
