Skip to content

Migration

What Happened

OpenClaw gateway failed to start with:

MissingEnvVarError: Missing env var "CLAWDBOT_GATEWAY_TOKEN" 
referenced at config path: gateway.auth.token

User had the token set, but under wrong name.

Investigation

Project was renamed: clawdbotmoltbotopenclaw

Config file (~/.clawdbot/moltbot.json) still referenced old env var:

"gateway": {
  "auth": {
    "token": "${CLAWDBOT_GATEWAY_TOKEN}"
  }
}

But the new convention uses OPENCLAW_* prefix.

Resolution

  1. Updated config to use ${OPENCLAW_GATEWAY_TOKEN}
  2. Renamed env var in Keychain and wrapper script
  3. Doctor command now warns about deprecated vars:
- Deprecated legacy environment variables detected (ignored).
- Use OPENCLAW_* equivalents instead:
  CLAWDBOT_GATEWAY_TOKEN -> OPENCLAW_GATEWAY_TOKEN

Lesson

Renaming projects is deceptively hard. Things that need updating:

ArtifactOften Missed
Env var prefixesPROJECT_*NEWNAME_*
Config paths~/.oldname/~/.newname/
LaunchAgent labelscom.oldname.ai.newname.
Keychain entriesAccount/service names
SymlinksMay point to old locations

OpenClaw’s doctor command handles some of this via auto-migration, but env vars in user scripts/configs require manual updates.

Read more

What Happened

Hugo blog had a symlink content/posts pointing to /Users/deok/brainFucked/10-Blog/published - but the current user is koed, not deok.

The blog appeared set up but couldn’t find any content. The path was a remnant from a different machine/user setup.

Why It Matters

Common gotcha when:

  • Migrating dotfiles/configs between machines
  • Cloning repos with absolute path symlinks
  • Working across different user accounts

Symlinks with hardcoded absolute paths don’t survive machine migrations.

Resolution

rm content/posts
ln -s /Users/koed/Dev/BrainFucked/10-Blog/published content/posts

Also had to create the published/ directory which didn’t exist.

Lesson

  • Prefer relative symlinks when possible
  • Check symlink targets after cloning repos
  • Audit absolute paths in dotfiles before migration