OpenClaw 2026.3.13 Upgrade Guide: From Backup to Pitfall Avoidance
This weekend, I upgraded OpenClaw from version 2026.2.2 to 2026.3.13. What I thought would be a simple version update turned into a two-day saga where I stumbled into six distinct pitfalls. I’ve compiled the entire process here to help you avoid the same headaches.
💾 Step 1: Pre-Upgrade Backup (Critical!)
OpenClaw’s configuration is scattered across several locations. Ensure you save the following files:
Files You Must Backup
~/.openclaw/openclaw.json— Main config file (channel settings, tool toggles, etc.)~/.openclaw/.openclaw/openclaw.json— Runtime cache containing auto-generated tokens (New in 3.x)~/.openclaw/workspace/— Workspace files (SOUL.md, MEMORY.md, AGENTS.md, etc.)~/.openclaw/memory_v2/— Bio-Mimetic Memory data (long-term memory storage)/etc/systemd/system/openclaw-gateway.service— Systemd service file (if using systemd)
One-Click Backup Command
# Create a backup directory with a timestamp
BACKUP_DIR="$HOME/openclaw-backup-$(date +%Y%m%d)"
mkdir -p "$BACKUP_DIR"
# Backup config files
cp ~/.openclaw/openclaw.json "$BACKUP_DIR/"
cp ~/.openclaw/.openclaw/openclaw.json "$BACKUP_DIR/runtime.json"
# Archive workspace and memory data
tar -czf "$BACKUP_DIR/workspace.tar.gz" -C ~/.openclaw workspace
tar -czf "$BACKUP_DIR/memory.tar.gz" -C ~/.openclaw memory_v2
# Backup service file (if applicable)
sudo cp /etc/systemd/system/openclaw-gateway.service "$BACKUP_DIR/" 2>/dev/null
echo "Backup completed: $BACKUP_DIR"
🚀 Step 2: Standard Upgrade Process
Follow these steps to upgrade to OpenClaw 2026.3.13:
-
1 Upgrade Node.js
Version 3.x requires Node.js ≥ 22.12. If you usenvm:nvm install 22 && nvm alias default 22 -
2 Upgrade OpenClaw
pnpm update -g openclaw -
3 Configure gateway.mode
Version 3.x mandates this configuration; there is no default value:openclaw config set gateway.mode local -
4 Start the Gateway
openclaw gateway start
⚠️ Three Critical Changes Before Upgrading
Change 1: Node.js Version Requirement
Version 3.x strictly requires Node.js ≥ 22.12.
Note: If you manage services via systemd, you must explicitly configure the Node path in the service file. Otherwise, the service will launch using the system default version (likely v18), causing failures.
Change 2: Auto-Generated Tokens (Crucial!)
This is the biggest shift. Version 3.13 deprecates manual token configuration in favour of high-strength tokens generated automatically at startup.
The Catch: There are now two config files:
~/.openclaw/openclaw.json— Main config (user-editable)~/.openclaw/.openclaw/openclaw.json— Runtime cache (auto-generated, higher priority)
Tokens are stored in the runtime cache. Changes to the main config require a Gateway restart to sync.
Change 3: Binding Mode Syntax
Direct configuration of 0.0.0.0 or localhost is deprecated. Use bindMode instead:
loopback— Local access only (Use this for Feishu Local Plugin)lan— LAN accesscustom— Custom IP
openclaw config set gateway.bindMode loopback
🕳️ Pitfall Log & Solutions
Pitfall 1: Node.js Version Incompatibility
Error: Node.js v22.12+ is required (current: v18.19.1)
Symptom: Systemd service enters a restart loop.
Cause: Systemd environments are isolated; the Node version switched in your terminal does not propagate to the service.
Fix: Add an environment variable to your systemd service file to explicitly specify the Node path.
Pitfall 2: Incorrect Systemd Startup Method
Error: SyntaxError: missing ) after argument list
Cause: Mistakenly treating the openclaw script as a Node script by adding a node prefix in ExecStart.
Fix: Remove the node prefix; execute the openclaw command directly.
Pitfall 3: Missing Configuration
Error: Missing config. Run openclaw setup or set gateway.mode=local
Cause: Version 3.13 enforces gateway.mode configuration; it has no default.
Fix: Run openclaw config set gateway.mode local.
Pitfall 4: Port Occupation
Error: Port 18789 is already in use
Cause: Lingering processes from repeated restarts.
Fix: Kill the process occupying the port:
sudo kill -9 $(lsof -t -i:18789)
Pitfall 5: Token Authentication Mismatch (The Trickiest!)
Error: token_mismatch
Symptom: Feishu cannot connect; authentication fails.
Cause: Manually configured tokens do not match the newly auto-generated tokens.
Fix:
- Extract the auto-generated token:
grep token ~/.openclaw/.openclaw/openclaw.json - Sync it to the main config:
openclaw config set gateway.auth.token "EXTRACTED_TOKEN" - Update the token in the Feishu plugin.
Pitfall 6: Binding Mode Syntax Change
Error: gateway.bind host aliases are legacy
Cause: Version 3.13 deprecated direct 0.0.0.0/localhost configuration.
Fix: Use the new command: openclaw config set gateway.bindMode loopback.
✅ Verifying a Successful Upgrade
Run the following command to check the status:
openclaw status
- Gateway service: running (active)
- Channel: Feishu — ON · OK
- Bind mode: loopback
- Node Version: 22.x.x
💡 Key Takeaways
- Backup First: Never skip backing up all config files before an upgrade.
- Understand Dual Configs: Version 3.13 uses both a main config and a runtime cache. The cache takes precedence for Tokens. I spent ages on this and nearly gave up!
- Systemd Nuances: Service files need explicit Node paths. Do not add the
nodeprefix to the command. - Embrace Auto-Tokens: Accept the auto-generation mechanism. Don't try to force simple manual tokens; they simply won't work anymore.
- bindMode: For Feishu Local Plugin, stick to
loopback. No need to expose ports unnecessarily.