How to Set Up OpenClaw in 30 Minutes
Step-by-step OpenClaw installation and configuration guide
OpenClaw goes from zero to working AI agent in about 30 minutes. This guide walks through every step: installing Node.js, setting up your API key, configuring Telegram as your first channel, and sending your first automated task. By the end, you will have a personal AI agent you can message from your phone.
Before You Start: What You Need
Before installing OpenClaw, get these ready:
- A machine running macOS, Linux, or Windows with WSL2
- 4 GB RAM minimum (8 GB recommended)
- An API key from one of: Anthropic, OpenAI, or Groq (Groq is free)
- A Telegram account for your first channel (simplest option)
- 30 minutes
If you want to use the Groq free API (recommended for Indian users who want ₹0 cost), create a free account at console.groq.com and copy your API key. No credit card needed.
How to Install OpenClaw: Step-by-Step
Step 1: Install Node.js v22
OpenClaw requires Node.js version 22 or higher. Check what you have first:
node --version
If you see v22.x.x or higher, skip ahead. Otherwise, install Node.js 22 LTS:
macOS (Homebrew):
brew install node@22
echo 'export PATH="/opt/homebrew/opt/node@22/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Ubuntu / Debian / WSL2:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
Windows (WSL2 — recommended): First install WSL2 with Ubuntu 22.04 from the Microsoft Store, then use the Ubuntu commands above inside WSL2.
Verify the installation:
node --version # Should show v22.x.x
npm --version # Should show 10.x.x or higher
Step 2: Install OpenClaw Globally via npm
npm install -g openclaw clawhub
This installs two commands: openclaw (the agent runtime) and clawhub (the skill package manager). Installation takes 1–3 minutes depending on your connection speed.
Verify:
openclaw --version
clawhub --version
Step 3: Create Your OpenClaw Workspace
Create a dedicated directory for your OpenClaw setup:
mkdir ~/my-assistant
cd ~/my-assistant
Step 4: Initialize OpenClaw Configuration
Run the initialization wizard:
openclaw init
This creates:
.env— your API keys (never commit this to git)openclaw.config.json— channel and model configuration~/clawd/skills/— directory for installed skills~/clawd/memory/— persistent memory files
The wizard asks for your preferred AI provider. Select your choice and skip the API key entry for now — you will add it manually in Step 5.
Step 5: Add Your API Key to the .env File
Open the generated .env file:
# Using nano (simple terminal editor)
nano .env
You will see a template like this — fill in your key:
# .env — Keep this file private, never share or commit
# Option A: Groq (Free — Recommended for India)
GROQ_API_KEY=gsk_your_groq_key_here
# Option B: Anthropic Claude
ANTHROPIC_API_KEY=sk-ant-your_key_here
# Option C: OpenAI
OPENAI_API_KEY=sk-your_openai_key_here
# Option D: Ollama (Local — No API key needed)
OLLAMA_BASE_URL=http://localhost:11434
Save with Ctrl+O, then Ctrl+X to exit nano.
Now update openclaw.config.json to point to your chosen provider:
{
"ai": {
"provider": "groq",
"model": "llama-3.1-70b-versatile",
"apiKeyEnv": "GROQ_API_KEY"
},
"channels": [],
"memory": {
"enabled": true,
"path": "~/clawd/memory"
}
}
For Anthropic Claude, change provider to anthropic and model to claude-sonnet-4-6. For local Ollama, use provider: "ollama" and model: "llama3.2".
Step 6: Set Up Telegram as Your First Channel
Telegram is the easiest channel to configure for India — no business account, no approval process, works in 5 minutes.
Create your Telegram bot:
- Open Telegram and search for
@BotFather - Send
/newbot - Enter a name for your bot (e.g., "My OpenClaw Assistant")
- Enter a username ending in
bot(e.g.,my_openclaw_bot) - BotFather sends you a token like:
7234567890:AAHbXyz... - Copy this token
Add the Telegram token to your .env:
TELEGRAM_BOT_TOKEN=7234567890:AAHbXyz_your_token_here
Add Telegram to your openclaw.config.json:
{
"ai": {
"provider": "groq",
"model": "llama-3.1-70b-versatile",
"apiKeyEnv": "GROQ_API_KEY"
},
"channels": [
{
"type": "telegram",
"tokenEnv": "TELEGRAM_BOT_TOKEN",
"allowedUsers": ["your_telegram_username"]
}
],
"memory": {
"enabled": true,
"path": "~/clawd/memory"
}
}
Replace your_telegram_username with your actual Telegram username (without the @). This restricts your bot to only respond to you — important for security.
Step 7: Start the OpenClaw Server
openclaw start
You should see output like:
OpenClaw v2.4.1 starting...
✓ AI provider: Groq (llama-3.1-70b-versatile)
✓ Telegram channel: connected (@my_openclaw_bot)
✓ Memory: enabled (~/clawd/memory)
✓ Skills loaded: 0
OpenClaw is running. Press Ctrl+C to stop.
Web UI: http://localhost:18789
Step 8: Open the Web Chat UI
While OpenClaw is running, open a browser and visit:
http://localhost:18789
You will see a clean chat interface. This is the fallback web UI — useful for initial testing without setting up a messaging channel.
Step 9: Send Your First Test Message
In the web UI (or in your Telegram bot), send:
Hello! What can you do?
OpenClaw should respond with a summary of its current capabilities. If you see a response, everything is working.
Try a second test — a question:
What's the current time in IST?
Step 10: Send Your First Automation Task
Now test an actual automation. Send:
Remind me in 5 minutes to take a break and drink water.
OpenClaw will confirm it has set the reminder. In 5 minutes, it will send you a message in the same channel. This confirms the scheduler is working.
Congratulations — your OpenClaw agent is live.
Telegram Setup: Extra Details
Your Telegram bot is now running, but a few extra settings improve usability:
Enable the bot for group chats (optional):
Send /setjoingroups to BotFather, select your bot, and enable it to be added to groups.
Set a description so you recognize it:
Send /setdescription to BotFather and add a description like "My personal AI agent powered by OpenClaw."
Privacy mode — by default, bots only see messages that start with / or mention the bot in groups. For personal use, this is fine. For OpenClaw in a private chat, all your messages are visible to the bot.
WhatsApp Setup (Advanced)
WhatsApp integration requires more setup than Telegram. Here is a summary — see the OpenClaw India Guide for full step-by-step instructions:
- Create a Meta Business account at business.facebook.com
- Set up a WhatsApp Business API app in Meta Developer Console
- Add a phone number — you can use a separate SIM or virtual number
- Configure the webhook URL to point to your OpenClaw instance
- Add your WhatsApp credentials to
.env
The WhatsApp Business API offers 1,000 free conversations per month with Meta's free tier — after that, charges apply. For personal use with light messaging, you will likely stay under the free tier.
WhatsApp is more powerful for India use cases because everyone you know already uses it. Telegram is better for getting started quickly.
Using Groq Free Tier as Your Zero-Cost API
Groq provides free, fast inference for several open-weight models. For Indian users who want ₹0 API cost without the complexity of running local models, Groq is the best option:
Free tier limits (as of March 2026):
llama-3.1-70b-versatile: 14,400 requests/day, 30 requests/minutellama-3.2-3b-preview: 7,000 requests/daymixtral-8x7b-32768: 14,400 requests/day
For personal use — daily briefings, reminders, task management, occasional queries — 14,400 requests/day is more than enough. You will not hit the limit in normal usage.
Using Ollama for Fully Local (Zero API Cost) Setup
If you prefer running everything locally with no internet dependency for AI:
# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
# Download Llama 3.2 (4.7 GB download, 8 GB RAM needed)
ollama pull llama3.2
# Start Ollama server
ollama serve
Then in your openclaw.config.json:
{
"ai": {
"provider": "ollama",
"model": "llama3.2",
"baseUrl": "http://localhost:11434"
}
}
Local models are slower than cloud APIs but have zero cost and full privacy. Llama 3.2 performs well for task management, reminders, and simple automations.
Common Errors and Fixes
"Error: Node.js version 18.x is not supported"
Your Node.js version is too old. Run the installation steps in Step 1 to upgrade to Node.js 22.
"Port 18789 is already in use"
Another process is using the port. Change the port in your config:
{ "webui": { "port": 28789 } }
"GROQ_API_KEY is not set"
Your .env file is not in the correct directory. Run openclaw start from inside the directory that contains your .env file, or set the environment variable directly:
export GROQ_API_KEY=your_key_here
openclaw start
"Telegram bot is not responding"
Check that your bot token is correct, that you have started a conversation with the bot by sending /start, and that your Telegram username matches what is in allowedUsers config.
"Cannot connect to Ollama"
Ensure Ollama is running (ollama serve in a separate terminal) and that the OLLAMA_BASE_URL in your config points to http://localhost:11434.
India-Specific: Firewall and ISP Considerations
Some Indian ISPs (especially BSNL and certain corporate networks) block outbound connections on non-standard ports. If your OpenClaw cannot reach the Groq API:
- Try switching from your home broadband to a mobile hotspot temporarily to verify it is an ISP issue
- Configure OpenClaw to use HTTPS (port 443) which is almost never blocked
- If using a VPS to run OpenClaw, ensure the VPS provider allows outbound API calls (most do)
For running OpenClaw 24/7 without leaving your laptop on, consider a cheap VPS:
- DigitalOcean Mumbai region: $6/month (~₹500/month) for 1 GB RAM
- AWS EC2 t4g.micro, ap-south-1 (Mumbai): Free tier for 12 months
Where to Go Next
With OpenClaw installed and running, the next step is installing skills to expand what it can do:
- OpenClaw Skills Guide — Install Gmail, Calendar, India-specific skills from ClawHub
- OpenClaw Hacks and Power Tips — Memory layers, model routing, cron automation
- OpenClaw India Guide — WhatsApp setup, Hindi prompts, India automations
- OpenClaw Security Guide — Protect your setup before going live
Community Questions
0No questions yet. Be the first to ask!