ClawTank
DocsTipsBlogDeploy now
All posts
How to Reset OpenClaw Completely: Factory Reset, Config Reset & Fresh Start [2026]

How to Reset OpenClaw Completely: Factory Reset, Config Reset & Fresh Start [2026]

March 1, 2026|7 min read
Table of Contents
  • Which Reset Do You Need?
  • Reset Configuration
  • Reset the AI Model
  • Reset Devices
  • Reset Memory
  • Reset Gateway Token
  • Full Factory Reset
  • Native Install
  • Docker Container
  • Docker Compose
  • Clean Reinstall
  • Step 1: Remove Everything
  • Step 2: Reinstall
  • Step 3: Set Up
  • Reset Inside Docker Without Rebuilding
  • After Any Reset
  • Avoid Resets Entirely

Haven't installed OpenClaw yet?

curl -fsSL https://openclaw.ai/install.sh | bash
iwr -useb https://openclaw.ai/install.ps1 | iex
curl -fsSL https://openclaw.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

Worried it'll affect your machine? ClawTank — cloud deploy in 60s, zero risk to your files.

OpenClaw has several types of reset, and choosing the wrong one either does too little (problem persists) or too much (you lose data you wanted to keep). This guide covers every reset scenario with exact commands so you can pick the right one.

Which Reset Do You Need?

Problem Reset Type Command What You Lose
Bad config settings Config reset openclaw config reset Settings only
Wrong AI model Model reset openclaw config unset ai.model Model selection
Device won't connect Device reset openclaw devices remove --all Device pairings
Memory is wrong or stale Memory reset rm -rf ~/.openclaw/memory Conversation memory
Gateway token errors Token reset openclaw doctor --generate-gateway-token Gateway token
Nothing works anymore Factory reset rm -rf ~/.openclaw Everything
Broken installation Clean reinstall Uninstall + reinstall Everything + binary

Read the section for your situation. If you are unsure, start with a config reset -- it is the least destructive option and solves most problems.

Reset Configuration

Use this when your openclaw.json settings are wrong, corrupted, or you want to go back to defaults without losing device pairings or memory.

openclaw config reset

This replaces your configuration file[^1] with the default template. After running it, you need to re-enter your essential settings:

openclaw config set gateway.mode local
openclaw config set ai.provider anthropic
openclaw config set ai.apiKey "sk-ant-..."
openclaw restart

Your device pairings, memory, and logs are untouched. Only ~/.openclaw/openclaw.json is affected.

When to use this: You changed a setting and something broke, you pasted invalid JSON into the config file, or openclaw config validate shows errors.

Reset the AI Model

Use this when you want to switch models or go back to the default model without touching anything else.

To clear the current model and fall back to the default:

openclaw config unset ai.model
openclaw restart

To switch to a specific model:

openclaw config set ai.model "claude-sonnet-4-6"
openclaw restart

Other valid models include claude-opus-4-6, gpt-4o, deepseek-chat, and any Ollama model name if you use a local provider.

When to use this: The current model is too expensive, too slow, or giving poor results. This changes nothing except which model handles your prompts.

Reset Devices

Use this when browsers or Telegram bots cannot connect, or you see "device token mismatch" errors after a gateway restart.

Remove all paired devices:

openclaw devices remove --all
openclaw restart

After this, every client (browser, Telegram, mobile) will need to re-pair. When a device connects, approve it:

openclaw devices list
openclaw devices approve DEVICE_ID

To reset a single device instead of all of them:

openclaw devices list
openclaw devices remove DEVICE_ID

When to use this: Device token mismatch errors, phantom "connected" devices that no longer exist, or you want to revoke access from a specific client.

Deploy your own AI assistant

ClawTank deploys OpenClaw for you — no servers, no Docker, no SSH. Free 14-day trial included.

Start my free trial

Reset Memory

Use this when OpenClaw's memory contains incorrect information, outdated facts, or you simply want a clean slate for conversations.

rm -rf ~/.openclaw/memory
openclaw restart

In Docker containers, the memory directory lives inside the data volume[^3]:

docker exec -it YOUR_CONTAINER bash
rm -rf /app/data/memory
exit
docker restart YOUR_CONTAINER

When to use this: The assistant keeps referencing outdated information, memory has grown very large and slowed things down, or you are repurposing the instance for a different use case.

