GuidesHosting choices

OpenHands: install Agent Canvas, Docker, models and safety

What OpenHands is now (Agent Canvas, the old CLI, Cloud), how to install it with npm or Docker, reach it safely over SSH, and bring a model or key.

November 28, 2026The Everpod team
The short answer

OpenHands is an open-source (MIT) coding agent, and today its main way in is Agent Canvas, a browser UI you run yourself that drives the OpenHands agent or Claude Code, Codex, Gemini CLI, Pi and OpenCode. Install it with npm install -g @openhands/agent-canvas (Node.js 24 or later plus uv) and run agent-canvas, or run the Docker image with the port bound to 127.0.0.1:8000. It listens on loopback by default; on a server, reach it with ssh -L 8000:127.0.0.1:8000 rather than opening the port. The old terminal CLI (openhands on PyPI) is no longer maintained, and the old Docker command that mounted /var/run/docker.sock belongs to the 0.x releases. Version 1.46.0 as of November 28, 2026.

What OpenHands is now

OpenHands comes from All Hands AI, and its repository now lives at github.com/OpenHands/OpenHands. Its README opens on one product: “OpenHands Agent Canvas turns your coding agents into a self-hosted, always-on engineering team.” Three pieces carry the name:

PieceWhat it isState on November 28, 2026
Agent Canvas
A web UI plus an agent server, run on your laptop, a VM or in Docker; npm package @openhands/agent-canvas1.46.0, released November 25; ten releases from November 6 to 25
OpenHands CLI
A terminal UI, PyPI package openhands1.16.0, May 8, 2026; its repository says “This project is no longer actively maintained.”
OpenHands Cloud
The hosted version, at app.all-hands.dev, sign-in with GitHub, GitLab or BitbucketCommercial; prices below

Agent Canvas runs the OpenHands agent out of the box, and can run other agents through the Agent Client Protocol: Claude Code, Codex, Gemini CLI, Pi and OpenCode, each launched as a subprocess. It can also connect one UI to several “backends” (your own machine, a Docker container, a VM, Modal, or OpenHands Cloud) and run automations on a schedule or in response to events.

A note if you are following an older guide: openhands serve starts what the docs now call “the legacy OpenHands CLI GUI server and will not run if you have only installed agent-canvas.” The port has also moved, from 3000 to 8000.

Install it without Docker

The npm route needs Node.js 24 or later (the package’s engines field reads >=24) and uv, which runs the Python agent server:

npm install -g @openhands/agent-canvas
agent-canvas                 # UI at http://localhost:8000
agent-canvas --port 3000     # another port

npx @openhands/agent-canvas  # or run it once without installing
Copied

The README is blunt about this mode: “The agent will have full access to your filesystem!” The setup docs add that agents “can run shell commands and read or write files with your user account’s permissions” and that “Agent Canvas is the client and does not isolate them”. On a laptop with your SSH keys and cloud credentials in your home directory, that is the whole home directory. Run it as a separate user, on a machine kept for the purpose, or use the Docker image. Desktop installers for macOS, Windows and Linux are in preview.

Run it in Docker

The current image keeps the agent inside the container and gives it one folder of yours, mounted at /projects:

export PROJECTS_PATH="$HOME/projects"
mkdir -p "$PROJECTS_PATH"

docker run -it --rm \
  -p 127.0.0.1:8000:8000 \
  -e AGENT_CANVAS_ALLOW_LAN_SESSION_KEY=true \
  -v openhands-state:/home/openhands/.openhands \
  -v "${PROJECTS_PATH}:/projects" \
  ghcr.io/openhands/agent-canvas:1.46.0
Copied

Then open http://localhost:8000/canvas (the image serves the UI under /canvas; the npm launcher serves it at the root). What each line does:

On Docker Engine for Linux, the container runs as uid 10001, which must be able to read and write the projects folder. The README offers giving that uid ownership of the folder or an ACL, and, as an optional broad fix, the commands below, which open a dedicated folder to every user on the host; that is why it says to keep that folder apart from ~/.openhands and anything sensitive. Docker Desktop on macOS and Windows usually needs neither.

# gives every user on this machine read/write on the folder
find "$PROJECTS_PATH" -type d -exec chmod a+rwX {} +
find "$PROJECTS_PATH" -type f -exec chmod a+rw {} +
Copied

To keep it running, replace --rm with --restart unless-stopped and add -d: the container exits with code 1 if its agent server stops answering for about 30 seconds, and only a restart policy brings it back. For more on putting coding agents in containers, see running Claude Code in Docker and OpenCode in Docker.

The Docker socket, and what it hands over

Most OpenHands tutorials online show the 0.x command, which started the app with:

# the 0.x releases (0.59 shown) - not the current install
-v /var/run/docker.sock:/var/run/docker.sock
-p 3000:3000
Copied

Mounting the socket lets the container drive the host’s Docker daemon, which is how the old app started a sandbox container for each session. Whatever controls that daemon controls the host: Docker’s own security docs say “only trusted users should be allowed to control your Docker daemon”, because it can start a container with the host’s / mounted inside and then “alter your host filesystem without any restriction”. A process with the socket is root on the machine. And -p 3000:3000 without an address publishes on every interface, for an app whose own README said “There is no built-in authentication”. If you still run a 0.x install on a server, that combination is the thing to fix first.

The current image mounts no socket. The mode that gives each conversation its own container (OH_CONVERSATION_RUNTIME=docker agent-canvas) runs the launcher on the host and needs your user to be able to run Docker, which Docker documents as “root-level privileges” for that user; the docs also say that in this mode it “listens on all network interfaces (0.0.0.0)” and no longer embeds the session key. Use it only with LOCAL_BACKEND_API_KEY set and port 8000 closed at the server’s firewall. Running Docker inside the agent’s own container needs --privileged, which “gives the container broad access to the host kernel”.

On a Linux server over SSH

The VM guide installs the npm package system-wide and runs it in public mode, which means the page asks for an API key instead of carrying one. Every service still binds to 127.0.0.1. Make the key without it passing through your shell history:

sudo npm install -g @openhands/agent-canvas

(umask 077; printf 'export LOCAL_BACKEND_API_KEY="%s"\n' "$(openssl rand -base64 32)" > ~/.agent-canvas.env)
source ~/.agent-canvas.env
agent-canvas --public
Copied

Port 8000 stays closed. From your laptop, forward it over SSH and open http://localhost:8000, entering the key from ~/.agent-canvas.env when asked:

ssh -L 8000:127.0.0.1:8000 user@your-server
Copied

Run it inside tmux so it survives your SSH session closing; the self-hosting guide recommends a systemd unit for anything long-lived. To reach it from a phone, the docs point at Tailscale. A reverse proxy in front of the loopback listener (Tailscale Serve is one) may be refused: the README on the main branch, newer than 1.46.0, says a loopback listener answers only loopback host names and that a proxy’s hostname goes in OH_ALLOWED_HOSTS. The options for opening a server’s localhost app privately are in opening a localhost app on a remote server. What not to do is bind it to 0.0.0.0 on a public address: “Without authentication, anyone with the URL can use your instance and the LLM API keys configured in it.”

Bringing a model

Models are set in the UI, not a config file: Settings, then LLM, the Basic tab; pick a provider (Anthropic, OpenAI, Google, OpenRouter, OpenHands’ own and others) and a model, and paste the key. A saved “Provider Connection” keeps the provider, key and optional base URL for reuse.

A local model goes in on the Advanced tab as an OpenAI-compatible server, the model as openai/<model-id> and a base URL that the backend can reach. For Ollama the docs give openai/qwen3.6:35b-a3b and http://host.docker.internal:11434/v1 from inside Docker; with the npm install, the backend is on the host, so http://127.0.0.1:11434/v1. Raise Ollama’s context: “The default (4096) is way too small”, set OLLAMA_CONTEXT_LENGTH to at least 22000. The docs also warn that open-weight and local models “still vary widely in tool-use reliability”.

Claude Code and Codex in Agent Canvas use their own sign-in. If the backend runs on the same machine as your login, it reuses it, and “The login takes priority over an API key”. In a container there is no host login, so you paste credentials in the UI: Claude Code’s as CLAUDE_CODE_OAUTH_TOKEN (a Pro or Max token), Codex’s as CODEX_AUTH_JSON (the contents of ~/.codex/auth.json). Anthropic’s legal page says subscription sign-in is “designed to support ordinary use of Claude Code and other native Anthropic applications” and does not permit third-party developers to “route requests through Free, Pro, Max, or Ultra plan credentials on behalf of their users”; it names no particular tool, so whether a given setup fits is Anthropic’s call, and an API key avoids the question. How other agents handle the same thing is in using a Claude subscription in Hermes, Pi and OpenCode.

Where settings live

InstallWhere state lives
Agent Canvas via npm
~/.openhands (settings, secrets, conversations, workspaces)
Agent Canvas in Docker
The named volume, under /home/openhands/.openhands; a generated API key at /home/openhands/.openhands/agent-canvas/api-key.txt
OpenHands CLI
~/.openhands/agent_settings.json, cli_config.json, mcp.json
Your repository
.openhands/setup.sh (runs at the start of each session) and .openhands/hooks.json

OH_SECRET_KEY is the secret that protects stored settings and secrets; treat that directory as you would any file holding API keys.

Headless and scripted runs

The CLI has the one-shot mode a script wants, and is still installable, but expect no fixes:

uv tool install openhands --python 3.12
openhands --headless -t "Write unit tests for auth.py"
openhands --headless -f instructions.md
openhands --headless --json -t "Create a Flask app"
Copied

It ignores LLM_API_KEY, LLM_MODEL and LLM_BASE_URL unless you pass --override-with-envs. In Agent Canvas, the supported route for unattended work is an automation, created from the Automations view or by asking the agent to “create an automation”; it runs against the backend, so the backend has to be up. For code, the project points at its Python SDK.

OpenHands beside Claude Code and Codex

Claude Code and Codex are terminal agents from the companies that make their models, used with those companies’ subscriptions or keys. The OpenHands agent is model-agnostic and bring-your-own-key, and Agent Canvas is a different layer: a browser UI and server that can run Claude Code and Codex themselves, next to its own agent, on the machines you connect. If you live in a terminal, Claude Code or Codex alone is less to run; if you want one web UI, scheduled automations and several agents on a server, that is what OpenHands is now built for. The Claude Code alternatives guide sets the other terminal agents side by side.

OpenHands’ pricing page as of November 28, 2026: self-hosting the open-source version is free with your own model key; Teams is $500 a month for 10 users (then $50 a seat), with a 30-day trial, your own model key, and a cap of 5,000 sessions a month; Enterprise is custom. The page lists no individual plan.

Run Claude Code, Codex, OpenCode, Pi, Hermes or OpenClaw on an always-on developer pod.

A developer pod is a permanent cloud computer (VPS), set up and secured for you, with your pick of Claude Code, Codex, OpenCode, Pi, Hermes and OpenClaw installed. Run more agents at once than your laptop can hold, and keep them working when it’s closed. From $24 a month, built in about ten minutes.