OpenClaw को कैसे इंस्टॉल करें (macOS, Windows, Linux): क्लीन सेटअप + सत्यापन

नमस्ते, ऑटोमेशन बिल्डर्स। अगर आप OpenClaw को इंस्टॉल करने के लिए तैयार हैं लेकिन सोच रहे हैं कि कौन सा रास्ता अपनाएं—CLI इंस्टॉल, Docker, या कुछ और—मैंने macOS, Ubuntu, और Windows WSL2 पर हर प्रमुख सेटअप मार्ग का परीक्षण किया है।

मैं आपको निर्णय बिंदुओं, प्लेटफ़ॉर्म-विशिष्ट चरणों, सत्यापन जांच जो वास्तव में मायने रखती हैं, और अगर कुछ गलत होता है तो इसे साफ-सुथरे तरीके से अनइंस्टॉल कैसे करें, के बारे में बताऊंगा। यहाँ तीन अलग-अलग मशीनों पर क्या काम किया (और क्या नहीं किया) उसका विवरण है।


अपना इंस्टॉल पथ चुनें (CLI बनाम Docker)

CLI का उपयोग कब करें (स्थानीय, हल्का, देव-प्रथम)

के लिए अनुशंसित:

  • एकल मशीन पर व्यक्तिगत उपयोग
  • पूर्ण सिस्टम एक्सेस (फाइल संचालन, ब्राउज़र नियंत्रण, स्थानीय ऑटोमेशन)
  • तेज़ पुनरावृत्ति और डिबगिंग
  • सबसे कम सेटअप घर्षण

फायदे:

  • गेटवे लॉग्स तक सीधी पहुंच (openclaw gateway logs)
  • एक-कमांड इंस्टॉल: npm install -g openclaw@latest
  • ऑनबोर्डिंग विज़ार्ड स्वतः डेमन सेटअप को संभाल लेता है
  • कौशल इंस्टॉलेशन और कॉन्फ़िगरेशन में आसानी

सेटअप समय: यदि आपके पास पहले से Node.js 22+ इंस्टॉल है तो 5-10 मिनट।

Docker का उपयोग कब करें (अलग, पुनरुत्पादक, सुरक्षित)

अनुशंसित के लिए:

  • सर्वर परिनियोजन या VPS होस्टिंग
  • साझा परिवेश जहां आप अलगाव चाहते हैं
  • एक होस्ट पर कई OpenClaw इंस्टेंस चलाना
  • सुरक्षा-संवेदनशील सेटअप (डिफ़ॉल्ट रूप से सैंडबॉक्स मोड सक्षम)

फायदे:

  • समूह/चैनल स्वचालन के लिए प्रति-सत्र सैंडबॉक्सिंग
  • विभिन्न वातावरणों में पुनरुत्पादक बिल्ड
  • आसान तरीके से हटाना और पुनर्निर्माण करना
  • कोई Node.js संस्करण संघर्ष नहीं

सेटअप समय: Docker इंस्टॉल और इमेज पुल सहित 10-15 मिनट।

आधिकारिक OpenClaw दस्तावेज़ीकरण के अनुसार, Docker-आधारित इंस्टॉल में डिक्लेरेटिव कॉन्फ़िगरेशन और प्रति-सत्र सैंडबॉक्स के लिए Nix मोड का समर्थन है।

शुरुआती के लिए निर्णय शॉर्टकट

आपकी स्थिति
सबसे अच्छा विकल्प
पहली बार इंस्टॉल कर रहे हैं, निजी लैपटॉप
CLI इंस्टॉल
बिना प्रतिबद्धता के जल्दी परीक्षण करना चाहते हैं
CLI इंस्टॉल
VPS/क्लाउड सर्वर पर चल रहा है
Docker
कई अलग-अलग इंस्टेंस की आवश्यकता है
Docker
OpenClaw में डिबगिंग या योगदान कर रहे हैं
CLI इंस्टॉल (स्रोत से)

