Beginner's Guide

Run your own private AI assistant

OpenClaw lets you host AI agents that connect to Telegram, Discord, and more. No data leaks. No subscriptions. Full control.

Start Installing OpenClaw GitHub

What Is OpenClaw and Why Would You Care?

In one sentence: OpenClaw lets you run your own AI assistant that connects to Telegram, Discord, and other apps — without sending your conversations to big tech companies.

🏠 Think of it like this: ChatGPT is like renting an apartment. It works, but you don't own it, the landlord can kick you out, and everything you say is visible to the building manager. OpenClaw is like building your own house. You control everything. Nobody's watching. And you can remodel it however you want.

Why people use OpenClaw

Who this is for

Who this is NOT for:
❌ People who just want to chat with AI (use ChatGPT)
❌ People unwilling to touch a terminal
❌ People who need 100% uptime without learning basics

What You Need Before Starting

1. A Computer or Server

Option A: Your laptop (for testing)
Any machine with 2GB+ RAM. Linux, macOS, or Windows (WSL2). You already have this — start here.

Option B: A VPS (for 24/7 operation)
2GB+ RAM, any Linux distro (Ubuntu 22.04+ recommended). Costs $5-10/month (SumoPod, Hetzner, DigitalOcean, etc.).

→ Deploy OpenClaw to any VPS in 5 minutes (one command)

2. At Least One AI Provider API Key

OpenClaw doesn't include AI models — it connects to providers. You need at least one:

ProviderFree TierPay-As-You-GoBest For
Google (Gemini)✅ Yes (limited)✅ YesBeginners, cheap
Anthropic (Claude)❌ No✅ YesBest quality
OpenAI (GPT)❌ No✅ YesCompatibility
Z.ai (GLM)✅ Yes✅ YesBudget option
Ollama (Local)✅ Yes✅ FreePrivacy, offline
Minimum recommendation: Get a Google Gemini API key. It's free for light use and works day one.

How to get a Google API key:

  1. Go to https://aistudio.google.com/apikey
  2. Sign in with Google account
  3. Click "Create API Key"
  4. Copy the key (starts with AIza...)

3. Basic Terminal Skills

You need to be comfortable with: opening a terminal, running commands like cd, ls, nano, and copying/pasting multi-line commands.

Installation (Local — 10 Minutes)

Step 1: Install Node.js

OpenClaw runs on Node.js. Most systems don't have it by default.

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt install -y nodejs

Verify it worked:

node --version # Should show v20.x.x npm --version # Should show 10.x.x

Step 2: Install OpenClaw

npm install -g openclaw

This downloads OpenClaw and makes the openclaw command available everywhere.

Verify:

openclaw --version

Step 3: First Run

openclaw

On first run, OpenClaw will create ~/.openclaw/, generate a default config, and start the gateway. You should see:

🦞 OpenClaw 2026.3.13 🧠 Gateway started on port 18789 ✅ Ready for connections

Press Ctrl+C to stop it for now.

Step 4: Add Your API Key

nano ~/.openclaw/.env

Add your Google API key:

GOOGLE_API_KEY=AIzaSyXXXXXXXXXXXXXXXXXXXXXXXXX

Save (Ctrl+O, Enter) and exit (Ctrl+X).

Step 5: Restart OpenClaw

openclaw

You should see your model listed as available.

Your First Connection (Telegram — 5 Minutes)

Telegram is the easiest first connection. Works on phone and desktop, no approval needed, free.

Step 1: Create a Bot

  1. Open Telegram, search for @BotFather
  2. Send /newbot
  3. Pick a name (e.g., "My AI Assistant")
  4. Pick a username (e.g., MyTestAIBot)
  5. BotFather gives you a token (looks like 123456789:ABCdefGHIjklMNOpqrsTUVwxyz)

Save this token. You'll need it in a second.

Step 2: Configure OpenClaw

nano ~/.openclaw/openclaw.json

Find the channels.telegram section and add your bot token:

"telegram": { "enabled": true, "botToken": "123456789:ABCdefGHIjklMNOpqrsTUVwxyz" }

Save and exit.

Step 3: Restart and Test

openclaw

In Telegram: search for your bot username, click "Start", send Hello, what can you do?

Your bot should respond!

Key Concepts Explained Simply

1. Gateway

What it is: The main OpenClaw process that runs 24/7.

Analogy: Like a phone switchboard. Messages come in, gateway routes them to the right AI model, sends responses back.

2. Models

What it is: The AI brains. OpenClaw connects to providers (Google, Anthropic, etc.) and exposes their models.

Analogy: Like having multiple translators. Some are fast and cheap (Gemini Flash), some are slow and expensive (Claude Opus), some work offline (Ollama).

3. Skills

What it is: Plugins that add capabilities.

Analogy: Like smartphone apps. Base OpenClaw does chat. Skills add: transcribe voice, generate images, search the web, control your calendar.

4. Sessions

What it is: A conversation thread. Each chat with a user is a session.

Analogy: Like browser tabs. Each tab has its own history. Closing a tab doesn't affect other tabs.

5. openclaw.json

What it is: The main config file.

Analogy: Like your phone's settings. Everything is configurable: models, channels, skills, behavior.

6. Fallbacks

What it is: Backup models when the primary fails.

Analogy: Like having a spare tire. When your main tire (model) goes flat (rate limit), you switch to the spare (fallback).

Troubleshooting (Common Problems)

📚 Need more help? For detailed recovery playbooks and maintenance checklists, see the OpenClaw Stability Guide.

"Command not found: openclaw"

Cause: Node.js not installed or not in PATH.

Fix: Install Node.js, then npm install -g openclaw

"No API key configured"

Cause: Missing API key in .env file.

Fix: Add GOOGLE_API_KEY=your-key-here to ~/.openclaw/.env

"Bot doesn't respond"

Debug steps:

# Check gateway is running openclaw gateway status # Check logs for errors tail -f ~/.openclaw/logs/gateway.log # Test model directly openclaw ask "Hello" --model google/gemini-2.5-flash

"Rate limit exceeded"

Cause: You hit the API provider's limit.

Fix: Add a fallback model in openclaw.json, or wait for limit to reset.

"Out of memory"

Cause: Running on a small VPS (<2GB RAM).

Fix: Upgrade VPS to 2GB+ RAM, or reduce maxConcurrent in config.

Ready to go deeper?

This guide covers the basics. For advanced topics, see these resources:

🚀 Deploy to VPS 🔧 Stability Guide 🧠 Add Memory
OpenClaw Docs Discord Community Back to Portfolio