How to Migrate from Moltbot to OpenClaw
Migrating from legacy Moltbot to modern OpenClaw gives you access to active development, better performance, and a thriving community. This guide covers exporting Moltbot configuration, converting it to OpenClaw's format, migrating custom modules, transferring data, and executing a safe cutover. With proper preparation, you'll complete the migration in 2-4 hours with minimal risk.
Why This Is Hard to Do Yourself
These are the common pitfalls that trip people up.
TOML vs YAML config
Moltbot uses TOML, OpenClaw uses YAML with different structure
Module API incompatibility
Moltbot modules use different hooks and APIs than OpenClaw skills
Database schema differences
Moltbot and OpenClaw store data differently
Production cutover risk
Switching systems without data loss or extended downtime
Step-by-Step Guide
Export Moltbot configuration and data
Backup your Moltbot installation.
cd ~/moltbot
cp config.toml config.toml.backup
cp -r modules modules.backup
cp moltbot.db moltbot.db.backupWarning: Keep Moltbot running during the entire migration process. Only shut it down when you're ready for final cutover.
Install OpenClaw in a separate directory
Set up OpenClaw without touching Moltbot.
cd ~
git clone https://github.com/openclaw/openclaw.git
cd openclaw
npm installConvert Moltbot TOML config to OpenClaw YAML
Map Moltbot config to gateway.yaml.
# Read ~/moltbot/config.toml
# Create ~/openclaw/gateway.yaml from gateway.example.yaml
cp gateway.example.yaml gateway.yaml
nano gateway.yaml
# Map:
# [server] port -> server.port
# [auth] api_keys -> auth.apiKeys
# [cors] allowed_origins -> cors.originsMigrate custom modules to OpenClaw skills
Port Moltbot modules to OpenClaw skill format.
# For each custom module in ~/moltbot/modules:
# 1. Create new skill: mkdir ~/openclaw/skills/your-skill
# 2. Create skill.yaml with metadata
# 3. Port module code to skill format
# 4. Update imports: moltbot -> @openclaw/sdk
# 5. Test: npm run devWarning: Moltbot modules are NOT compatible with OpenClaw skills. You'll need to refactor the code. Budget extra time for complex modules.
Migrate data from Moltbot database
Export and import conversation data.
# Export from Moltbot SQLite DB
sqlite3 ~/moltbot/moltbot.db.backup ".dump messages" > messages.sql
# Adjust schema for OpenClaw if needed
# Import to OpenClaw
sqlite3 ~/openclaw/openclaw.db < messages.sql
# Verify:
sqlite3 ~/openclaw/openclaw.db "SELECT COUNT(*) FROM messages;"Test OpenClaw on a different port
Run parallel testing without disrupting Moltbot.
cd ~/openclaw
# Edit gateway.yaml to use port 3001 (Moltbot is on 3000)
npm start
# Test at localhost:3001
# Verify all skills and migrated data workExecute production cutover
Stop Moltbot and switch to OpenClaw.
# Stop Moltbot
cd ~/moltbot
npm stop # Or pkill -f moltbot
# Update OpenClaw to use original port
cd ~/openclaw
nano gateway.yaml # Change port to 3000
npm start
# Verify at localhost:3000Configure auto-start and archive Moltbot
Set up OpenClaw service and backup Moltbot.
# Set up systemd service for OpenClaw
# After 1-2 weeks of stable operation:
cd ~
tar czf moltbot-archive.tar.gz moltbot/
# Store archive safely, then optionally remove moltbot directoryNeed Expert Moltbot Migration Help?
Migrating from Moltbot to OpenClaw is complex โ config conversion, module refactoring, data migration, and zero-downtime cutover. Our specialists have migrated dozens of Moltbot instances. Get a tested, safe migration with full rollback capability.
Get matched with a specialist who can help.
Sign Up for Expert Help โ