Add host-managed OpenClaw wrap and unwrap flows to the Docker-native wrappers so the installed headroom script can configure the OpenClaw plugin on the host while keeping Headroom itself in Docker. Reuse hidden prepare-only hooks for OpenClaw config payloads, preserve existing plugin metadata on unwrap, and update the Docker-native and integration docs to reflect the supported flow. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
3.8 KiB
Docker-Native Install
Run Headroom without installing Python or Node.js on the host. The install scripts add a native headroom wrapper that keeps Headroom itself in Docker while orchestrating the rest of your workflow on the host OS.
One-line install
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/chopratejas/headroom/main/scripts/install.sh | bash
Windows PowerShell
irm https://raw.githubusercontent.com/chopratejas/headroom/main/scripts/install.ps1 | iex
What the installer does
- Verifies Docker is installed and available.
- Pulls
ghcr.io/chopratejas/headroom:latest. - Installs a
headroomwrapper into~/.local/binor~/bin. - Updates shell startup files so the wrapper directory is on
PATH.
The wrapper keeps Headroom inside Docker and mounts host state back into the container so native behavior stays consistent:
- project workspace ->
/workspace ~/.headroom~/.claude~/.codex~/.gemini
Port 8787 stays the default, so http://localhost:8787 works the same way as a native install.
How the wrapper behaves
Native Headroom commands
These run directly inside the container:
headroom proxy
headroom learn
headroom mcp install
headroom memory list
For proxy, the wrapper publishes the selected port back to the host:
docker run --rm -it \
-p 8787:8787 \
-v "$PWD:/workspace" \
-w /workspace \
ghcr.io/chopratejas/headroom:latest \
headroom proxy --host 0.0.0.0 --port 8787
wrap commands
wrap is host-oriented in Docker-native mode:
- the wrapper starts the Headroom proxy in Docker
- container-side prep writes Headroom config, memory, and
rtkguidance into mounted host files - the target CLI itself is launched on the host by the wrapper
Supported host wrap flows:
headroom wrap claudeheadroom wrap codexheadroom wrap aiderheadroom wrap cursorheadroom wrap openclawheadroom unwrap openclaw
OpenClaw remains host-native in Docker-native mode:
- the host must already have the
openclawCLI installed headroom wrap openclawinstalls/configures the Headroom plugin through the hostopenclawCLI- plugin auto-start still launches the installed host
headroomwrapper fromPATH, which then runs Headroom in Docker - local plugin source mode (
--plugin-path) is also supported, but it may require hostnpmwhen build steps are needed
Docker Compose support
Use docker/docker-compose.native.yml when you want an explicit compose-managed proxy or CLI shell.
macOS / Linux
export HEADROOM_HOST_HOME="$HOME"
export HEADROOM_WORKSPACE="$PWD"
docker compose -f docker/docker-compose.native.yml up proxy
Windows PowerShell
$env:HEADROOM_HOST_HOME = $HOME
$env:HEADROOM_WORKSPACE = (Get-Location).Path
docker compose -f docker/docker-compose.native.yml up proxy
You can also run one-off CLI commands through compose:
docker compose -f docker/docker-compose.native.yml run --rm cli learn
docker compose -f docker/docker-compose.native.yml run --rm cli mcp install
Environment passthrough
The wrapper forwards Headroom and provider environment variables into the container, including common prefixes such as:
HEADROOM_ANTHROPIC_OPENAI_GEMINI_AWS_GOOGLE_/GOOGLE_CLOUD_AZURE_OTEL_
That keeps provider auth and runtime config working without maintaining a separate env file for the container.
Notes
- Docker is the only required Headroom runtime dependency on the host.
- Wrapped tools like Claude Code, Codex CLI, Aider, and Cursor still run on the host when you use
headroom wrap .... - The install scripts are idempotent: rerunning them refreshes the wrapper and image without duplicating shell profile blocks.