Skip to content
Last updated

OpenClaw Local Install (Mac / Linux)

⚠️ Security note: OpenClaw may have high-privilege capabilities.
Test on a spare machine, VM, or separate user account first.

What you'll achieve

  • Install OpenClaw on Mac or Linux
  • Complete onboarding and verify the first working response
  • Learn how to start, update, restart, and uninstall OpenClaw safely
  • Fix common install issues such as PATH, proxy, permission, or legacy package conflicts

Before you start

What you need

  • A terminal on macOS or Linux
  • Network access to the install script
  • A model API key such as Anthropic / Claude
  • Trying it out: local is fine, ideally on a VM or spare machine
  • Long-running setup: continue with Docker / VPS deployment

Step 0: Quick system check

Command
uname -awhoami

Step 1: Install OpenClaw

Option A: download first, then run

Command
curl -fsSL https://openclaw.bot/install.sh -o install.shsed -n '1,120p' install.shbash install.sh

Option B: fastest install

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

Verify the install

Command
openclaw --version || truewhich openclaw || true

Step 2: Fix "command not found"

Reopen the terminal

Many install scripts update PATH and need a fresh shell.

Reload your shell config

Command
source ~/.zshrc 2>/dev/null || truesource ~/.bashrc 2>/dev/null || true

Check PATH and install location

Command
echo $PATHwhich openclaw || true

Step 3: Remove legacy installs

OpenClaw was previously known as Moltbot and before that Clawdbot. Older global packages can cause conflicts.

Command
npm uninstall -g clawdbot || truenpm uninstall -g moltbot || truenpm uninstall -g openclaw || true

Then rerun Step 1.

Step 4: Run onboarding

Command
openclaw onboard --flow quickstart

Recommended defaults:

  • Use Telegram if you want the easiest first verification
  • Store secrets in your local config or .env, not in git

Verify onboarding

  • Config is saved under ~/.openclaw
  • You can complete the prompts without persistent errors

Step 5: Start OpenClaw

Foreground

Command
openclaw start

Background

Command
openclaw start --detach

Restart after config changes

Command
openclaw gateway restart || openclaw restart

Verify startup

  • Logs do not show recurring errors
  • A test message in your configured channel gets a response

Step 6: How to update OpenClaw

If you are running a local install, update the CLI or rerun the latest supported install flow, then restart the gateway.

Command
npm i -g openclaw@latestopenclaw --versionopenclaw gateway restart || openclaw restart

If you run OpenClaw in Docker or on a VPS, do not use the local update flow. Instead continue with the Docker / VPS guide.

Step 7: How to uninstall OpenClaw

If you want to remove OpenClaw from a local machine, first remove the global package, then decide whether to keep or remove your local state directory.

Command
npm uninstall -g openclaw || truewhich openclaw || true

Optional cleanup:

Command
rm -rf ~/.openclaw

Only remove ~/.openclaw if you no longer need config, history, or local state.

Step 8: Proxy or restricted network issues

If onboarding hangs, skills fail to download, or channel requests time out, try a proxy first.

Command
export https_proxy=http://127.0.0.1:7890export http_proxy=http://127.0.0.1:7890openclaw start

Step 9: Permission errors

If you see EACCES or permission denied:

  • Use a user-owned directory
  • Prefer nvm for Node management
  • Move to Docker / VPS deployment if you want better isolation

Common questions

Channel does not respond

  • Recheck your model key
  • Verify network or proxy access
  • Try Telegram as the simplest first channel

Skills or dependencies fail to download

  • Confirm network stability
  • Use a proxy in restricted regions
  • Review advanced configuration if the issue is plugin or skill related