惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Recent Announcements
Recent Announcements
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
有赞技术团队
有赞技术团队
J
Java Code Geeks
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
aimingoo的专栏
aimingoo的专栏
U
Unit 42
The GitHub Blog
The GitHub Blog
云风的 BLOG
云风的 BLOG
T
Tailwind CSS Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
博客园 - 司徒正美
腾讯CDC
I
InfoQ
GbyAI
GbyAI
博客园_首页

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
docs(docker): document Claude CLI persistence (#96380) · ...
zaidazmi · 2026-06-24 · via Recent Commits to openclaw:main

@@ -279,6 +279,100 @@ If you use your own Compose file or `docker run` command, add the same host

279279

mapping yourself, for example

280280

`--add-host=host.docker.internal:host-gateway`.

281281282+

### Claude CLI backend in Docker

283+284+

The official OpenClaw Docker image does not pre-install Claude Code. Install and

285+

log in to Claude Code inside the container user that runs OpenClaw, then persist

286+

that container home so image upgrades do not erase the binary or Claude auth

287+

state.

288+289+

For new Docker installs, enable a persistent `/home/node` volume before running

290+

setup:

291+292+

```bash

293+

export OPENCLAW_IMAGE="ghcr.io/openclaw/openclaw:latest"

294+

export OPENCLAW_HOME_VOLUME="openclaw_home"

295+

./scripts/docker/setup.sh

296+

```

297+298+

For an existing Docker install, stop the stack first and reload the current

299+

Docker `.env` values before rerunning setup. The setup script does not read

300+

`.env` on its own; it rewrites `.env` from the current shell and defaults. For

301+

the generated `.env`, run:

302+303+

```bash

304+

set -a

305+

. ./.env

306+

set +a

307+

export OPENCLAW_HOME_VOLUME="${OPENCLAW_HOME_VOLUME:-openclaw_home}"

308+

./scripts/docker/setup.sh

309+

```

310+311+

If your `.env` contains values your shell cannot source, manually re-export the

312+

existing values you rely on first, such as `OPENCLAW_IMAGE`, ports, bind mode,

313+

custom paths, `OPENCLAW_EXTRA_MOUNTS`, sandbox, and skip-onboarding settings.

314+

The generated overlay mounts the home volume for both `openclaw-gateway` and

315+

`openclaw-cli`.

316+317+

Run the remaining commands with the generated Compose overlay so both services

318+

mount the persisted home. If your setup also uses `docker-compose.override.yml`,

319+

include it before `docker-compose.extra.yml`.

320+321+

Install Claude Code in that persisted home:

322+323+

```bash

324+

docker compose -f docker-compose.yml -f docker-compose.extra.yml run --rm \

325+

--entrypoint sh openclaw-cli -lc \

326+

'curl -fsSL https://claude.ai/install.sh | bash'

327+

```

328+329+

The native installer writes the `claude` binary under

330+

`/home/node/.local/bin/claude`. Tell OpenClaw to use that container path:

331+332+

```bash

333+

docker compose -f docker-compose.yml -f docker-compose.extra.yml run --rm \

334+

openclaw-cli config set \

335+

agents.defaults.cliBackends.claude-cli.command \

336+

/home/node/.local/bin/claude

337+

```

338+339+

Log in and verify from inside the same persisted container home:

340+341+

```bash

342+

docker compose -f docker-compose.yml -f docker-compose.extra.yml run --rm \

343+

--entrypoint /home/node/.local/bin/claude openclaw-cli auth login

344+

docker compose -f docker-compose.yml -f docker-compose.extra.yml run --rm \

345+

--entrypoint /home/node/.local/bin/claude openclaw-cli auth status --text

346+

docker compose -f docker-compose.yml -f docker-compose.extra.yml run --rm \

347+

openclaw-cli models auth login \

348+

--provider anthropic --method cli --set-default

349+

docker compose -f docker-compose.yml -f docker-compose.extra.yml run --rm \

350+

openclaw-cli models list --provider anthropic

351+

```

352+353+

After that, you can use the bundled `claude-cli` backend:

354+355+

```bash

356+

docker compose -f docker-compose.yml -f docker-compose.extra.yml run --rm \

357+

openclaw-cli agent \

358+

--agent main \

359+

--model claude-cli/claude-sonnet-4-6 \

360+

--message "Say hello from Docker Claude CLI"

361+

```

362+363+

`OPENCLAW_HOME_VOLUME` persists the native Claude Code install under

364+

`/home/node/.local/bin` and `/home/node/.local/share/claude`, plus Claude Code

365+

settings and auth state under `/home/node/.claude` and `/home/node/.claude.json`.

366+

Persisting only `/home/node/.openclaw` is not enough for Claude CLI reuse. If

367+

you use `OPENCLAW_EXTRA_MOUNTS` instead of a home volume, mount all of those

368+

Claude paths into both Docker services.

369+370+

<Note>

371+

For shared production automation or predictable Anthropic billing, prefer the

372+

Anthropic API-key path. Claude CLI reuse follows Claude Code's installed

373+

version, account login, billing, and update behavior.

374+

</Note>

375+282376

### Bonjour / mDNS

283377284378

Docker bridge networking usually does not forward Bonjour/mDNS multicast