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.
| Error | Fix | Command |
|---|---|---|
| npm install failed | Check Node.js version (need 22+) | node -v |
| npm install failed macos | Install Xcode CLI tools | xcode-select --install |
| brew: command not found | Install Homebrew | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" |
| gateway not configured | Run the configuration wizard | openclaw configure |
| access not configured telegram | Re-pair Telegram bot token | openclaw pair telegram |
| EACCES permission denied | Fix directory ownership | sudo chown -R $(whoami) ~/.openclaw |
| port 18789 already in use | Find and kill the blocking process | sudo lsof -i :18789 |
| openclaw: command not found after install | Add npm global bin to PATH or restart terminal | export 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.
Check your Node.js version
node -v
# Must show v22.x.x or higherInstall 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 22Clean the npm cache and retry
npm cache clean --force
npm install -g openclaw@latestIf compilation errors persist, install build tools
# macOS
xcode-select --install
# Ubuntu/Debian
sudo apt update && sudo apt install -y build-essential python3How 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.
Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Add Homebrew to your PATH (Apple Silicon Macs)
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"Verify Homebrew works, then install OpenClaw
brew --version
brew install openclaw/tap/openclaw
openclaw initIf brew update hangs, reset Homebrew
brew update-reset && brew updateHow 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.
Run the interactive configuration wizard
openclaw configureOr 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"Reset to defaults if the file is corrupted
cp ~/.openclaw/config ~/.openclaw/config.bak
openclaw init --reset-configVerify the gateway starts
openclaw gateway restart && openclaw statusHow 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.
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...)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 providedPair the bot token with OpenClaw
openclaw pair telegram
# Paste your bot token when promptedVerify the connection
openclaw status --channels
# Should show Telegram: connectedHow 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.
Fix ownership of the OpenClaw directory
sudo chown -R $(whoami) ~/.openclawFix 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 ~/.zshrcVerify correct permissions
ls -la ~/.openclaw
# Owner should be your username, not rootSet correct file permissions
chmod 700 ~/.openclaw
chmod 600 ~/.openclaw/config
# Config contains API keys -- keep it privateHow to Reinstall OpenClaw
A clean reinstall fixes most persistent issues. Follow these steps to preserve your configuration while getting a fresh installation.
Back up your configuration
cp -r ~/.openclaw ~/.openclaw-backupStop the running service
openclaw stopRemove the current installation
npm uninstall -g openclawClean npm cache
npm cache clean --forceInstall the latest version
npm install -g openclaw@latestRestore config and reinitialize
openclaw init --keep-config
openclaw start && openclaw statusAfter 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 ~/openclawmacOS (Homebrew)
openclaw stop
brew uninstall openclaw
rm -rf ~/.openclaw
rm -rf ~/openclawWindows WSL
openclaw stop
npm uninstall -g openclaw
rm -rf ~/.openclaw
rm -rf ~/openclawDocker
cd ~/openclaw
docker compose down -v
rm -rf ~/.openclaw
rm -rf ~/openclawWarning: 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 GuideTired of Debugging?
Our workshop walks you through a clean setup that just works — no errors, no guesswork.
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 →