{
  "manifest_version": "1.0.0",
  "template": {
    "id": "8ff989cd-cba3-4577-9fa1-d370ec18180f",
    "slug": "ubuntu-2404-cloud-dev-box-web-terminal-c",
    "name": "Ubuntu 24.04 Cloud Dev Box (Web Terminal + Claude Code, Codex, Gemini CLI)",
    "description": "Persistent Ubuntu web terminal with Claude Code, Codex & Gemini CLI",
    "url": "https://railway.com/deploy/ubuntu-2404-cloud-dev-box-web-terminal-c",
    "upstream": {
      "image": "ubuntu:24.04"
    }
  },
  "services": [
    {
      "name": "Ubuntu Dev Box",
      "source": {
        "image": "ubuntu:24.04"
      },
      "needs_volume": true,
      "volume_mount_path": "/root",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Ubuntu Dev Box",
      "description": "Port the web terminal listens on",
      "secret": false,
      "strategy": "default",
      "default": "7681"
    },
    {
      "key": "PASSWORD",
      "service": "Ubuntu Dev Box",
      "description": "Login password for the web terminal (generated - copy it from here)",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "USERNAME",
      "service": "Ubuntu Dev Box",
      "description": "Login username for the web terminal",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "ubuntu-2404-cloud-dev-box-web-terminal-c"
      }
    },
    "cli": "railway deploy --template ubuntu-2404-cloud-dev-box-web-terminal-c",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "8ff989cd-cba3-4577-9fa1-d370ec18180f",
            "serializedConfig": {
              "services": {
                "16e1ccc2-aad8-4a86-9775-b9c61cb3ad68": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/ubuntu-linux.svg",
                  "name": "Ubuntu Dev Box",
                  "build": {},
                  "deploy": {
                    "startCommand": "bash -c 'set +e\nexport DEBIAN_FRONTEND=noninteractive\nBIN=/root/.local/bin; mkdir -p \"$BIN\" /root/workspace\nexport PATH=\"$BIN:$PATH\"\nif [ ! -x \"$BIN/ttyd\" ]; then\n  echo \"[boot] fetching web terminal...\"\n  (command -v curl >/dev/null 2>&1 || (apt-get update -qq && apt-get install -y -qq curl ca-certificates)) >/dev/null 2>&1\n  ARCH=$(uname -m); case \"$ARCH\" in aarch64|arm64) TA=aarch64;; *) TA=x86_64;; esac\n  curl -fsSL -o \"$BIN/ttyd\" \"https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.$TA\" && chmod +x \"$BIN/ttyd\" || echo \"[boot] ttyd download failed\"\nfi\nif [ ! -f /root/.tools-installed ]; then\n  echo \"[boot] installing tools (first boot only, may take a few minutes)...\"\n  (apt-get update -qq && apt-get install -y -qq curl wget git vim nano htop tmux unzip zip jq ca-certificates gnupg build-essential python3 python3-pip python3-venv openssh-client sudo ripgrep) >/tmp/apt.log 2>&1 && touch /root/.tools-installed || { echo \"[boot] some packages failed; see /tmp/apt.log\"; tail -n 5 /tmp/apt.log; }\nfi\nif [ ! -f /root/.ai-clis-installed ]; then\n  echo \"[boot] installing Node 22 + AI coding CLIs...\"\n  (curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && apt-get install -y -qq nodejs && npm install -g --silent @anthropic-ai/claude-code @openai/codex @google/gemini-cli) >/tmp/node.log 2>&1 && touch /root/.ai-clis-installed || { echo \"[boot] AI CLI install issue; see /tmp/node.log\"; tail -n 5 /tmp/node.log; }\nfi\n[ -n \"$GIT_USER_NAME\" ] && git config --global user.name \"$GIT_USER_NAME\"\n[ -n \"$GIT_USER_EMAIL\" ] && git config --global user.email \"$GIT_USER_EMAIL\"\ntouch /root/.bashrc\ngrep -q \"railway-box\" /root/.bashrc || cat >> /root/.bashrc <<\"BASHRC\"\n# railway-box\nexport PATH=\"/root/.local/bin:$PATH\"\nexport PS1=\"\\[\\e[1;32m\\]\\u@railway\\[\\e[0m\\]:\\[\\e[1;34m\\]\\w\\[\\e[0m\\]\\$ \"\ncd /root/workspace\necho \"Ubuntu dev box | CLIs: claude, codex, gemini | files persist in /root\"\nBASHRC\nif [ ! -x \"$BIN/ttyd\" ]; then echo \"[boot] FATAL: web terminal binary missing; idling so you can inspect logs\"; sleep infinity; fi\necho \"[boot] terminal ready on port $PORT\"\nexec \"$BIN/ttyd\" -p \"$PORT\" -W -c \"$USERNAME:$PASSWORD\" -t fontSize=14 -t titleFixed=\"Ubuntu Dev Box\" bash -l'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS"
                  },
                  "source": {
                    "image": "ubuntu:24.04"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Port the web terminal listens on",
                      "defaultValue": "7681"
                    },
                    "PASSWORD": {
                      "isOptional": false,
                      "description": "Login password for the web terminal (generated - copy it from here)",
                      "defaultValue": "{{PASSWORD}}"
                    },
                    "USERNAME": {
                      "isOptional": false,
                      "description": "Login username for the web terminal",
                      "defaultValue": "admin"
                    },
                    "GIT_USER_NAME": {
                      "isOptional": true,
                      "description": "Optional: git config user.name",
                      "defaultValue": ""
                    },
                    "GEMINI_API_KEY": {
                      "isOptional": true,
                      "description": "Optional: API key for Gemini CLI",
                      "defaultValue": ""
                    },
                    "GIT_USER_EMAIL": {
                      "isOptional": true,
                      "description": "Optional: git config user.email",
                      "defaultValue": ""
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "Optional: API key for Codex CLI",
                      "defaultValue": ""
                    },
                    "ANTHROPIC_API_KEY": {
                      "isOptional": true,
                      "description": "Optional: API key so Claude Code works without /login",
                      "defaultValue": ""
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>:7681": {}
                    }
                  },
                  "volumeMounts": {
                    "3348871b-c451-4f24-b60e-5656154f8282": {
                      "mountPath": "/root"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-17T22:14:38.342Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-17T19:54:23.761Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_72c04efac36c4c85a967",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 48,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "Ubuntu Dev Box"
  }
}
