Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions enterprise/docker-compose.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: Docker Compose
description: Run OpenHands Enterprise with Docker Compose
icon: docker
---

The Docker Compose stack runs OpenHands Enterprise on a single machine. Use it to evaluate
OpenHands Enterprise with a small group of users. For production, we recommend
[Kubernetes](/enterprise/k8s-install/index).

## Prerequisites

- Git
- Docker and Docker Compose
- An API key from your LLM provider

## Install

<Steps>
<Step title="Start the stack">
```bash
git clone https://github.com/OpenHands/enterprise.git
cd enterprise
docker compose up --wait
```

The command returns when every service is healthy. On the first start, the application pulls
images, which can take several minutes.
</Step>
<Step title="Complete onboarding">
Open [http://localhost:9043](http://localhost:9043) and follow the onboarding flow to create
your first user and configure your LLM provider.
</Step>
</Steps>

## Share with your team

By default, the stack is only reachable from the machine it runs on. To share it with others,
serve it over HTTPS with [ngrok](/enterprise/docker-compose/ngrok) or run it on a
[VM with your own domain](/enterprise/docker-compose/https).

## Upgrade

Pull the latest changes, then restart the stack:

```bash
git pull
docker compose down
docker compose up --wait
```

The application migrates its database on startup.

## Stop and reset

Stop the stack with:

```bash
docker compose down
```

Your data is stored in Docker volumes and is kept when you stop the stack.

### Reset

To delete all data and start over, stop any running sandbox containers, then remove the volumes:

```bash
docker compose down -v
```
94 changes: 94 additions & 0 deletions enterprise/docker-compose/https.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
title: Run on a VM with HTTPS
sidebarTitle: VM with HTTPS
description: Run the Docker Compose stack on a Linux VM and serve it over HTTPS at your own domain
icon: lock
---

This guide runs the [Docker Compose](/enterprise/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](https://docs.docker.com/engine/install/) 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

<Steps>
<Step title="Create a DNS record">
Create a DNS A record that points your domain to the IP address of the VM.
</Step>
<Step title="Clone the repository">
On the VM, run:

```bash
git clone https://github.com/OpenHands/enterprise.git
cd enterprise
```
</Step>
<Step title="Configure the stack">
Create a `.env` file in the `enterprise` directory. Replace `openhands.example.com` with your
domain.

<Tabs>
<Tab title="Automatic certificate">
```bash .env
COMPOSE_FILE=docker-compose.yml:docker-compose.https.yml
WEB_HOST=openhands.example.com
WEB_URL=https://openhands.example.com
AGENT_CANVAS_LOCK_TO_CLOUD=https://openhands.example.com
```

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.
</Tab>
<Tab title="Your own certificate">
```bash .env
COMPOSE_FILE=docker-compose.yml:docker-compose.https-own-cert.yml
WEB_HOST=openhands.example.com
WEB_URL=https://openhands.example.com
AGENT_CANVAS_LOCK_TO_CLOUD=https://openhands.example.com
```

Copy your certificate and private key into the `certs` directory:

```bash
mkdir -p certs
cp /path/to/fullchain.pem certs/cert.pem
cp /path/to/privkey.pem certs/key.pem
```

The certificate must be issued by a public certificate authority, and `cert.pem` must
contain the full certificate chain.
</Tab>
</Tabs>

`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](/enterprise/docker-compose) page work without changes.
</Step>
<Step title="Start the stack">
```bash
docker compose up --wait
```
</Step>
<Step title="Complete onboarding">
Open `https://openhands.example.com` and follow the onboarding flow to create your first user
and configure your LLM provider.
</Step>
</Steps>

## Replace Your Certificate

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

```bash
docker compose restart https
```
56 changes: 56 additions & 0 deletions enterprise/docker-compose/ngrok.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
title: Serve with ngrok
sidebarTitle: ngrok
description: Give the Docker Compose stack a public HTTPS URL with ngrok
icon: globe
---

Use ngrok to give the [Docker Compose](/enterprise/docker-compose) stack a public HTTPS URL. You
don't need to open any ports.

## Prerequisites

- The [Docker Compose prerequisites](/enterprise/docker-compose#prerequisites)
- ngrok, installed and connected to your ngrok account. Follow steps 1 and 2 of the
[ngrok Agent CLI Quickstart](https://ngrok.com/docs/gateway/endpoints/agent-cli-quickstart).
- Your ngrok domain. Every ngrok account includes a free dev domain, such as
`example-name.ngrok-free.app`. You can find it on the [Domains](https://dashboard.ngrok.com/domains)
page of the ngrok dashboard.

## Install

<Steps>
<Step title="Clone the repository">
```bash
git clone https://github.com/OpenHands/enterprise.git
cd enterprise
```
</Step>
<Step title="Configure the stack">
Create a `.env` file in the `enterprise` directory. Replace `example-name.ngrok-free.app` with
your ngrok domain:

```bash .env
WEB_HOST=example-name.ngrok-free.app
WEB_URL=https://example-name.ngrok-free.app
AGENT_CANVAS_LOCK_TO_CLOUD=https://example-name.ngrok-free.app
```
</Step>
<Step title="Start the stack">
```bash
docker compose up --wait
```
</Step>
<Step title="Start ngrok">
```bash
ngrok http 9043 --url https://example-name.ngrok-free.app
```

ngrok serves the stack at your domain while this command runs. Keep it running.
</Step>
<Step title="Complete onboarding">
Open your ngrok URL and follow the onboarding flow to create your first user and configure
your LLM provider. On a free ngrok account, ngrok shows a warning page first. Click **Visit**
to continue.
</Step>
</Steps>
Loading