Skip to content

Conversation

@mgpai22
Copy link

@mgpai22 mgpai22 commented Jan 31, 2026

BREAKING CHANGE: Container env vars renamed from CLAWDBOT_* to OPENCLAW_* and CLAWDBOT_BIND_MODE worker env var renamed to OPENCLAW_BIND_MODE.

  • Rename npm package from clawdbot to openclaw in Dockerfile
  • Update all config paths from .clawdbot to .openclaw
  • Rename container env vars (CLAWDBOT_GATEWAY_TOKEN -> OPENCLAW_GATEWAY_TOKEN, CLAWDBOT_DEV_MODE -> OPENCLAW_DEV_MODE, CLAWDBOT_BIND_MODE -> OPENCLAW_BIND_MODE)
  • Update CLI references from clawdbot to openclaw in process detection
  • Update R2 sync/restore paths from clawdbot/ to openclaw/
  • Add backward-compatible R2 restore from legacy clawdbot/ backup dirs with automatic config file rename (clawdbot.json -> openclaw.json)
  • Generate random gateway token when none provided, since openclaw v2026.1.29 requires auth for non-loopback binds (--bind lan)

BREAKING CHANGE: Container env vars renamed from CLAWDBOT_* to OPENCLAW_*
and CLAWDBOT_BIND_MODE worker env var renamed to OPENCLAW_BIND_MODE.

- Rename npm package from clawdbot to openclaw in Dockerfile
- Update all config paths from .clawdbot to .openclaw
- Rename container env vars (CLAWDBOT_GATEWAY_TOKEN -> OPENCLAW_GATEWAY_TOKEN,
  CLAWDBOT_DEV_MODE -> OPENCLAW_DEV_MODE, CLAWDBOT_BIND_MODE -> OPENCLAW_BIND_MODE)
- Update CLI references from clawdbot to openclaw in process detection
- Update R2 sync/restore paths from clawdbot/ to openclaw/
- Add backward-compatible R2 restore from legacy clawdbot/ backup dirs
  with automatic config file rename (clawdbot.json -> openclaw.json)
- Generate random gateway token when none provided, since openclaw v2026.1.29
  requires auth for non-loopback binds (--bind lan)
Copy link

@HofmannZ HofmannZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test this?

@whit3rabbit
Copy link

Deployment Notes - Additional Changes Needed

Successfully deployed this PR but encountered two issues that needed fixes:

  1. WebSocket Token Authentication Issue

The openclaw Control UI client doesn't automatically pass the ?token= parameter from the page URL to the WebSocket connection. This causes authentication failures even when users provide the correct token.

Fix: Modified the worker to automatically inject the token into WebSocket connections (see src/index.ts):

// Inject gateway token into WebSocket URL
// OpenClaw v2026.1.29+ requires token auth for all connections
const userToken = url.searchParams.get('token');
const envToken = c.env.MOLTBOT_GATEWAY_TOKEN;
const tokenToUse = userToken || envToken;

if (tokenToUse) {
wsUrl.searchParams.set('token', tokenToUse);
wsRequest = new Request(wsUrl.toString(), request);
}

  1. Admin UI Still Using Old CLI Commands

The admin API routes in src/routes/api.ts were not updated and still reference clawdbot devices instead of openclaw devices. This
breaks the admin UI's device pairing functionality.

Fix: Updated all CLI commands from clawdbot devices to openclaw devices in src/routes/api.ts (lines 36, 88, 120, 147).


Suggested PR Updates:

  • Add worker-side token injection for WebSocket connections to handle openclaw v2026.1.29's authentication requirements
  • Update all remaining clawdbot CLI references to openclaw in admin API routes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants