Choose a Deployment Shape
Agent Canvas supports two VM runtime modes and several ways to reach them:| Setup | Start Command | How You Use It |
|---|---|---|
| Backend only | agent-canvas --backend-only --public | Run only the agent server on the VM. Start agent-canvas --frontend-only on your laptop and add the VM URL in Manage Backends. |
| Backend only + ngrok | agent-canvas --backend-only --public and ngrok http 8000 | Use an ngrok URL as the backend URL. Do not add ngrok OAuth for this mode; rely on LOCAL_BACKEND_API_KEY plus a private or temporary URL. |
| Full Canvas | agent-canvas --public | Serve both the Agent Canvas UI and the backend from the VM. Open the VM, reverse proxy, or ngrok URL in a browser. |
| Full Canvas + ngrok OAuth | agent-canvas --public and ngrok http 8000 --traffic-policy-file ~/policy.yml | Protect the full Canvas URL with an ngrok login policy before users reach Agent Canvas. |
1. Provision and Secure the VM
Use any always-on Linux or macOS host. Ubuntu 24.04 LTS with 2 vCPU and 4 GB RAM is enough for a single user. Before starting Agent Canvas, restrict inbound traffic:- SSH (
22) — allow only your IP address or VPN CIDR. - Agent Canvas (
8000) — keep closed unless you are using an SSH tunnel. If you expose it through ngrok, nginx, or another proxy, expose only that proxy. - HTTP/HTTPS (
80,443) — open only if you configure a reverse proxy and TLS.
2. Install Prerequisites
Agent Canvas requires:- Node.js 22.12 or later, including
npm. uvfor the agent server runtime.gitandcurl.- Optional:
ngrokfor a temporary public URL. - Optional:
tmuxto keep Agent Canvas and ngrok running after disconnecting from SSH.
Ubuntu 22.04 / 24.04
Install Node.js 22.x,uv, and Agent Canvas:
If your
npm global prefix is user-writable, omit sudo from npm install -g. For macOS or other Linux distributions, use the official Node.js, uv, and ngrok installation links above instead of the Ubuntu-specific commands.3. Set the Backend API Key
Remote and shared deployments should always run in public mode. Public mode requiresLOCAL_BACKEND_API_KEY.
Create a local environment file on the VM:
4. Start Agent Canvas
- Backend Only
- Full Canvas
Start only the backend on the VM:Then start the frontend on your laptop:Add the VM backend in Agent Canvas:
- Click the backend switcher, then select
Manage Backends. - Click
Add Backend. - Enter a name, such as
my-vm. - Enter the Host / Base URL:
http://localhost:8000if you use an SSH tunnel.- The
https://...ngrok-free.appURL if you use ngrok. - Your reverse proxy URL if you use nginx or another proxy.
- Enter the
LOCAL_BACKEND_API_KEYfrom the VM. - Save and select the backend.
Keep It Running with tmux
Usetmux when you want Agent Canvas to keep running after your SSH session disconnects.
- Backend Only
- Full Canvas
Ctrl-b, then d. Reattach later with tmux attach-session -t canvas.
5. Choose an Access Method
Option A: SSH Tunnel
Use an SSH tunnel when you only need personal access and do not want to expose a public URL. On your laptop:http://localhost:8000 as the backend URL in Manage Backends.
Option B: ngrok Without OAuth
Use ngrok without OAuth only for temporary testing or personal access. Keep--public enabled and use a strong LOCAL_BACKEND_API_KEY.
On the VM, in a second terminal or tmux pane:
https://...ngrok-free.app forwarding URL:
- Backend-only mode: enter it as the Host / Base URL in Manage Backends.
- Full Canvas mode: open it directly in your browser.
Option C: ngrok With Google OAuth
Use ngrok OAuth with full Canvas deployments when the ngrok URL may be reachable by a team or a broader audience. OAuth is an additional gate in front of Agent Canvas; it does not replaceLOCAL_BACKEND_API_KEY.
For backend-only deployments, use ngrok without OAuth and keep --public enabled. OAuth is best suited to the full Canvas URL where the UI and backend share the same origin.
Create ~/policy.yml, replacing openhands.dev with your allowed Google Workspace domain:
Option D: Reverse Proxy With TLS
Use a reverse proxy when you need a stable domain instead of an ngrok URL. Point a domain at the VM, proxy it to127.0.0.1:8000, and terminate TLS at the proxy.
On Ubuntu, install nginx and Certbot:
/etc/nginx/sites-available/canvas.example.com, replacing canvas.example.com with your domain:
https://canvas.example.com as the URL for either the remote backend entry or the full Canvas UI.
Security Checklist
Before exposing Agent Canvas beyond an SSH tunnel:- Run with
--publicand set a strongLOCAL_BACKEND_API_KEY. - Restrict network access with a firewall, VPN, ngrok OAuth, or an identity-aware proxy.
- Use HTTPS for any internet-reachable URL.
- Limit who can SSH to the VM and keep the OS patched.
- Protect the VM filesystem because it stores settings, secrets, conversations, and working copies.
- Rotate keys if an ngrok URL, API key, or VM login is shared too broadly.

