> ## Documentation Index
> Fetch the complete documentation index at: https://opensre.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Docker

> Run OpenSRE in Docker for a repeatable local or server setup.

Use Docker when you want OpenSRE in a container — same image on your laptop or a server. For day-to-day CLI use on your machine, the normal [install](https://opensre.com/docs/install.md) is simpler.

## Prerequisites

Install Docker first:

> **[Docker Desktop (Mac)](https://docs.docker.com/desktop/install/mac-install/)**
>
> Install Docker Desktop on macOS.

> **[Docker Engine (Ubuntu)](https://docs.docker.com/engine/install/ubuntu/)**
>
> Install Docker Engine on Ubuntu.

Aim for a machine with enough CPU and RAM for your LLM calls and any tools you connect (roughly 4 cores / 8GB is a comfortable start).

## 1. Build the image

From a clone of the OpenSRE repo:

```bash theme={null}
docker build -t opensre:latest .
```

The image contains the runtime tools. It does not pin an OpenSRE build: on start it installs the current main-channel build. Inside a running container, `opensre update -y` installs a newer main build and restarts the process onto it. Rebuild the image when Git, the GitHub CLI, Node, or Codex should change, not for an application change.

The image can run in two modes via `MODE`:

* **`web`** (default) — HTTP API for health checks
* **`gateway`** — messaging gateway (Slack / Telegram / Discord / Buzz) plus related services

## 2. Run web mode

Put your LLM keys (and any integration secrets) in a `.env` file — see `.env.example` in the repo — then:

```bash theme={null}
docker run --rm -p 8000:8000 --env-file .env opensre:latest
```

Check it's up:

```bash theme={null}
curl http://localhost:8000/health
```

Minimum env for an LLM (example):

```bash theme={null}
LLM_PROVIDER=anthropic
ANTHROPIC_API_KEY=...
```

## 3. Run gateway mode (optional)

If you want Slack Socket Mode, Telegram, Discord, and/or Buzz on the gateway:

```bash theme={null}
docker run --rm -e MODE=gateway --env-file .env opensre:latest
```

You'll need the usual LLM vars plus the matching messaging tokens. Details: [Deployment](https://opensre.com/docs/guides/deployment.md) and [Messaging](https://opensre.com/docs/integrations/messaging.md).

## Prefer the CLI instead?

On the host (not in Docker):

```bash theme={null}
curl -fsSL https://install.opensre.com | bash -s -- -dc
opensre
```

See [Install](https://opensre.com/docs/install.md) and [Quickstart](https://opensre.com/docs/getting-started/quickstart.md).

## Next

* [Deployment](https://opensre.com/docs/guides/deployment.md) — hosting, gateway commands, health checks
* [Environment variables](https://opensre.com/docs/install/environment-variables.md) — full config list
* [HTTP API](https://opensre.com/docs/guides/api.md) — health and status endpoints


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.