Solutions · Coding agents
A VPS for OpenHands
OpenHands is an autonomous coding agent: give it a repository and a task and it edits, runs, tests and opens pull requests on its own, with the model of your choice behind an API key. Its own README says the most powerful way to run it is on a server in the cloud, and its own warning says the agent has full access to the machine it runs on. Both point at the same answer: a machine that is nobody's laptop. The project's server guide calls 2 vCPU and 4 GB plenty for one user; BD-8 at $12.90 a month gives it twice that for less than the 4 GB machines elsewhere.
What it needs
Software from the docs, sizes labelled by source
The software and the security posture come from the project's own documentation. Where the project publishes no hardware figure, the sizes say whose they are.
From the OpenHands README, SELF_HOSTING.md and docs
- “2 vCPU / 4 GB RAM is plenty for a single user” (the project's VM guide). The docs ask for “a modern processor and a minimum of 4GB RAM”.
- Install: Node.js 24 or later and uv, then
npx @openhands/agent-canvas --public. One command starts the agent server, the automation backend and the web app behind an ingress on 127.0.0.1:8000. - Set
LOCAL_BACKEND_API_KEYbefore the first start: in public mode every API call must carry it and the web app asks for it before anything else. Firewall everything but SSH first; the guide says to do that before the agent ever runs. - An API key from a model provider: the docs say OpenHands needs one for most models. Docker is optional and only needed if you want each conversation sandboxed in its own container. No GPU unless you host the model yourself.
Sizes (the project's figure, then ours)
| Workload | vCPU | RAM |
|---|---|---|
| One user, hosted models, agent on the host (official)The guide's own figure. The agent server runs directly on the machine, so the machine is the sandbox. | 2 | 4 GB |
| One or two users, a Docker sandbox per conversationOurs. Each conversation gets a container; dependency installs, builds and test suites run inside them. | 4 | 8 GB |
| A team's shared agent server, several agents at onceOurs. Parallel agents on parallel repositories, each compiling something. | 8 | 24 GB |
The plans that fit
5 machines, priced live
Cheapest fitting machine first. Prices are today's, per month, read from the catalogue.
- BD-8$12.90/mo
4 vCPU · 8 GB · 100 GB disk · 32 TB
Cheapest with room to build and test. 4 vCPU, 8 GB, 100 GB and 32 TB of transfer, for less than the 4 GB machines elsewhere. Twice the guide's figure; test suites notice the cores.
- U2-4-40$14.90/mo
2 vCPU · 4 GB · 40 GB disk · Unmetered
Exactly the guide's figure, unmetered, Istanbul. 2 vCPU / 4 GB / 40 GB. One user, hosted models, the agent on the host. Unmetered traffic for clones and package installs.
- BD-24$31.90/mo
8 vCPU · 24 GB · 300 GB disk · 32 TB
8 vCPU / 24 GB for a team's agent server. Several agents at once, Docker sandboxes, the automation backend on a schedule.
- C2-4-80$37.90/mo
2 vCPU · 4 GB · 80 GB disk · 3 TB
The guide's figure, in dozens of cities. 2 vCPU / 4 GB / 80 GB. Pick it for the city; keep one conversation at a time.
- C4-8-160$75.90/mo
4 vCPU · 8 GB · 160 GB disk · 3 TB
4 vCPU / 8 GB / 160 GB, in dozens of cities. The comfortable size with disk for many checkouts and Docker images.
There is no start-up preset for OpenHands yet: the install is the five steps below, typed by you, in the order the project's own guide gives them. Firewall first, key second, agent third.
The install
Five steps, in the order OpenHands' own guide gives them
The guide is explicit that the firewall comes before the first start, because the agent server has the run of the machine and only the firewall and the key stand between it and a stranger.
- Firewall first.
ufw allow OpenSSH && ufw --force enableNothing inbound but SSH. The ingress (8000), the agent server (18000), the automation backend (18001) and the static server (3001) must not be reachable from outside; the guide says so in those words. - Node.js 24 and uv.
apt-get install -y curl git curl -fsSL https://deb.nodesource.com/setup_24.x | bash - && apt-get install -y nodejs curl -LsSf https://astral.sh/uv/install.sh | shuv runs the agent server; the guide installs it with the one-line installer from astral.sh. - Generate the key, start in public mode.
export LOCAL_BACKEND_API_KEY=$(openssl rand -base64 32); echo $LOCAL_BACKEND_API_KEY npx @openhands/agent-canvas --publicCopy the key somewhere safe before you go on; public mode means the web app will ask you for it. For a long-term run, the guide's systemd unit at/etc/systemd/system/agent-canvas.servicewithEnvironment=LOCAL_BACKEND_API_KEY=…in it, thensystemctl enable --now agent-canvas. - Reach it over SSH, add the model.
ssh -N -L 8000:127.0.0.1:8000 root@your-serverthen http://127.0.0.1:8000, paste the key, then Settings: choose the LLM provider and model and paste that provider's API key. Start a conversation on a repository. - Optionally, a domain. Point an A record at the server, open 80 and 443,
apt-get install -y nginx certbot python3-certbot-nginx, and the guide's nginx block that proxies to 127.0.0.1:8000 with WebSocket headers;certbot --nginx -d canvas.example.com --redirectgets the certificate. If 443 must be open to the world, the guide says the key is your primary defence, so keep it long and keep it secret.
Honestly
What we would actually buy
The guide says 2 vCPU and 4 GB is plenty for one user. Buy the 8 GB machine that costs less than the 4 GB ones and let the agent compile things.
For one person's coding agent
BD-8 · $12.90/mo
4 vCPU, 8 GB and 100 GB at $12.90: the agent server, a few checked-out repositories, their dependency trees, and a test suite running while you watch, with memory left if you turn on Docker sandboxes. The model is elsewhere, behind an API key, so this machine never needs a GPU and the bill that matters is the provider's. C2-4-80 at $37.90 is the guide's exact figure in dozens of cities, if the city matters more than the cores.
Questions