Self-host OpenHands on a Cube
Run OpenHands on a Krova Cube — the open-source, self-hosted control center for coding agents and automations, with a web UI on port 8000.
OpenHands (formerly OpenDevin) is an open-source control center for coding agents and automations — a self-hosted, always-on web UI that drives coding agents against your projects. It is MIT-licensed with about 87,800 stars on GitHub (verified 2026-09-13) and ships in beta. A Cube is a good place to run it: you get a long-lived web UI with no per-seat pricing.
The install is one npm command. The part worth reading carefully is Step 5 — the web UI runs on port 8000, and a Cube has no public inbound of its own. The path is to point a domain at the Cube and let the Krova edge terminate TLS.
Before you start
OpenHands ships a Node.js CLI (@openhands/agent-canvas) plus an optional Docker image. The CLI runs the web UI directly on the host with full filesystem access; the Docker image sandboxes the agent. Pick the CLI for a quick start, Docker if you want isolation between the agent and the Cube's other workloads.
- A Cube of 2 vCPU, 4 GB RAM, 40 GB disk — about $0.0140/hour, roughly $0.34/day or $10/month if left running. Comfortable for the control plane plus a small local model.
- If you want to run a capable local model (around 7B parameters), plan on 8 GB RAM and 8 GB of disk for the model weights alone, in addition to the agent. The Cube size for that is 4 vCPU, 16 GB RAM, 100 GB disk.
- An SSH key pair, as with any Cube.
- An API key from an AI provider — or a local Ollama install if you would rather skip the paid API.
Step 1 — Create the Cube
Create a Cube with the Ubuntu 24.04 + Node 22 image. OpenHands's CLI needs Node 18+, and starting from the Node image skips the apt-install step. If your Cube image picker does not have a Node image, plain Ubuntu 24.04 works.
Size it at 2 vCPU / 4 GB / 40 GB if you are pointing OpenHands at a paid AI provider, or 4 vCPU / 16 GB / 100 GB if you want to run a local 7B model through Ollama on the same Cube.
Step 2 — Connect over SSH
ssh ubuntu@<cube-host> -p <port>Step 3 — Install the OpenHands CLI
The CLI installs globally with npm. It runs the web UI directly on the host — full filesystem access to the Cube, which is fine if this Cube is dedicated to OpenHands.
sudo npm install -g @openhands/agent-canvasConfirm:
agent-canvas --versionStep 4 — Pick the agent backend
OpenHands is agent-agnostic — it drives Claude Code, Codex, Gemini and any ACP-compatible agent through the Agent-Client Protocol. Pick one in the web UI on first launch, or set the relevant API key in the environment before starting.
For a paid provider, set ANTHROPIC_API_KEY or OPENAI_API_KEY on the Cube and launch agent-canvas. For a local model, install Ollama on the same Cube and point OpenHands at it:
curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3.1:8bStep 5 — Start the control plane
Run OpenHands in a detached session so it survives your SSH window:
tmux new -s openhands agent-canvasThe web UI listens on http://0.0.0.0:8000. On the Cube's Networking tab, add a domain and map it to port 8000:
- Domain — the hostname, e.g.
openhands.example.com. - Port —
8000, the OpenHands UI port. - This app serves HTTPS itself — leave it unchecked. OpenHands serves over plain HTTP internally; Krova adds the TLS.
Once the domain reads Active, the UI is at https://openhands.example.com with no tunnel and no published port.
Step 6 — Use the Docker image instead (optional)
If you want the agent isolated from the rest of the Cube, run the Docker image rather than the CLI. The image is pinned — version 1.18.0 at the time of writing, so the install is reproducible:
# Set PROJECTS_PATH to a directory on the Cube where OpenHands
# should be allowed to read and write. Everything else is sandboxed.
export PROJECTS_PATH="$HOME/projects"
docker run -it --rm -p 8000:8000 \
-v "$HOME/.openhands:/home/openhands/.openhands" \
-v "${PROJECTS_PATH}:/projects" \
ghcr.io/openhands/agent-canvas:1.18.0Map $PROJECTS_PATH to a directory on the Cube where OpenHands should be allowed to read and write. Everything else is sandboxed.
What it costs
The 2 vCPU / 4 GB / 40 GB Cube described here bills at about $0.0140/hour — roughly $0.34/day, or $10/month if left running. Usage is metered by the minute.
On top of that, either an AI provider bill (paid per message) or the local Ollama path. Ollama is free to run; the only cost is the larger Cube to fit the model weights in RAM. OpenHands Cloud offers paid hosted tiers at openhands.dev if you ever want to outsource the control plane — the self-hosted build on a Cube is free.
Cleaning up
Deleting the Cube removes OpenHands and any project files mounted into it. If the project directory matters, snapshot the Cube first.
Next steps
- Self-host Agent Zero on a Cube — the single-agent Docker alternative.
- Custom domains — required if you want the OpenHands UI at your own address.
- Cubes — sizing, snapshots, and how billing works when a Cube is stopped.
