From 8f068817ca443b7ea2c3a7ae0fdb46c3bd35673c Mon Sep 17 00:00:00 2001 From: {Suksham-sharma} Date: Wed, 28 Jan 2026 23:41:03 +0530 Subject: [PATCH] fix(docker): add MOLTBOT_STATE_DIR to resolve permission error When running in Docker, the app fell back to os.homedir() to resolve the state directory, but the container's HOME=/home/node didn't match the mounted volume permissions properly. By explicitly setting MOLTBOT_STATE_DIR=/home/node/.clawdbot in the container environment, the app now correctly uses the mounted volume path, fixing the "EACCES: permission denied, mkdir '/home/node/.clawdbot/agents/main/agent'" error. Fixes #3480 --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 8ce610d6a..256852965 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,6 +3,7 @@ services: image: ${CLAWDBOT_IMAGE:-moltbot:local} environment: HOME: /home/node + MOLTBOT_STATE_DIR: /home/node/.clawdbot TERM: xterm-256color CLAWDBOT_GATEWAY_TOKEN: ${CLAWDBOT_GATEWAY_TOKEN} CLAUDE_AI_SESSION_KEY: ${CLAUDE_AI_SESSION_KEY} @@ -31,6 +32,7 @@ services: image: ${CLAWDBOT_IMAGE:-moltbot:local} environment: HOME: /home/node + MOLTBOT_STATE_DIR: /home/node/.clawdbot TERM: xterm-256color BROWSER: echo CLAUDE_AI_SESSION_KEY: ${CLAUDE_AI_SESSION_KEY}