指南——如何升级部署在 Docker 中的 Openclaw

指南——如何升级部署在 Docker 中的 Openclaw


Openclaw Inteligencia Artificial manual
Last updated on

This guide are verified in this environment:

Debian 12.2.0
Docker version 26.0.2
openclaw:2026.9.6-browser
阿里云主机​2CPU/2G

I suffered problems to upgrade the 2026.3.7 to 2026.9.6-browser at first. Then I tried to upgrade to 2026.7.35 at first and it succeeded without any human actions. But it suffered the same problem when I tried to upgrade it from 2026.7.35 to 2026.9.6-browser.

backup your data

if you mount the local data(~/.openclaw) into docker:

docker compose -f docker-compose.prod.yml down
tar czvf openclaw_backup_$(date +%F).tar.gz ~/.openclaw

update docker compose file

The new upgrade process needs to create .cache and .npm folders which did not use it before. we need to create them and update docker compose file and .env file.

 mkdir -p ~/.cache
 mkdir -p ~/.npm
 chown -R 1000:1000 ~/.cache
 chown -R 1000:1000 ~/.npm

update your docker compose file and .env and mount both folders.

volumes:
           - ${CACHE_DIR}:/home/node/.cache
           - ${NPM_DIR}:/home/node/.npm

otherwise you’ll get the following errors: Unable to create fallback OpenClaw temp dir: /home/node/.cache/openclaw-1000 | ENOEN

fix upgrade errors

currently you will still suffer problems and cycle restarting after run docker compose, like plugin and migration failures.

[auth-profiles/persistence] Auth profile store ~/.openclaw/agents/main/agent/openclaw-agent.sqlite requires legacy credential migration; affected providers: volcengine; run openclaw doctor —fix. code=AUTH_PROFILE_MIGRATION_REQUIRED affectedProviders=[“volcengine”] action=“openclaw doctor —fix”

[plugins] openclaw-qqbot failed during load from /home/node/.openclaw/extensions/openclaw-qqbot/dist/index.js: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath ’./plugin-sdk’ is not defined by “exports” in /home/node/.openclaw/tmp/plugin-captures/d9f7544d-6f81-45e8-88a4-dcfcab41ba71/captures/openclaw-plugin-build-qMdzcL/node_modules/openclaw/package.json imported from /home/node/.openclaw/tmp/plugin-captures/d9f7544d-6f81-45e8-88a4-dcfcab41ba71/captures/openclaw-plugin-build-qMdzcL/package-0/node_modules/openclaw-qqbot/dist/index.js

Get into container and fix it:

docker compose -f docker-compose.prod.yml run -it --rm --entrypoint sh openclaw-gateway

# 进入容器后依次执行:
openclaw update repair # 修复插件安装
openclaw doctor --fix # 执行认证配置迁移
openclaw gateway start # 手动启动网关

docker compose -f docker-compose.prod.yml up -d

Openclaw will fix it by itself.

to check from qq and ask a simple question.