#17916: [ fix ] : correct config directory path during onboarding
docker
size: XS
Cluster:
Docker Build Fixes
Changed the target configuration directory from the legacy /home/node/.clawdbot to /home/node/.openclaw.
Fixed #17524
Change Type
[x] Bug fix
[ ] Feature
[ ] Refactor
[ ] Docs
[ ] Security hardening
[x] Chore/infra
Before:
- CLI output: Config: .../.clawdbot/moltbot.json (Host dir empty).
After:
- CLI output: Config: .../.openclaw/moltbot.json (Host dir populated).
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Added `OPENCLAW_STATE_DIR=/home/node/.openclaw` environment variable to both Docker services (`openclaw-gateway` and `openclaw-cli`). This ensures the application correctly uses the `.openclaw` directory instead of potentially falling back to legacy `.clawdbot` paths during onboarding.
- Sets explicit state directory path for Docker containers
- Aligns with existing volume mounts that already use `/home/node/.openclaw`
- Fixes config path display issue reported in #17524
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- The change explicitly sets an environment variable that was previously undefined, ensuring consistent behavior. The code already has fallback logic (`resolveConfigDir` in `src/utils.ts:315`) that honors `OPENCLAW_STATE_DIR`, and the volume mounts already point to `/home/node/.openclaw`. This is a straightforward bug fix with no breaking changes.
- No files require special attention
<sub>Last reviewed commit: 137c199</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#3513: fix(docker): add MOLTBOT_STATE_DIR to resolve permission error
by Suksham-sharma · 2026-01-28
84.8%
#4695: Fixed the default CLI image to use published GHCR image
by TASMAYU · 2026-01-30
82.6%
#8203: fix clawdbot references
by anton-roos · 2026-02-03
82.1%
#17506: Fix Entrypoint in docker-compose
by NeilSCGH · 2026-02-15
81.6%
#3965: Fix Docker Compose configuration for moltbot deployment
by YoByron · 2026-01-29
81.2%
#6235: fix: from source development command
by witcxc · 2026-02-01
81.0%
#11602: fix(config): skip stale legacy config files when openclaw.json exists
by akoscz · 2026-02-08
80.5%
#4467: fix: DEFAULT_SANDBOX_WORKSPACE_ROOT respects STATE_DIR
by Aphroq · 2026-01-30
80.5%
#3561: fix: fail fast when both state dirs exist
by adityarao3 · 2026-01-28
80.4%
#3207: fix: use .moltbot for device identity directory
by aadeina · 2026-01-28
80.0%