I’d tried to install AutoGPT three times. Each time I got about halfway through before hitting a dependency conflict, a missing config key, or a cryptic Python error that Stack Overflow couldn’t solve. I gave up.
OpenClaw took me eight minutes.
This guide covers everything from a fresh machine to a running agent — on Ubuntu, macOS, and Windows. Pick your platform and follow the steps.
Prerequisites (All Platforms)
Before anything else, you need:
- Node.js 20 or higher — OpenClaw is built in TypeScript and runs on Node
- Git — to pull updates later
- An LLM API key — Claude (Anthropic) or GPT-4o (OpenAI) both work. Get one before you start.
- Claude: console.anthropic.com
- OpenAI: platform.openai.com
That’s it. No Docker required, no Python environment, no virtual environments.
Ubuntu / Debian
Step 1 — Install Node.js via nvm
Using nvm (Node Version Manager) is the recommended approach — it lets you switch Node versions without affecting system packages.
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# Reload your shell
source ~/.bashrc
# Install Node 20 (LTS)
nvm install 20
nvm use 20
# Verify
node --version # should print v20.x.x
npm --version
Step 2 — Install OpenClaw
npm install -g openclaw
This installs the openclaw CLI globally. Give it a minute — it pulls a few dependencies.
Step 3 — Run the setup wizard
openclaw init
You’ll be walked through a short wizard (more on what each prompt means in the Init Walkthrough section below).
Step 4 — Firewall note
If you’re running on a server or a machine with ufw active, OpenClaw uses a local port (default 3000) for its gateway. If you want to access it remotely:
sudo ufw allow 3000/tcp
For local-only use, no firewall changes are needed.
macOS
Step 1 — Install Node.js via Homebrew
# Install Homebrew if you don't have it
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Node 20
brew install node@20
# Add to PATH (Apple Silicon)
echo 'export PATH="/opt/homebrew/opt/node@20/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Verify
node --version
Step 2 — Install OpenClaw
npm install -g openclaw
Step 3 — Run the setup wizard
openclaw init
macOS-specific note (v2026.3.8): The onboarding wizard now includes a Remote Gateway Token field. This is for connecting to OpenClaw from mobile (iOS) or a remote interface. You can leave it blank during initial setup and add it later in the config.
Windows
Option A — nvm-windows (recommended)
- Download and install nvm-windows — grab the
.exeinstaller - Open a new PowerShell or Command Prompt window (important — nvm needs a fresh session)
- Install Node:
nvm install 20
nvm use 20
node --version
- Install OpenClaw:
npm install -g openclaw
openclaw init
Option B — WSL2 (for a Linux-like experience)
If you’re comfortable with WSL2, install Ubuntu via the Microsoft Store and follow the Ubuntu steps above. This is the path most developers prefer on Windows — you get the full Linux toolchain.
The Init Walkthrough
When you run openclaw init, you’ll see something like this:
? Agent name: myagent
? LLM provider: (Claude / OpenAI / DeepSeek / Grok)
? API key: sk-ant-...
? Messaging platform (optional): Telegram
? Enable heartbeat scheduler? Yes
? Heartbeat interval: 0 8 * * * (daily at 8am)
Here’s what each prompt actually means:
| Prompt | What it does |
|---|---|
| Agent name | Names the directory where memory is stored: ~/.openclaw/agents/yourname/ |
| LLM provider | Which AI brain to use. Claude is recommended for reasoning tasks. |
| API key | Your API key for the chosen provider. Stored locally in your config. |
| Messaging platform | Which chat app your agent will live in. Telegram is the easiest to start with. |
| Heartbeat scheduler | Whether the agent runs autonomously on a schedule (cron syntax). |
After init completes, your config lives at ~/.openclaw/config.yaml.
Podman and SELinux Users (Fedora / RHEL)
If you’re running OpenClaw on Fedora, RHEL, or any system with SELinux enforcing, you may have previously hit EACCES errors with bind mounts.
v2026.3.8 fixes this automatically. OpenClaw now detects if SELinux is in enforcing mode and applies :Z relabeling to bind mounts without any manual configuration needed.
If you’re upgrading from an older version and had a workaround in place, you can remove it.
First Run
Once init is complete:
openclaw start
You’ll see the OpenClaw TUI (terminal UI) start up. If you connected Telegram, send your bot a message: Hello. You should get a response within a few seconds.
That response means:
- OpenClaw is running
- Your LLM API key is valid
- The messaging integration is connected
- Memory is being written to
~/.openclaw/agents/yourname/memory/
You’re up.
Troubleshooting: 5 Common First-Run Errors
1. command not found: openclaw
npm’s global bin isn’t in your PATH. Fix:
export PATH="$(npm root -g)/../bin:$PATH"
# Add this line to your ~/.bashrc or ~/.zshrc
2. Error: API key invalid
Double-check your key has no extra whitespace. If using Claude, make sure you’re using an API key from console.anthropic.com, not a Claude.ai subscription key (different thing).
3. EACCES: permission denied on install
Don’t use sudo npm install -g. Instead, fix npm’s global directory:
mkdir -p ~/.npm-global
npm config set prefix ~/.npm-global
export PATH=~/.npm-global/bin:$PATH
4. Telegram: bot not responding
Make sure you started a conversation with your bot first — Telegram bots can’t initiate contact. Send /start to your bot in Telegram, then try messaging.
5. Node version mismatch
OpenClaw requires Node 20+. Check: node --version. If it shows v18 or lower, run nvm use 20.
What’s Next
You’re installed and running. Now build something:
Or go back to understand what you just installed:
What Is OpenClaw? The Self-Hosted AI Agent Everyone Is Talking About
Related Reading.
How OpenClaw Memory Works (And Why Your Data Never Leaves Your Machine)
OpenClaw stores your AI agent's memory as plain Markdown files on your machine — no cloud sync, no third-party servers. Here's exactly how it works and how to back it up.
How to Install Node.js on Ubuntu, macOS and Windows
Install Node.js using nvm, Homebrew, or the official installer — step-by-step for Ubuntu, macOS, and Windows. Includes switching versions and verifying your install.
Build Your First Agent Skill for OpenClaw (Step-by-Step)
Learn how to create a custom OpenClaw skill using SKILL.md — from a simple weather lookup to a database query. Real code, real scenarios, no fluff.