macOS इंस्टॉल

आवश्यकताएँ (होमब्रू, अनुमतियाँ)

Node.js संस्करण जांचें:

node --version
# Must show v22.x.x or higher

If you don't have Node 22+, install via Homebrew:

brew install node@22
brew link node@22

Or use nvm:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
nvm install 22 && nvm use 22

CLI Install Steps

# Install OpenClaw globally
npm install -g openclaw@latest
# Verify installation
openclaw --version
# Should show: openclaw/2026.1.29
# Run onboarding wizard (installs launchd daemon)
openclaw onboard --install-daemon

What --install-daemon does:

  • Creates launchd service at ~/Library/LaunchAgents/com.openclaw.gateway.plist
  • Auto-starts Gateway on login
  • Runs Gateway in background (you don't need terminal open)

Docker Install Alternative

# Pull latest image
docker pull openclaw/openclaw:latest
# Run with volume mounts for config persistence
docker run -d \
  --name openclaw-gateway \
  -v ~/.openclaw:/root/.openclaw \
  -p 18789:18789 \
  openclaw/openclaw:latest \
  gateway --port 18789

Per GitHub issue #1679, Docker deployments require explicit auth token configuration when accessed via reverse proxy.

Default Config & File Locations

~/.openclaw/
├── openclaw.json       # Main config (model, channels, tools)
├── state/              # Session data, message history
├── workspace/          # Skills and custom tools
└── credentials/        # OAuth tokens, API keys
~/Library/LaunchAgents/
└── com.openclaw.gateway.plist  # macOS daemon config

Why WSL2 is Required

OpenClaw does not support native Windows. The WhatsApp Web protocol, iMessage integration, and Unix-based process management all assume a POSIX environment.

According to the Windows platform guide, WSL2 (Windows Subsystem for Linux) is the only supported path for Windows users.

WSL2 Setup Checklist

  1. Enable WSL2:
# Run in PowerShell as Administrator
wsl --install

This installs Ubuntu 24.04 by default. Restart your computer when prompted.

  1. Launch Ubuntu:
  • Open "Ubuntu" from Start Menu
  • Create username and password when prompted
  1. Verify WSL version:
wsl --list --verbose
# Should show VERSION = 2

If it shows VERSION = 1, upgrade:

wsl --set-version Ubuntu 2

OpenClaw Install Inside WSL

Once inside Ubuntu (WSL2), follow the Linux install steps:

# Update packages
sudo apt update && sudo apt upgrade -y
# Install Node.js 22
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
# Verify Node version
node --version
# Install OpenClaw
npm install -g openclaw@latest
# Run onboarding
openclaw onboard --install-daemon

Common Windows-Specific Pitfalls

Issue 1: WSL network access from Windows

By default, WSL2 uses a virtualized network. To access the OpenClaw web dashboard from Windows browser:

  1. Find WSL IP:
ip addr show eth0 | grep inet
# Example output: inet 172.20.224.5/20
  1. Access dashboard at http://172.20.224.5:18789/ (replace with your WSL IP)

Issue 2: File system performance

Store ~/.openclaw/ inside WSL file system (/home/username/), not Windows (/mnt/c/). Cross-system file access is 10-20x slower.

Issue 3: systemd not running

Some WSL2 distributions don't enable systemd by default. Check:

systemctl --version

If it fails, enable systemd in /etc/wsl.conf:

sudo nano /etc/wsl.conf

Add:

[boot]
systemd=true

Restart WSL:

wsl --shutdown

Linux Install

Supported Distros

Distribution
Status
Notes
Ubuntu 22.04+
✅ Fully supported
Recommended
Debian 11+
✅ Fully supported
Fedora 38+
✅ Fully supported
Arch Linux
✅ Fully supported
Raspberry Pi OS
✅ Supported
See Raspberry Pi guide
CentOS/RHEL
⚠️ Manual setup
systemd works, package manager differs

Package Dependencies

Ubuntu/Debian:

sudo apt update
sudo apt install -y curl git build-essential

Fedora:

sudo dnf install -y curl git gcc-c++ make

Arch:

sudo pacman -S curl git base-devel

CLI Install Steps

# Install Node.js 22
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
# Or use nvm for user-level install
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
nvm install 22 && nvm use 22
# Install OpenClaw
npm install -g openclaw@latest
# Run onboarding (installs systemd service)
openclaw onboard --install-daemon

Running OpenClaw as a Service (Optional)

The --install-daemon flag creates a systemd user service automatically. Verify it's running:

systemctl --user status openclaw-gateway

Expected output:

● openclaw-gateway.service - OpenClaw Gateway
   Loaded: loaded (/home/user/.config/systemd/user/openclaw-gateway.service)
   Active: active (running)

Manual service management:

# Start
systemctl --user start openclaw-gateway
# Stop
systemctl --user stop openclaw-gateway
# Restart
systemctl --user restart openclaw-gateway
# View logs
journalctl --user -u openclaw-gateway -f

Enable auto-start on boot:

systemctl --user enable openclaw-gateway
sudo loginctl enable-linger $USER

The enable-linger command allows user services to start before login, which is necessary for headless servers.


Verify Installation

Check Version Output

openclaw --version

Expected output:

openclaw/2026.1.29

If you see command not found, verify npm global bin is in your PATH:

echo $PATH | grep npm

Add it if missing:

echo 'export PATH="$PATH:$(npm config get prefix)/bin"' >> ~/.bashrc
source ~/.bashrc

Run Health Checks

openclaw doctor

Healthy installation output:

✅ CLI version: 2026.1.29
✅ Node.js: v22.11.0
✅ Gateway service: running (PID 12345)
✅ Config: ~/.openclaw/openclaw.json
✅ Auth: Anthropic API key configured
⚠️  DM policy: pairing (requires approval for unknown senders)
ℹ️  Channels: telegram, whatsapp (2 connected)

Common warnings:

Read Logs Correctly

# View recent Gateway logs
openclaw gateway logs --tail 50
# Follow logs in real-time
openclaw gateway logs --follow

Key log patterns to recognize:

Successful startup:

2026-01-30T12:00:00.000Z [gateway] agent model: anthropic/claude-sonnet-4-5-20250929
2026-01-30T12:00:00.100Z [gateway] listening on ws://127.0.0.1:18789 (PID 12345)
2026-01-30T12:00:00.200Z [canvas] host mounted at http://127.0.0.1:18793/__openclaw__/canvas/

Authentication working:

2026-01-30T12:01:00.000Z [telegram] connected @yourbotname
2026-01-30T12:01:00.100Z [whatsapp] paired device: Chrome (Linux)

Problem indicators:

Error: Missing API key for Anthropic
[ws] unauthorized conn=xxx reason=token_missing
Error: EACCES: permission denied

What "Working" Looks Like

Minimal working test:

  1. Send a message to your Telegram bot:
Hello
  1. Expected response:
Hello! I'm your OpenClaw assistant. How can I help you today?
  1. Check logs show the interaction:
openclaw gateway logs --tail 10
  1. Should contain:
[telegram] ← message from @yourusername
[agent] generating response (model: claude-sonnet-4-5)
[telegram] → reply sent

If you see this flow, your installation is working correctly.


Uninstall or Reset Configuration

Full Uninstall Steps

macOS:

# Stop and remove daemon
openclaw gateway stop
launchctl unload ~/Library/LaunchAgents/com.openclaw.gateway.plist
rm ~/Library/LaunchAgents/com.openclaw.gateway.plist
# Remove OpenClaw package
npm uninstall -g openclaw
# Remove config and data (optional)
rm -rf ~/.openclaw

Linux:

# Stop and disable service
systemctl --user stop openclaw-gateway
systemctl --user disable openclaw-gateway
rm ~/.config/systemd/user/openclaw-gateway.service
# Remove package
npm uninstall -g openclaw
# Remove config and data (optional)
rm -rf ~/.openclaw

Windows (WSL2):

Same as Linux steps above, run inside Ubuntu WSL2 terminal.

Resetting Config Without Reinstall

Option 1: Delete config only (preserves session history)

mv ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.backup
openclaw onboard

Option 2: Full state reset (fresh start)

openclaw gateway stop
mv ~/.openclaw ~/.openclaw.backup
openclaw onboard --install-daemon

Option 3: Reset specific channels

rm ~/.openclaw/credentials/telegram.json
openclaw channels login

When a Clean Reset is the Right Move

Reset if:

  • Gateway won't start after config changes
  • Channel pairing is broken (WhatsApp QR expired, Telegram token invalid)
  • You switched API providers (Anthropic ↔ OpenAI) and seeing auth errors
  • Upgrade migration failed (openclaw doctor shows state version mismatch)

Don't reset if:

  • You just want to change one setting (edit ~/.openclaw/openclaw.json directly)
  • Daemon isn't starting (check systemctl --user status openclaw-gateway first)
  • Pairing codes aren't working (run openclaw pairing list to see pending pairs)

I've hit all these scenarios testing across platforms. The most common mistake is resetting config when you just need to restart the daemon—save yourself 10 minutes and check service status first.

Prefer a guided setup? At Macaron, we built an AI that remembers your context and creates personalized mini-apps from a single sentence—no technical setup required. If you want to test how conversation turns into custom tools for daily tasks like meal planning or habit tracking, sign up and run your first automation instantly with Macaron.


FAQ

Q: Do I need Node.js 22+ or can I use an older version?

Node.js 22+ is required. Older versions won't work—you'll get syntax errors immediately.

प्रश्न: गेटवे "चल रहा है" दिखाता है लेकिन मैं डैशबोर्ड तक नहीं पहुंच पा रहा हूँ। समस्या क्या है?

वर्शन 2026.1.29 में डिफॉल्ट बाइंडिंग केवल localhost के लिए बदल दी गई है। इसे उसी मशीन से http://127.0.0.1:18789 पर एक्सेस करें या रिमोट एक्सेस के लिए Tailscale सेट करें।

प्रश्न: WhatsApp बार-बार डिसकनेक्ट और रिकनेक्ट हो रहा है। इसे कैसे ठीक करूँ?

क्रेडेंशियल्स हटाएं और पुनः पेयर करें: rm -rf ~/.openclaw/credentials/whatsapp फिर से openclaw channels login --channel whatsapp चलाएं।

प्रश्न: इंस्टॉलेशन के बाद openclaw कमांड नहीं मिल रहा है।

npm के ग्लोबल बिन को अपने PATH में जोड़ें: echo 'export PATH="$PATH:$(npm config get prefix)/bin"' >> ~/.bashrc && source ~/.bashrc

प्रश्न: क्या गेटवे को इंटरनेट पर एक्सपोज करना सुरक्षित है?

नहीं। इसके बजाय Tailscale का उपयोग करें। जनवरी 2026 में सीधे इंटरनेट एक्सपोजर में कई गंभीर कमजोरियाँ थीं।

प्रश्न: क्या मैं इसे Raspberry Pi या सस्ते VPS पर चला सकता हूँ?

हाँ। इसके लिए 1GB+ RAM की आवश्यकता है। Linux इंस्टॉल स्टेप्स का पालन करें—Docker काम करता है लेकिन यह अधिक मेमोरी का उपयोग करता है।

Hey, I’m Hanks — a workflow tinkerer and AI tool obsessive with over a decade of hands-on experience in automation, SaaS, and content creation. I spend my days testing tools so you don’t have to, breaking down complex processes into simple, actionable steps, and digging into the numbers behind “what actually works.”

Apply to become Macaron's first friends