OpenHands Agent Canvas
OpenHands Agent Canvas is a self-hosted coding-agent interface. Nginx serves the web interface over HTTPS on port 443. Agent Canvas is published only on loopback. The container runs as an unprivileged user. The image contains no model-provider, repository, or customer account credentials.
Software Included
Section titled “Software Included”| Component | Version |
|---|---|
| OpenHands Agent Canvas | 1.38.0 |
| Ubuntu | 26.04.1 LTS |
Requirements
Section titled “Requirements”| Resource | Minimum |
|---|---|
| vCPU | 2 |
| Memory | 4 GiB |
| Storage | 40 GiB |
First Login
Section titled “First Login”First boot creates a per-VM HTTPS password, an OpenHands session API key, and a self-signed TLS certificate. Connect through SSH and read the generated credentials:
sudo cat /etc/openhands/credentials.txtBefore accepting the browser certificate warning, retrieve its SHA-256 fingerprint through the same trusted SSH connection:
sudo openssl x509 -in /etc/openhands/tls/fullchain.pem -noout -fingerprint -sha256Open https://<vm-public-ip>/canvas/. Compare the browser certificate fingerprint with the value
from SSH, then sign in with the generated HTTPS credentials.
When Agent Canvas shows Add a backend, enter:
| Field | Value |
|---|---|
| Host Name | A friendly label for this VM |
| Type | Local |
| Host | https://<vm-public-ip> |
| API Key | The session API key from credentials.txt, not an LLM key |
Select Next. Choose a usage-data preference if prompted, select the OpenHands agent, then continue to Set up your LLM. Add a provider, model, and credentials that you own.
Before starting a task, confirm that your provider credential grants access to the selected model and has available quota. For paid providers, confirm that billing or credit is available. The image includes no model usage credit.
Connect a Repository
Section titled “Connect a Repository”Do not put model-provider or repository credentials in cloud-init user data, the image, or support tickets.
For a GitHub repository, open Settings > Secrets. Save your GitHub personal access token as
a custom secret named exactly GITHUB_TOKEN. Return to Home, choose GitHub, search for and
select the repository or enter its HTTPS URL, choose a branch, then launch the task.
This standalone image uses HTTPS and a personal access token for GitHub repository access. This
image does not provide cloud OAuth or a documented SSH private-key onboarding path. OpenHands
encrypts saved secrets with the per-VM OH_SECRET_KEY and stores them in its persistent application
data.
Security and Isolation
Section titled “Security and Isolation”The web interface is available only over HTTPS on port 443 and requires the generated HTTPS credentials. The Agent Canvas backend also requires its session API key. Keep port 443 limited to trusted source networks in the ZCP network ACL where possible.
Agent commands run in an unprivileged container without host networking, privileged mode, or a host Docker socket. The image does not support nested Docker containers. Conversations share this runtime trust boundary, so use a separate VM for untrusted repositories or prompts.
Persistence and Recovery
Section titled “Persistence and Recovery”Persistent application data and /var/lib/openhands/projects survive ordinary container and VM
restarts. This data includes encrypted repository credentials. Treat VM snapshots as
credential-bearing data.
After a reboot, inspect the service and logs:
sudo systemctl status openhands-first-boot.service --no-pagersudo docker compose -f /opt/openhands/docker-compose.yml pssudo docker compose -f /opt/openhands/docker-compose.yml logs --tail=120sudo nginx -tConfirm the Agent Canvas interface responds and that existing conversations and projects remain.
Do not delete the OpenHands persistent volume, /var/lib/openhands/projects,
/etc/openhands/runtime.env, or /etc/openhands/credentials.txt while recovering a VM.
Upgrades
Section titled “Upgrades”Validate the target pinned container reference on a separate candidate first. For an existing VM,
stop it and take a consistent ZCP snapshot. Start the VM, then update only the pinned image
reference in /opt/openhands/docker-compose.yml. Pull and start that exact image:
sudo docker compose -f /opt/openhands/docker-compose.yml pullsudo docker compose -f /opt/openhands/docker-compose.yml up -d --pull neverKeep the OpenHands persistent volume, /var/lib/openhands/projects, /etc/openhands/runtime.env,
and /etc/openhands/credentials.txt in place. Wait for the service to become healthy, then run:
sudo /usr/local/bin/openhands-health.shVerify existing conversations and projects before resuming work. If the upgrade fails, restore the stopped snapshot. Do not run an older image against data written by a newer release.