# OpenClaw Installation Guide
### Your Personal AI Assistant — Running Locally in 15 Minutes

> **By Lunexo** | lunexo.eu | Updated March 2026
> Free guide — share it, use it, modify it.

---

## What You'll Have After This Guide

- A local AI assistant (Claude / Gemini) running on your Mac or PC
- Accessible from **Telegram** (or WhatsApp / Discord)
- Reads your files and has persistent memory across sessions
- **100% private** — no data leaves your machine except the API call itself
- Connected to your own automation workflows via n8n

---

## Requirements

| | Mac | Windows | Linux |
|---|---|---|---|
| OS | macOS 12+ | Windows 10/11 + WSL2 | Ubuntu 20.04+ |
| Node.js | 22+ (auto-installed) | 22+ (auto-installed) | 22+ (auto-installed) |
| API Key | Anthropic or Google | Same | Same |
| Time | ~15 min | ~20 min | ~15 min |

---

## Step 1 — Install OpenClaw

Open your terminal and run one command:

**Mac / Linux:**
```bash
curl -fsSL https://openclaw.ai/install.sh | bash
```

**Windows (PowerShell as Admin):**
```powershell
iwr -useb https://openclaw.ai/install.ps1 | iex
```

The installer:
- Detects and installs Node.js 22 if needed
- Installs the `openclaw` CLI globally
- Launches the onboarding wizard

> **Stuck here?** [Lunexo installs it for you →](https://lunexo.eu/automatisation.html#prod-openclaw)

---

## Step 2 — Get Your API Key

You need at least one AI provider key. **Anthropic (Claude) is recommended** for best results.

### Anthropic (Claude) — Recommended
1. Go to [console.anthropic.com](https://console.anthropic.com)
2. Sign up (free account)
3. Go to **API Keys** → **Create Key**
4. Copy the key (starts with `sk-ant-...`)

### Google (Gemini) — Alternative / Free tier available
1. Go to [aistudio.google.com](https://aistudio.google.com)
2. Click **Get API Key**
3. Copy the key

---

## Step 3 — Run the Onboarding Wizard

After installation, the wizard starts automatically. If not:
```bash
openclaw onboard
```

The wizard asks for:
1. Your API key (paste from Step 2)
2. Default model (choose `claude-sonnet-4-5` or `gemini-2.5-flash`)
3. Channel to connect (choose **Telegram** for fastest setup)

---

## Step 4 — Connect Telegram

This is the fastest way to talk to your AI from any device.

1. Open Telegram, search for **@BotFather**
2. Send `/newbot`
3. Give it a name (e.g. "My AI") and username (e.g. `myai_bot`)
4. BotFather gives you a **token** (looks like `123456:ABC-DEF...`)
5. Paste it when the OpenClaw wizard asks for the Telegram token

Test it: open your new bot in Telegram and send "Hello"

---

## Step 5 — Start the Gateway

```bash
openclaw gateway start
```

Check it's running:
```bash
openclaw gateway status
```

Expected output: `Runtime: running | RPC probe: ok`

**Set it to auto-start on login (Mac):**
```bash
openclaw gateway install-daemon
```

---

## Step 6 — Configure Your Assistant

The workspace folder is at `~/.openclaw/workspace/`.

**Tell the AI who you are** — edit `~/.openclaw/workspace/USER.md`:
```markdown
# About Me
- Name: [Your name]
- What I do: [Freelancer / agency owner / developer]
- Key projects: [List your main projects]
- Timezone: Europe/Berlin
```

**Give the AI its personality** — edit `~/.openclaw/workspace/SOUL.md`:
The default is fine. Customize it to change the AI's tone and behavior.

**Set up memory** — the AI already logs to `~/.openclaw/workspace/memory/YYYY-MM-DD.md` automatically.

---

## Step 7 — Test Your Setup

Send these messages to your Telegram bot:

```
"What can you do?"
"Remember that I prefer direct answers without filler words."
"What's the date today?"
```

If you get smart responses — you're done. 🎉

---

## Optional: Connect to n8n

Once OpenClaw is running, use the **AI Lead Qualifier template** to wire it with your business workflows:

```bash
# OpenClaw API endpoint (local):
POST http://localhost:18789/v1/chat/completions
Authorization: Bearer YOUR_GATEWAY_TOKEN
```

Download the n8n template: [lunexo.eu/automatisation.html](https://lunexo.eu/automatisation.html)

---

## Troubleshooting

| Problem | Fix |
|---|---|
| `command not found: openclaw` | Run `npm install -g openclaw@latest` |
| Bot doesn't respond in Telegram | Check `openclaw gateway status`, confirm token is correct |
| "Invalid API key" error | Re-run `openclaw config set providers.anthropic.apiKey YOUR_KEY` |
| Gateway stops after restart | Run `openclaw gateway install-daemon` |
| WSL2 on Windows: network issues | Add `--bind 0.0.0.0` to gateway start |

Full docs: [docs.openclaw.ai](https://docs.openclaw.ai)

---

## Don't Want to DIY?

**Lunexo installs and configures OpenClaw for you** — including:
- Full installation on your Mac, server, or VPS
- Custom agent setup (personas, memory, tools)
- n8n workflow integration
- Telegram / WhatsApp connection
- Ongoing support

→ **[Book OpenClaw Installation — lunexo.eu](https://lunexo.eu/automatisation.html#prod-openclaw)**

---

*Guide by Sergej Maltsev — Lunexo Digital Studio | lunexo.eu | @lunexolabs*
