# OpenClaw in Docker

> Run OpenClaw in a container: EnvHaven's open-source image with OpenClaw built in, a managed workspace with nothing to run, and the folders and keys a container of your own has to keep.

_Updated November 23, 2026 · Checked against OpenClaw 2026.9.2 in EnvHaven v1.9.0_

A container keeps whatever OpenClaw does with full access away from your own files, which makes it the usual home for unattended runs. EnvHaven is built on that idea in two forms: a managed workspace, which is the container already running on a server of its own, and the open-source workspace image, which you run with Docker yourself.

## A managed workspace: nothing to run

1. Open your workspace in any browser. It is the EnvHaven container on its own always-on server, with an HTTPS address for what you build.
2. Tap **Launch**, choose OpenClaw and tap **Sign in**: it runs `openclaw onboard` for you in the terminal. For an API key, choose **Set key** instead and paste `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY` or `GOOGLE_API_KEY`; the workspace keeps it write-only.
3. Start it with one tap: signed in, OpenClaw gets a green dot in the Launch menu and an icon in the workspace's top bar. Support is built in (2026.9.2), so there is nothing to install or update.
4. Give it a task. Ready for `openclaw onboard`; the workspace itself is the sandbox.

## The EnvHaven image, on your own Docker

The workspace image is MIT-licensed and ships OpenClaw 2026.9.2 beside 16 other agents. Its home is `/config`, so one volume keeps every agent's settings and sign-in when the container is replaced:

```bash
docker run -d \
  --name envhaven \
  -p 8443:8443 \
  -p 2222:22 \
  -e PASSWORD=password \
  -e SUDO_PASSWORD=password \
  -v envhaven-config:/config \
  ghcr.io/envhaven/envhaven:latest
```

Open `http://localhost:8443`, run `openclaw` in the terminal and sign in. The [self-hosted guide](https://envhaven.com/guides/self-hosted-dev-environment) covers SSH and Haven CLI against it.

## What a container for OpenClaw has to keep

OpenClaw keeps its settings in `~/.openclaw` ([source](https://docs.openclaw.ai/help/faq/where-things-live-on-disk)). Model sign-ins are rows in SQLite databases under `~/.openclaw`, and the daemon reads provider keys from `~/.openclaw/.env`.

In a container of your own, mount a volume there so a rebuilt container stays signed in, or pass `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY` or `GOOGLE_API_KEY` as an environment variable instead of signing in.

## Full access inside the container

Apply the no-prompt preset (stop the gateway first):

```bash
openclaw exec-policy preset yolo
```

An unconfigured gateway already runs commands without prompts and without a sandbox; for coding agents its docs recommend `tools.exec.mode auto`. `openclaw approvals` reviews pending requests, and `openclaw sandbox` isolates agents in Docker.

## Keep reading

- [OpenClaw](https://envhaven.com/agents/openclaw)
- [OpenClaw in the browser](https://envhaven.com/agents/openclaw/browser)
- [OpenClaw on iPhone](https://envhaven.com/agents/openclaw/iphone)
- [OpenClaw on iPad](https://envhaven.com/agents/openclaw/ipad)
- [OpenClaw on Android](https://envhaven.com/agents/openclaw/android)
- [OpenClaw on a Chromebook](https://envhaven.com/agents/openclaw/chromebook)
- [Coding agents in Docker](https://envhaven.com/agents/docker)

Source: https://envhaven.com/agents/openclaw/docker
