Skip to main content
This guide runs the Docker Compose stack on a Linux VM and serves it over HTTPS at your own domain. Caddy handles HTTPS. Caddy can get a certificate from Let’s Encrypt automatically, or it can use a certificate that you provide.

Prerequisites

  • A Linux VM with at least 4 CPUs, 16 GB of memory, and 100 GB of disk
  • Docker Engine with the Compose plugin, and Git
  • A domain name for OpenHands, such as openhands.example.com
  • Ports 80 and 443 open to your users
  • An API key from your LLM provider

Install

1

Create a DNS record

Create a DNS A record that points your domain to the IP address of the VM.
2

Clone the repository

On the VM, run:
3

Configure the stack

Create a .env file in the enterprise directory. Replace openhands.example.com with your domain.
.env
Caddy gets a certificate from Let’s Encrypt when the stack starts and renews it automatically. Let’s Encrypt must be able to reach the VM from the internet on port 80 or 443.
COMPOSE_FILE adds a Caddy service that serves HTTPS on ports 80 and 443. Docker Compose reads this file on every command, so the commands on the Docker Compose page work without changes.
4

Start the stack

5

Complete onboarding

Open https://openhands.example.com and follow the onboarding flow to create your first user and configure your LLM provider.

Replace Your Certificate

If you use your own certificate, copy the new files to certs/cert.pem and certs/key.pem, then restart Caddy: