The official Docker image packages the full Agent Canvas stack — backend and frontend — in a single container. The agent runs inside the container rather than directly on your host, giving you a sandboxed environment out of the box.Documentation Index
Fetch the complete documentation index at: https://docs.openhands.dev/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Docker installed and running
- Agent Canvas installed locally (if connecting from another instance) — see Setup
Run the Official Image
Mount a persistence directory for settings, secrets, and conversation history, and a projects directory for workspace access:http://localhost:8000. The agent can access any project under the mounted /projects path.
Environment Variables
Configuration is passed via-e flags on docker run:
| Variable | Purpose |
|---|---|
PORT | Ingress port inside the container (default 8000). Map it with -p <host>:<PORT>. |
LOCAL_BACKEND_API_KEY | API key for the server. Auto-generated and persisted if not set. |
OH_SECRET_KEY | Secret used to protect stored settings and secrets. |
Connect from the Frontend
Start the frontend separately and point it at the container:- Click the backend switcher → Manage Backends → Add Backend.
- Fill in:
- Name — e.g.
docker-backend - Host / Base URL —
http://localhost:8000 - API Key — the
LOCAL_BACKEND_API_KEYvalue (check container logs if auto-generated)
- Name — e.g.
- Save and select it as the active backend.

