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
Recommended environment
- 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
uname -awhoamiStep 1: Install OpenClaw
Option A: download first, then run
curl -fsSL https://openclaw.bot/install.sh -o install.shsed -n '1,120p' install.shbash install.shOption B: fastest install
curl -fsSL https://openclaw.bot/install.sh | bashVerify the install
openclaw --version || truewhich openclaw || trueStep 2: Fix "command not found"
Reopen the terminal
Many install scripts update PATH and need a fresh shell.
Reload your shell config
source ~/.zshrc 2>/dev/null || truesource ~/.bashrc 2>/dev/null || trueCheck PATH and install location
echo $PATHwhich openclaw || trueStep 3: Remove legacy installs
OpenClaw was previously known as Moltbot and before that Clawdbot. Older global packages can cause conflicts.
npm uninstall -g clawdbot || truenpm uninstall -g moltbot || truenpm uninstall -g openclaw || trueThen rerun Step 1.
Step 4: Run onboarding
openclaw onboard --flow quickstartRecommended 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
openclaw startBackground
openclaw start --detachRestart after config changes
openclaw gateway restart || openclaw restartVerify 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.
npm i -g openclaw@latestopenclaw --versionopenclaw gateway restart || openclaw restartIf 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.
npm uninstall -g openclaw || truewhich openclaw || trueOptional cleanup:
rm -rf ~/.openclawOnly 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.
export https_proxy=http://127.0.0.1:7890export http_proxy=http://127.0.0.1:7890openclaw startStep 9: Permission errors
If you see EACCES or permission denied:
- Use a user-owned directory
- Prefer
nvmfor 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