When troubleshooting hasn't worked and you need a clean slate, here's how to factory reset OpenClaw — on both native installs and Docker containers.
When to Factory Reset
A factory reset is the right move when:
openclaw doctor --fixdidn't solve your issue- The dashboard loads but nothing works
- OpenClaw doesn't respond to any commands
- You see persistent connection or token errors after multiple fix attempts
- You want to start over with a clean configuration
Warning: A factory reset removes your configuration, paired devices, and memory. Your AI provider API key and Telegram bot token will need to be re-entered.
Native Install Reset
Step 1: Stop OpenClaw
openclaw gateway stop
If that doesn't work:
# Find and kill the process
pkill -f openclaw
Step 2: Back Up Important Data (Optional)
# Save your current config
cp ~/.openclaw/openclaw.json ~/openclaw-backup.json
# Save memory data if you want to keep it
cp -r ~/.openclaw/memory ~/openclaw-memory-backup
Step 3: Remove the Data Directory
rm -rf ~/.openclaw
This removes:
- Configuration (
openclaw.json) - Device pairings
- Gateway tokens
- Memory data
- Logs
Step 4: Reinitialize
openclaw setup
This walks you through the initial setup wizard: gateway mode, AI provider, and API key.
Step 5: Reconfigure
# Set gateway mode
openclaw config set gateway.mode local
# Set your AI provider
openclaw config set ai.apiKey "sk-ant-..."
# Reconnect Telegram (if used)
openclaw config set telegram.token "your-bot-token"
# Start
openclaw restart
Step 6: Re-Pair Devices
Open your browser or Telegram bot and approve the new device pairing:
openclaw devices list
openclaw devices approve DEVICE_ID
Docker Container Reset
Option 1: Rebuild the Container
# Stop and remove the container
docker stop YOUR_CONTAINER_ID
docker rm YOUR_CONTAINER_ID
# Remove the data volume (this is the actual reset)
docker volume rm openclaw-data
# Recreate
docker run -d \
--name openclaw \
-v openclaw-data:/app/data \
-p 3001:3001 \
-e OPENCLAW_GATEWAY_TOKEN="new-stable-token" \
-e ANTHROPIC_API_KEY="sk-ant-..." \
openclaw-stack
Option 2: Reset Inside the Container
# Enter the container
docker exec -it YOUR_CONTAINER_ID bash
# Remove the data directory
rm -rf /app/data/*
# Re-run setup
openclaw setup
# Exit
exit
# Restart the container
docker restart YOUR_CONTAINER_ID
Option 3: Docker Compose Reset
# Stop everything
docker-compose down
# Remove volumes
docker-compose down -v
# Rebuild and start
docker-compose up -d
Partial Reset Options
You don't always need a full factory reset. Here are targeted resets:
Reset Config Only
openclaw config reset
openclaw config set gateway.mode local
openclaw config set ai.apiKey "your-key"
Reset Devices Only
# Remove all paired devices
openclaw devices list
openclaw devices remove --all
Reset Gateway Token Only
openclaw config unset gateway.token
openclaw doctor --generate-gateway-token
openclaw restart
Clear Memory Only
rm -rf ~/.openclaw/memory
openclaw restart
After the Reset
Post-reset checklist:
- Verify gateway starts:
openclaw statusshould showgateway: running - Check logs:
openclaw logs --tail 20— look for[gateway] listening on - Run doctor:
openclaw doctor— should show all checks passing - Test Telegram: Send a message to your bot
- Test browser: Open the dashboard URL
When Reset Doesn't Help
If a factory reset doesn't fix your issue, the problem is likely outside OpenClaw:
- Network/firewall blocking the gateway port
- Node.js version too old (need 22+)
- Disk full — no space for data files
- OS-level permission issues
Check:
node --version # Need 22+
df -h # Check disk space
openclaw logs --tail 50 # Look for OS-level errors
Skip the Reset Cycle
ClawTank manages your OpenClaw instance with automated health checks and recovery. If something goes wrong, use the dashboard to rebuild your container in one click — no manual reset needed.
