Tutorial · February 2025
How to Install OpenClaw
OpenClaw is an open-source AI agent platform that runs locally on your machine. It connects to LLMs like Claude, GPT-4, and local models, giving you a personal AI assistant that can control your computer, browse the web, manage files, and integrate with dozens of services. Here's how to get it running in under 30 seconds.
📺 Video Tutorial
What is OpenClaw?
OpenClaw is an open-source AI agent framework that turns large language models into a fully autonomous personal assistant. It runs as a local daemon (the "Gateway") on your machine and connects to AI providers like Anthropic (Claude), OpenAI, Google, and local models via Ollama or LM Studio.
Unlike cloud-only AI assistants, OpenClaw runs on your hardware. It can execute shell commands, read and write files, browse the web, control your phone, send messages, and integrate with tools like Telegram, Discord, email, calendars, and more. Think of it as your AI co-pilot that lives on your computer.
Source code: github.com/openclaw/openclaw
Documentation: docs.openclaw.ai
System Requirements
- Node.js 22+ — The installer script will install it automatically if missing
- macOS, Linux, or Windows (WSL2 strongly recommended on Windows)
- An AI provider API key — Anthropic, OpenAI, Google, or a local model server
Method 1: One-Line Installer (Recommended)
The fastest way to install OpenClaw. This script handles Node.js detection, installs the CLI globally via npm, and launches the onboarding wizard — all in one command.
macOS / Linux / WSL2
curl -fsSL https://openclaw.ai/install.sh | bashWindows (PowerShell)
iwr -useb https://openclaw.ai/install.ps1 | iexThat's it. The installer detects your environment, installs Node if needed, pulls the latest OpenClaw release, and walks you through initial configuration (API keys, channels, etc.).
To install without the onboarding wizard (useful for automation or CI):
# macOS / Linux / WSL2
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard
# Windows PowerShell
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboardMethod 2: npm / pnpm
If you already have Node 22+ installed and prefer manual control:
npm
npm install -g openclaw@latest
openclaw onboard --install-daemonpnpm
pnpm add -g openclaw@latest
pnpm approve-builds -g # approve openclaw, sharp, etc.
openclaw onboard --install-daemonTip: If you hit sharp build errors on macOS, force prebuilt binaries:
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latestMethod 3: From Source
For contributors or anyone who wants to run the latest development version:
git clone https://github.com/openclaw/openclaw.git
cd openclaw
pnpm install
pnpm ui:build
pnpm build
pnpm link --global
openclaw onboard --install-daemonMethod 4: Docker
For containerized or headless deployments, OpenClaw provides Docker support. See the Docker install docs for full instructions.
First-Run Configuration
When you run openclaw onboard, the wizard walks you through:
- AI Provider setup — Enter your API key for Anthropic, OpenAI, Google, or configure a local model endpoint
- Default model selection — Choose which model to use by default (e.g., Claude Sonnet, GPT-4o)
- Gateway daemon — The
--install-daemonflag sets up OpenClaw to run as a background service - Channel connections — Optionally connect Telegram, Discord, or other messaging channels
Configuration is stored in ~/.openclaw/ by default.
Verify Your Installation
After installation, run these commands to make sure everything is working:
openclaw doctor # check for config issues
openclaw status # gateway daemon status
openclaw dashboard # open the browser UIopenclaw doctor checks your Node version, API keys, daemon status, and other configuration. Fix any issues it flags before proceeding.
Managing the Gateway
The Gateway is the background daemon that powers OpenClaw. It stays running and handles all AI interactions, channel messages, scheduled tasks, and more.
openclaw gateway status # check if running
openclaw gateway start # start the daemon
openclaw gateway stop # stop the daemon
openclaw gateway restart # restart after config changesVPS / Cloud Deployment
Running OpenClaw on a VPS gives you a 24/7 AI assistant. The installation steps are the same — just SSH into your server and run the installer script. Popular choices:
- Hetzner — Great value. A CX22 (2 vCPU, 4GB RAM) is plenty for ~$4/mo
- DigitalOcean — Simple droplet setup
- Railway / Render / Fly.io — Container-based platforms with free tiers
- Any Linux VPS — Anything with Node 22+ will work
The video tutorial at the top of this page walks through VPS setup in detail, including SSH configuration and keeping OpenClaw running with the daemon.
Troubleshooting
"openclaw: command not found"
Your shell can't find the globally installed binary. Quick fix:
# Check where npm installs global packages
npm prefix -g
# Add it to your PATH (add to ~/.zshrc or ~/.bashrc)
export PATH="$(npm prefix -g)/bin:$PATH"
# Reload your shell
source ~/.zshrc # or ~/.bashrcNode version too old
OpenClaw requires Node 22+. If you're on an older version:
# Using nvm (recommended)
nvm install 22
nvm use 22
# Or download directly from nodejs.orgUpdating OpenClaw
Keep OpenClaw up to date with:
npm install -g openclaw@latest
openclaw gateway restartSee the updating guide for details on version management and migration between major versions.
Next Steps
- Full documentation — Deep dive into every feature
- GitHub repo — Star the project, report issues, contribute
- Connect a messaging channel (Telegram, Discord) to chat with your agent from anywhere
- Set up heartbeats and cron jobs for proactive background tasks
- Explore skills and tools — browser control, file management, web search, and more