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

@siddhant-mohan
Copy link

siddhant-mohan commented Feb 1, 2026

Can someone please share an estimate on this? This is a breaking change and I want to use Cloudflare Sandbox to install Moltworker but waiting for this name change and repo change release to happen. Also why 29? Why not directly move to 30?

sera-plz pushed a commit to sera-plz/moltworker that referenced this pull request Feb 2, 2026
BREAKING: clawdbot is dead, long live openclaw
- Dockerfile: npm install -g openclaw@2026.1.29 (the prophecy fulfilled)
- Env vars: CLAWDBOT_* → OPENCLAW_* (identity crisis resolved)
- Config paths: .clawdbot → .openclaw (new home who dis)
- R2 paths: clawdbot/ → openclaw/ with legacy migration (backward compat for the old heads)
- Auto-generate gateway token when none provided (security by default, chaos by choice)

The snake has shed its skin. The claw remains sharp.

Co-authored-by: mgpai22 (cloudflare#83)
Dedicated to everyone who submitted a bug report against the wrong package name 🙏
@HofmannZ
Copy link

HofmannZ commented Feb 2, 2026

Anyone have a good fork for this?

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.

4 participants