Skip to content

Command Palette

Search for a command to run...

Self-host OpenHands

AI Coding Agents
prices checked · Aug 2026

A self-hosted control center for AI coding agents: describe a task in natural language and OpenHands writes code, runs commands, and iterates on its own. It ships as Agent Canvas, an npx-installable web UI that runs its own agent or third-party agents (Claude Code, Codex, and other Agent-Client-Protocol-compatible agents), and you bring your own LLM API key (Anthropic, OpenAI, or a self-hosted OpenAI-compatible endpoint).

Key facts

CategoryAI Coding Agents
LicenseMIT
StackTypeScript, React, Python
Min RAM4096 MB
Dockerno
Difficulty

What you need

  • Any VPS with at least 4096 MB of RAM
  • A domain you control — most self-hosted setups need HTTPS in front of them
  • About an afternoon — budget time for troubleshooting

Install

Run these commands on your server:

# OpenHands Agent Canvas — official npx installer + systemd (Node.js + uv)
apt-get update && apt-get install -y curl git
curl -LsSf https://astral.sh/uv/install.sh | sh   # agent-server runtime
export LOCAL_BACKEND_API_KEY=$(openssl rand -base64 32)   # save this value
npx @openhands/agent-canvas --public   # quick test run, binds 127.0.0.1:8000
# for a persistent service, wrap the same command in a systemd unit —
# see docs/SELF_HOSTING.md — then front :8000 with nginx + Let's Encrypt
# → https://your-domain — paste LOCAL_BACKEND_API_KEY when prompted

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.