Skip to main content
Agent Canvas can run directly on your machine or inside Docker. Start with the simplest setup that matches the trust boundary you want.
Agent Canvas starts an agent server that can run shell commands, read files, write files, and use connected tools. Treat the machine or container where the backend runs as trusted infrastructure. Before exposing Agent Canvas to a network you do not control, review VM / Self-Hosted Installation.

Choose An Install Method

MethodUse It WhenWhat The Agent Can Access
npm local installYou want the quickest local browser setup.Runs directly on your machine and can work in local workspaces you open.
DockerYou want a local sandbox with clearer file boundaries.Runs inside a container and can access mounted project directories.
npxYou want to try Agent Canvas without installing the package globally.Runs directly on your machine and can work in local workspaces you open.
VM / self-hostedYou want an always-on backend, stronger hardware, or a team-accessible server.Runs on the VM or dedicated host you configure.
From sourceYou are contributing to Agent Canvas or changing the frontend/backend stack.Runs your local development checkout.
If you are new to Agent Canvas, use npx for a quick first run or npm local install if you want a reusable agent-canvas command. Use Docker when you specifically want sandboxing.

Verify Prerequisites

Install Node.js 22.12 or later and uv, then verify both tools are available:
node --version
npm --version
uv --version
If uv or uvx is missing, install uv before starting Agent Canvas. The local agent server runtime uses it.
Termux and other mobile Linux environments are not a primary supported target. For the most reliable local setup, use macOS, Linux, Windows with PowerShell, or Windows with WSL2.

Install And Run

Install the published package globally:
npm install -g @openhands/agent-canvas
Start the full local stack:
agent-canvas
Agent Canvas starts on http://localhost:8000 by default. If your browser does not open automatically, open that URL manually.

Confirm It Started

After startup:
  1. Open http://localhost:8000.
  2. Confirm the default local backend shows as connected.
  3. Open Settings > LLM and configure a model.
  4. Choose Open Workspace before starting a conversation if you want the agent to work in a specific folder.
  5. Return to the home screen and start a conversation.
If the page does not load, check the terminal where Agent Canvas is running. Common causes are a missing prerequisite, a busy port, or Docker not running.

Common Startup Options

OptionDescription
-p, --port <port>Set the ingress port. The default is 8000.
--backend-onlyStart only the backend behind ingress. Use this for a headless backend on a local machine, VM, or server.
--frontend-onlyStart only the static frontend behind ingress. Use this when connecting a local UI to a remote backend.
--publicEnable public mode. Requires LOCAL_BACKEND_API_KEY and is intended for deployments reachable beyond localhost.
-v, --versionShow the version number.
--infoShow version and stack configuration details.
-h, --helpShow built-in help.
If port 8000 is already in use, start Agent Canvas on another port:
agent-canvas --port 3000

Environment Variables

VariablePurpose
LOCAL_BACKEND_API_KEYAPI key for the server. Required in --public mode; optional for local use because Agent Canvas can auto-generate and persist one.
OH_SECRET_KEYSecret used to protect stored settings and secrets.
OH_AGENT_SERVER_VERSIONPin a specific agent server version, such as 0.1.0.
PORTIngress port inside the Docker container. Map it with -p <host>:<PORT>.

Stop Agent Canvas

Return to the terminal running Agent Canvas and press Ctrl+C.

Update Agent Canvas

Stop Agent Canvas, then run the latest package:
npx @openhands/agent-canvas@latest
Your settings and conversation data are stored outside the package or image when you use the documented ~/.openhands mount.

Uninstall Agent Canvas

There is no Agent Canvas package to uninstall when you use npx. Stop the running process with Ctrl+C.If you want to clear downloaded package cache entries, use npm’s cache commands:
npm cache verify
Uninstalling the package or image does not automatically remove your persisted data. If you want to delete local settings, secrets, and conversation history, remove the persistence directory you mounted or used, such as ~/.openhands.

Next Steps