How to Install OpenClaw: Complete Installation Guide
OpenClaw is the open-source, self-hosted AI agent that runs on your hardware and connects to WhatsApp, Telegram, Discord, and 15+ messaging platforms. This hub is written as an operator path: pick an environment, reach a working Gateway, connect one channel, then harden before you add fancy workflows.
1. Installation routes — my recommendations
OpenClaw requires Node.js 22+ and runs on macOS, Linux, and Windows (via WSL2). I do not treat every method as equal:
| Method | Best for | Pros / cons (operator view) | My pick |
|---|---|---|---|
| One-line installer | First contact on macOS/Linux laptop | Fastest; easy to abandon later if you move to VPS | ★★★★★ learn |
| macOS / Linux native | Daily driver machine | Great logs; laptop sleep kills 24/7 agents | ★★★★☆ desktop |
| Windows (WSL2) | Windows-only shops | Works; more moving parts than native Linux | ★★★☆☆ if needed |
| Docker | Homelab / portable deploys | Clean isolation; debugging logs can feel farther away | ★★★★☆ VPS-friendly |
| VPS (e.g. Hetzner) | Always-on personal or team agents | Best uptime; you own firewall + updates | ★★★★★ production-lite |
| Raspberry Pi | Cheap always-on at home | Low cost; watch CPU/RAM with local models | ★★★☆☆ hobby |
| Local models / Ollama | Privacy + token savings | Great hybrid with cloud models; needs RAM/GPU honesty | ★★★★☆ after basics |
What I run: learn on a laptop with the quick installer, then move the Gateway to a small VPS once a workflow (like the morning briefing) must fire every day.
2. Pre-Installation Checklist
Before installing, ensure you have:
- Node.js 22+ - OpenClaw requires Node 22 or newer. Check with
node -v; install from nodejs.org or your package manager. - OS compatibility - macOS 12+, Ubuntu 20.04+ (or equivalent Linux), or Windows 10/11 with WSL2.
- API keys - At least one LLM provider: Anthropic (Claude) or OpenAI (GPT). Optional: Google (Gemini), DeepSeek, or Ollama for local models. See the complete Ollama & offline AI guide.
- Messaging app account - For your first channel: Telegram (easiest), Discord, WhatsApp, or another supported platform.
- VPS (if applicable) - For cloud deployment: a droplet/instance with 2+ GB RAM and a public IP (or VPN/Tailscale for secure access). See network isolation and security best practices before exposing any service.
3. Quick install (one-line) — then prove it works
On macOS or Linux, the official installer downloads OpenClaw, installs dependencies, and prepares the CLI and gateway. Run:
curl -fsSL https://openclaw.ai/install.sh | bash
Or with npm (if Node.js 22+ is already installed):
npm install -g openclaw
You should see the installer confirm the install path and prompt you to run openclaw. After installation:
# Reload shell if `openclaw` is not found
source ~/.bashrc # or ~/.zshrc
openclaw --version
openclaw doctor
openclaw gateway status
openclaw status
Run onboarding with openclaw onboard or openclaw setup to choose your LLM provider and add your first channel. Full walkthrough: Quick Start Guide. Control UI is typically at http://127.0.0.1:18789/ when the Gateway is local.
Field note: if openclaw: command not found appears, 90% of the time the shell has not reloaded PATH. Restart the terminal before reinstalling. Prefer openclaw gateway install for a supervised always-on service (see Gateway CLI docs).
4. Platform-Specific Guides
🍎 macOS
Native installation for macOS 12+ including Apple Silicon (M1/M2/M3). ~10 min · Easy.
- Homebrew integration
- Apple Silicon optimized
🪟 Windows
Installation via WSL2 (Windows Subsystem for Linux). ~15 min · Medium.
- WSL2 setup included
- Windows 10/11 compatible
🐧 Linux
Native Linux for Ubuntu, Debian, Fedora, Arch. ~10 min · Easy.
- Systemd service setup
- ARM64 compatible
🐳 Docker
Containerized deployment for any host. ~10 min · Medium.
- Portable, isolated
- Ideal for VPS/homelab
🥧 Raspberry Pi
Run OpenClaw on Raspberry Pi 4/5. ~25 min · Medium.
- Low-cost 24/7 hosting
- ARM64 support
5. First channel milestone (Telegram)
Do not customize ten skills before you get a single reply. My preferred first channel is Telegram:
- Create a bot with BotFather and copy the token (store as env var, not in git).
- Add the bot in OpenClaw channel config during onboarding or via config files (config overview).
- Message the bot
/pingor a short hello; confirm the agent replies. - Only then add WhatsApp/Discord or heavy skills.
# Conceptual — keep secrets out of shell history when possible
export TELEGRAM_BOT_TOKEN="XXXX"
# Then complete channel binding via onboarding / config as documented for your version
When that works, you have a real base for workflows like the morning briefing or PR review assistant.
6. Security basics — do these before you expose anything
- Bind the Gateway to localhost (or put it behind Tailscale/VPN)—never leave admin UI on
0.0.0.0casually. - SSH keys only on VPS; disable password root login.
- API keys in environment variables / secret store—not committed JSON.
- Set provider spend caps where available.
- Follow the full security checklist and security best practices.
Field note: the fastest way to regret a VPS install is an open port plus a powerful agent skill. Harden first, automate second.
7. Post-installation configuration
After OpenClaw is installed, complete these steps:
- Run the onboarding wizard - Select an LLM provider and add your first messaging channel. Post-installation setup walks through this in detail.
- Choose your first channel - Telegram is easiest; see Channel Setup Hub.
- Test the connection - Send a message; check
openclaw gateway status,openclaw status, andopenclaw logs --followif anything fails. - Security hardening - Complete section 6 above before public exposure.
- Budget - Rough out monthly spend with the cost playbook and cost calculator.
8. System requirements
| Component | Minimum | Recommended |
|---|---|---|
| OS | macOS 12+, Ubuntu 20.04+, Windows 10+ (WSL2) | macOS 14+, Ubuntu 22.04+, Windows 11 |
| CPU | 1 core | 2+ cores |
| RAM | 2 GB | 4 GB |
| Storage | 1 GB free | 5 GB free |
| Node.js | v22+ | v22 LTS |
| Internet | Required for LLM API | Stable connection |
9. Next steps after installation
- Harden — Security best practices and checklist.
- Ship one workflow — Morning briefing or PR assistant.
- Tune cost — Cost playbook.
- Configure memory and agents — Config and agents.
- Install skills carefully — ClawHub + skills audit.
- Community — Community hub; site questions via Contact / Maintainer.
10. Common installation problems
If something goes wrong, run openclaw doctor first—it checks your environment and can suggest fixes. Then refer to:
- "openclaw command not found" - PATH issue: restart the terminal or
source ~/.bashrc. See Troubleshooting: installation. - Node.js version conflicts - Requires Node 22+. Use
nvmor your package manager. - Gateway won’t start - Check ports and bind address (prefer localhost). Gateway issues.
- Channel silent - Token, webhook, or firewall; start with Telegram diagnostics in channels troubleshooting.
- Permission errors - Write access to install/config directories.
- OOM on tiny VPS - Undersized RAM with local models; right-size or use API models first (cost & sizing).
Last updated: 2026-07-13 · About this site