UseDocumentation Index
Fetch the complete documentation index at: https://docs.openhands.dev/llms.txt
Use this file to discover all available pages before exploring further.
--backend-only to run the backend on a remote machine, then connect from your local frontend with --frontend-only.
1. Provision and Secure the Machine
Any always-on Linux or macOS host:- Cloud VM — Ubuntu 24.04 LTS, 2 vCPU / 4 GB RAM is enough for a single user.
- Dedicated hardware — Mac Mini, Intel NUC, spare laptop.
- Port 22 (SSH) — your IP or VPN CIDR only.
- Everything else — drop.
2. Install Prerequisites
On Ubuntu:uv via Homebrew instead.
3. Start the Backend
--backend-onlystarts only the backend (no frontend).--publicrequiresLOCAL_BACKEND_API_KEY— every API request must carry a matchingX-Session-API-Keyheader.
4. Connect from Your Local Machine
On your laptop, start the frontend:- Click the backend switcher → Manage Backends → Add Backend.
- Fill in:
- Name — e.g.
my-vm - Host / Base URL —
http://localhost:8000(if using an SSH tunnel) or the VM’s URL if you’ve set up a reverse proxy - API Key — the
LOCAL_BACKEND_API_KEYfrom step 3
- Name — e.g.
- Save and select it as the active backend.
Using an SSH Tunnel
The simplest way to reach the backend without exposing ports:http://localhost:8000 as the backend URL.
5. (Optional) Add a Domain with nginx + TLS
If you want direct HTTPS access without an SSH tunnel, point a domain at the machine and front it with nginx + Let’s Encrypt.Point a Domain at the Machine
Create anA record pointing to the machine’s public IP (e.g. canvas.example.com):
Open Ports 80 and 443
Update your network firewall to additionally allow:- Port 80 (HTTP) — open to
0.0.0.0/0(required for Let’s Encrypt HTTP-01 challenges). nginx redirects all HTTP to HTTPS. - Port 443 (HTTPS) — restrict to your IP if possible. If you need it world-open,
LOCAL_BACKEND_API_KEYis your primary defense.
Install nginx and Certbot
Configure nginx
Save this at/etc/nginx/sites-available/canvas.example.com, replacing the domain:
Verify
https://canvas.example.com as the Host / Base URL when adding the backend in Manage Backends.
Security Checklist
Before exposing the backend to a broader network:- Restrict inbound network access — only open ports you need (SSH, 80/443 for the reverse proxy).
- Use
--publicmode with a strongLOCAL_BACKEND_API_KEY. - Use TLS — put a reverse proxy in front with Let’s Encrypt if the backend is internet-reachable.
- Treat the host as sensitive infrastructure — it stores secrets, conversations, and working copies.