Reset Gateway Token

Use this when you see token-related connection errors but do not want to lose your configuration or device pairings.

openclaw config unset gateway.token
openclaw doctor --generate-gateway-token
openclaw restart

After this, all connected devices will need to re-pair because the gateway identity has changed.

To prevent this from happening again, pin the token so it survives restarts:

openclaw config set gateway.token "a-stable-token-you-choose"

Or set it as an environment variable:

export OPENCLAW_GATEWAY_TOKEN="a-stable-token-you-choose"

When to use this: Persistent "connect failed" or "4008" WebSocket errors that openclaw doctor --fix does not resolve.

Full Factory Reset

Use this when nothing else works and you need to start completely fresh. This deletes all OpenClaw data -- configuration, devices, memory, logs, tokens.

Native Install

openclaw gateway stop
rm -rf ~/.openclaw
openclaw setup

The openclaw setup command walks you through the initial configuration wizard. After setup, re-enter your API key and restart:

openclaw config set ai.apiKey "sk-ant-..."
openclaw restart

Docker Container

docker stop YOUR_CONTAINER
docker rm YOUR_CONTAINER
docker volume rm openclaw-data

Then recreate:

docker run -d \
  --name openclaw \
  -v openclaw-data:/app/data \
  -p 3001:3001 \
  -e OPENCLAW_GATEWAY_TOKEN="your-stable-token" \
  -e ANTHROPIC_API_KEY="sk-ant-..." \
  openclaw-stack

Docker Compose

docker-compose down -v
docker-compose up -d

The -v flag removes named volumes[^3], which is where OpenClaw stores all persistent data.

When to use this: openclaw doctor --fix has failed, partial resets did not help, or you want to wipe everything and start over.

Clean Reinstall

Use this when the OpenClaw binary itself may be corrupted, or you are on an old version and want a guaranteed clean start.

Step 1: Remove Everything

openclaw gateway stop
rm -rf ~/.openclaw
npm uninstall -g openclaw

Verify it is gone:

which openclaw
# Should return nothing

Step 2: Reinstall

macOS / Linux:

curl -fsSL https://openclaw.ai/install.sh | bash

Windows (PowerShell):

iwr -useb https://openclaw.ai/install.ps1 | iex

Step 3: Set Up

openclaw setup

This creates a fresh ~/.openclaw directory[^2] with default configuration and walks you through initial setup.

When to use this: You suspect the binary is corrupted, you are jumping multiple major versions, or every other reset option has failed.

Reset Inside Docker Without Rebuilding

If you do not want to destroy and recreate your Docker container, you can reset from inside it:

docker exec -it YOUR_CONTAINER bash
rm -rf /app/data/*
openclaw setup
exit
docker restart YOUR_CONTAINER

This is equivalent to a factory reset but keeps the same container and port mapping.

After Any Reset

Regardless of which reset you performed, verify that OpenClaw is working:

openclaw status          # Should show gateway: running
openclaw doctor          # Should show all checks passing
openclaw devices list    # Should show your devices

If the gateway is not running after a reset, check the logs:

openclaw logs --tail 20

Look for [gateway] listening on -- that line confirms the gateway has fully started.

Avoid Resets Entirely

ClawTank manages your OpenClaw instance with one-click container rebuilds, automated health checks, and persistent configuration. When something goes wrong, hit "Rebuild" in the dashboard instead of running manual reset commands.

[^1]: OpenClaw stores its configuration in ~/.openclaw/openclaw.json (native) or /app/data/openclaw.json (Docker). See the OpenClaw GitHub repository for the full default config template. [^2]: The ~/.openclaw data directory uses standard filesystem operations for reads and writes. For details on how Node.js applications interact with directories, see the Node.js fs module documentation. [^3]: Docker containers use named volumes to persist data across restarts and rebuilds. The openclaw-data volume is mounted at /app/data inside the container. See the Docker volume documentation for details on volume lifecycle and management.

Enjoyed this article?

Get notified when we publish new guides and tutorials.

Related Articles

OpenClaw Factory Reset: How to Start Completely Fresh [2026]

OpenClaw Factory Reset: How to Start Completely Fresh [2026]

4 min read

Ready to deploy OpenClaw?

No Docker, no SSH, no DevOps. Deploy in under 1 minute.

Start my free trial
ClawTank
TermsPrivacy