OpenClaw Troubleshooting: Fix Common Install & Setup Errors (2026)

Most OpenClaw installation errors are caused by outdated Node.js (need 22+), missing system dependencies, or incorrect configuration. Run openclaw doctor to diagnose issues automatically, or check the error-specific fixes below.

This guide covers every common OpenClaw error with step-by-step fixes, plus complete reinstall and uninstall instructions for all platforms.

Quick-Fix Reference Table

Find your error message below for the fastest one-line fix. Scroll down for detailed walkthroughs.

ErrorFixCommand
npm install failedCheck Node.js version (need 22+)node -v
npm install failed macosInstall Xcode CLI toolsxcode-select --install
brew: command not foundInstall Homebrew/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
gateway not configuredRun the configuration wizardopenclaw configure
access not configured telegramRe-pair Telegram bot tokenopenclaw pair telegram
EACCES permission deniedFix directory ownershipsudo chown -R $(whoami) ~/.openclaw
port 18789 already in useFind and kill the blocking processsudo lsof -i :18789
openclaw: command not found after installAdd npm global bin to PATH or restart terminalexport PATH="$(npm config get prefix)/bin:$PATH"

How to Fix 'npm install failed' in OpenClaw

Most npm install failures are caused by an outdated Node.js version (OpenClaw requires 22+), corrupted npm cache, or missing build tools. Run node -v first, then follow the steps below.

1

Check your Node.js version

node -v # Must show v22.x.x or higher
2

Install or upgrade Node.js via nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash source ~/.bashrc nvm install 22 nvm use 22
3

Clean the npm cache and retry

npm cache clean --force npm install -g openclaw@latest
4

If compilation errors persist, install build tools

# macOS xcode-select --install # Ubuntu/Debian sudo apt update && sudo apt install -y build-essential python3

How to Fix 'brew not installed' on macOS

The 'brew: command not found' error means Homebrew is not installed or not in your PATH. This is required for the brew install openclaw method. Install Homebrew first, then retry.

1

Install Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2

Add Homebrew to your PATH (Apple Silicon Macs)

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"
3

Verify Homebrew works, then install OpenClaw

brew --version brew install openclaw/tap/openclaw openclaw init
4

If brew update hangs, reset Homebrew

brew update-reset && brew update

How to Fix 'gateway not configured' Error

The gateway not configured error means OpenClaw's config file is missing, incomplete, or has invalid values. The config lives at ~/.openclaw/config. You can regenerate it with the setup wizard or manually edit the required fields.

1

Run the interactive configuration wizard

openclaw configure
2

Or manually check the config file

cat ~/.openclaw/config # Verify these fields exist: # gateway.host = "127.0.0.1" # gateway.port = 18789 # gateway.token = "your-token-here"
3

Reset to defaults if the file is corrupted

cp ~/.openclaw/config ~/.openclaw/config.bak openclaw init --reset-config
4

Verify the gateway starts

openclaw gateway restart && openclaw status

How to Fix 'access not configured telegram'

This error means your Telegram bot token is missing or invalid. You need a valid bot token from @BotFather and must pair it with OpenClaw. Re-pairing usually resolves the issue in under 2 minutes.

1

Open Telegram and message @BotFather

# In Telegram: # 1. Search for @BotFather # 2. Send /mybots to see your existing bots # 3. Select your bot and click 'API Token' # 4. Copy the token (format: 123456789:ABCdefGHI...)
2

If you don't have a bot, create one

# In @BotFather: # 1. Send /newbot # 2. Choose a display name # 3. Choose a username (must end in 'bot') # 4. Copy the token provided
3

Pair the bot token with OpenClaw

openclaw pair telegram # Paste your bot token when prompted
4

Verify the connection

openclaw status --channels # Should show Telegram: connected

How to Fix Permission Errors on Mac/Linux

EACCES or permission denied errors happen when the ~/.openclaw directory is owned by root (usually from running with sudo). Fix ownership so your regular user account controls the files. Never run openclaw with sudo.

1

Fix ownership of the OpenClaw directory

sudo chown -R $(whoami) ~/.openclaw
2

Fix npm global permissions (if npm install fails)

mkdir -p ~/.npm-global npm config set prefix "~/.npm-global" export PATH="~/.npm-global/bin:$PATH" # Add the export line to ~/.bashrc or ~/.zshrc
3

Verify correct permissions

ls -la ~/.openclaw # Owner should be your username, not root
4

Set correct file permissions

chmod 700 ~/.openclaw chmod 600 ~/.openclaw/config # Config contains API keys -- keep it private

How to Reinstall OpenClaw

A clean reinstall fixes most persistent issues. Follow these steps to preserve your configuration while getting a fresh installation.

1

Back up your configuration

cp -r ~/.openclaw ~/.openclaw-backup
2

Stop the running service

openclaw stop
3

Remove the current installation

npm uninstall -g openclaw
4

Clean npm cache

npm cache clean --force
5

Install the latest version

npm install -g openclaw@latest
6

Restore config and reinitialize

openclaw init --keep-config openclaw start && openclaw status

After Reinstalling

Run openclaw doctor to verify everything is working. If you backed up your config, your API keys, messaging integrations, and preferences should be preserved. Re-pair any messaging platforms that show as disconnected.

How to Uninstall OpenClaw

Complete removal instructions for every platform. This removes the binary, configuration, data, and workspace files.

Mac / Linux (npm)

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

macOS (Homebrew)

openclaw stop brew uninstall openclaw rm -rf ~/.openclaw rm -rf ~/openclaw

Windows WSL

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

Docker

cd ~/openclaw docker compose down -v rm -rf ~/.openclaw rm -rf ~/openclaw

Warning: This is irreversible

Removing ~/.openclaw deletes all API keys, bot tokens, conversation history, and skill configurations. Back up the directory first if you might want to reinstall later: cp -r ~/.openclaw ~/.openclaw-backup

Still Stuck?

If none of the fixes above solved your issue, these resources can help you get unstuck fast.

Stop Wasting 40-60% of Your AI Budget

Download the free '6 Token Drains' guide — identify the hidden patterns burning through your tokens and get copy-paste fixes for each one.

Read the Free Guide
See what we've built for real businesses →

Tired of Debugging?

Our workshop walks you through a clean setup that just works — no errors, no guesswork.

Save 10+ hours/week Cut AI costs by 97% Deploy in under 20 min

Get the Automation Playbook (Free)

One deploy-ready automation every week. Same strategies our clients pay thousands for. 400+ business owners already inside.

Need it done for you?

Book a Free Strategy Call See what we've built for real businesses →

Troubleshooting FAQ