Target environment: Ubuntu + nvm + systemd | Node ≥22 | As of 2026-03
clawdbot (~/.clawdbot/) → moltbot (~/.moltbot/) → openclaw (~/.openclaw/)
⚠️ Known Issue: GitHub Issue #5103
An “overwrite install” from clawdbot to OpenClaw does not stop/remove the old service or uninstall the old npm package. This results in dual services running, port 18789 conflicts, and token mismatches — leaving the system in a broken state. You must manually clean up the old environment before installing OpenClaw.
Prerequisites
Check your current environment before starting.
# Check Node.js version (22 or higher required)
node -v
npm -v
# Check currently installed claw-related packages
npm list -g --depth=0 2>/dev/null | grep -E "claw|molt|openclaw"
# Check currently running services
systemctl --user list-units | grep -E "claw|molt|openclaw"
OpenClaw requires Node ≥22. If you’re using nvm, run nvm install 22, or if you already have Node 24, that works too. clawdbot has been confirmed to work with Node 24 as well.
Stop the clawdbot Service
Stop and disable the Gateway running as a systemd user service.
① Stop and disable the Gateway service
systemctl --user stop clawdbot-gateway.service
systemctl --user disable clawdbot-gateway.service
② Delete the service file and reload the daemon
rm -f ~/.config/systemd/user/clawdbot-gateway.service
systemctl --user daemon-reload
③ Force-kill any remaining processes
pkill -f clawdbot || true
Note: Do not use
sudo systemctl --user. It does not work correctly with user services. Always runsystemctl --user(without sudo).
Uninstall clawdbot
Remove the global npm packages. Also remove moltbot (the intermediate name) just in case.
npm uninstall -g clawdbot
npm uninstall -g moltbot
# Verify removal
which clawdbot 2>/dev/null && echo "Still present" || echo "OK: Removed"
which moltbot 2>/dev/null && echo "Still present" || echo "OK: Removed"
Back Up and Delete Configuration Files
Back up the old configuration directories before deleting them, in case you need to migrate settings to OpenClaw.
Backup
# Create backup directory
mkdir -p ~/claw-backup
# Copy only directories that exist
[ -d ~/.clawdbot ] && cp -r ~/.clawdbot ~/claw-backup/.clawdbot-bak
[ -d ~/.moltbot ] && cp -r ~/.moltbot ~/claw-backup/.moltbot-bak
# Back up workspace too (if it exists)
[ -d ~/clawd ] && cp -r ~/clawd ~/claw-backup/clawd-bak
echo "Backup contents:"
ls -la ~/claw-backup/
Deletion
rm -rf ~/.clawdbot
rm -rf ~/.moltbot
~/.clawdbot/ contains clawdbot.json (configuration), agents/ (agent settings and sessions), gateway tokens, and more. The memory/ directory may contain accumulated project context, so check its contents before deciding whether to back it up.
Verify No Remaining Processes
Confirm the system is in a clean state.
# Confirm no claw-related processes are running
ps aux | grep -E "(clawdbot|moltbot)" | grep -v grep
# → No output means OK
# Confirm port 18789 is free
ss -tlnp | grep 18789
# → No output means OK
# Confirm no services remain in systemd
systemctl --user list-units | grep -E "claw|molt"
# → No output means OK
If all three commands produce no output, clawdbot has been completely uninstalled. You can proceed with installing OpenClaw.
Install OpenClaw
The officially recommended method is a global npm install.
npm install -g openclaw@latest
# Verify installation
openclaw --version
which openclaw
According to the official documentation, clawdbot and moltbot are retained as valid aliases for OpenClaw. However, for new installations, using the openclaw command is the correct approach.
Even if you see deprecation warnings, the installation itself has succeeded. If you see added NNN packages, everything is fine.
OpenClaw Initial Setup
# Launch the onboard wizard (--install-daemon also registers the systemd service)
openclaw onboard --install-daemon
The wizard will ask the following in order:
① Security consent — Risk acknowledgment regarding agent permissions. Select Yes to proceed.
② Onboarding mode — Select QuickStart (you can fine-tune settings later with openclaw configure).
③ Default model — You can proceed with the default value. There is a mechanism to automatically sync authentication from the Claude CLI.
Note: Anthropic OAuth Change
In January 2026, Anthropic discontinued third-party OAuth access. If Claude CLI authentication sync is unavailable, you will need to set an Anthropic API key (pay-as-you-go) in~/.openclaw/openclaw.json.
④ Channel selection — Configure the channels you need, or Skip for now. If you need Discord integration, you can set it up later with openclaw channels login.
⑤ Skills / Hooks — For the first run, it’s safest to select No / Skip to complete the wizard.
Verify Operation
# Confirm version and authentication sync
openclaw --version
# Verify Gateway startup
openclaw gateway
# → Success if it shows: Control UI: http://127.0.0.1:18789/
# → Press Ctrl+C to stop for now
# Verify systemd service status
systemctl --user status openclaw-gateway.service
# Run a comprehensive health check
openclaw doctor
Security Note: Canvas Host Binding
OpenClaw’s Canvas Host component binds to0.0.0.0by default (accessible from all devices on the LAN). It is recommended to restrict it to loopback by adding the following to~/.openclaw/openclaw.json:{ "gateway": { "bind": "loopback" } }
Migrate Old Settings (Optional)
If you want to carry over settings from the clawdbot era. The configuration file format is compatible.
# Copy settings from backup
cp -r ~/claw-backup/.clawdbot-bak/* ~/.openclaw/
# Verify configuration consistency
openclaw doctor --fix
Gateway tokens are not migrated (new ones are generated). Any client-side tokens used for Control UI or WebSocket connections will also need to be updated.
Revoke OAuth Tokens (Optional)
OAuth tokens for external services connected during the clawdbot era remain on the service provider’s servers even after uninstalling. For security, if they are no longer needed, you should manually revoke them on each service.
- Google — Account → Security → Third-party access
- Discord — User Settings → Authorized Apps → Deauthorize
- Slack — slack.com/apps/manage → Search for the app and remove it
- GitHub — Settings → Applications → Authorized OAuth Apps
- Telegram — Revoke the old token via BotFather
Quick Reference (Copy-Paste Ready)
A consolidated command summary for one-shot execution, assuming you understand all of the above.
Phase 1: Complete clawdbot Removal
# Stop and remove service
systemctl --user stop clawdbot-gateway.service 2>/dev/null
systemctl --user disable clawdbot-gateway.service 2>/dev/null
rm -f ~/.config/systemd/user/clawdbot-gateway.service
systemctl --user daemon-reload
pkill -f clawdbot || true
# Backup
mkdir -p ~/claw-backup
[ -d ~/.clawdbot ] && cp -r ~/.clawdbot ~/claw-backup/.clawdbot-bak
[ -d ~/.moltbot ] && cp -r ~/.moltbot ~/claw-backup/.moltbot-bak
# Remove npm packages
npm uninstall -g clawdbot
npm uninstall -g moltbot
# Remove configuration directories
rm -rf ~/.clawdbot ~/.moltbot
Phase 2: Fresh OpenClaw Install
# Install
npm install -g openclaw@latest
# Initial setup (with daemon registration)
openclaw onboard --install-daemon
# Health check
openclaw doctor
References: openclaw/openclaw | Official Uninstall Documentation | Issue #5103 (Migration Problem)
Created: 2026-03-14 | Latest version: v2026.3.11 | Target: Ubuntu + nvm + systemd environments

