Getting Started with OpenClaw: From Zero to Production
Step-by-step guide to installing and configuring OpenClaw. Covers macOS, Windows, Docker installation, Telegram/Discord/Slack integration, and production deployment checklist. Perfect for beginners getting started with OpenClaw.
You've decided to try OpenClaw. Maybe you're convinced by its data sovereignty, or you need deep integration with Slack and Telegram. Whatever your reason, this guide walks you through getting OpenClaw from "just installed" to "actually useful" — without the headache.
We'll cover:
- Installation (all major platforms)
- Initial configuration
- Connecting your first messaging platform
- Running your first agent task
- Production hardening checklist
1. Installation: Choosing Your Path
Option A: macOS / Linux (Recommended)
OpenClaw provides a one-line installer for Unix-like systems:
curl -fsSL https://openclaw.ai/install.sh | bash
This script:
- Installs Node.js dependencies
- Sets up the Gateway service
- Creates default configuration files
- Starts the Gateway automatically
Verification:
openclaw status
You should see the Gateway running on ws://127.0.0.1:18789.
Option B: Windows (PowerShell)
iwr -useb https://openclaw.ai/install.ps1 | iex
Or via CMD:
curl -fsSL https://openclaw.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Option C: Docker (For Advanced Users)
# docker-compose.yml
services:
openclaw:
image: openclaw/openclaw:latest
ports:
- "18789:18789"
volumes:
- ./data:/data
environment:
- API_KEY=your-api-key
2. Initial Configuration
The Essential Config File
After installation, you'll find openclaw.json in your data directory. Here's a production-ready starting point:
{
"gateway": {
"host": "0.0.0.0",
"port": 18789,
"auth": {
"enabled": true,
"token": "generate-a-secure-token-here"
}
},
"model": {
"provider": "anthropic",
"model": "claude-sonnet-4-20250514",
"apiKey": "${ANTHROPIC_API_KEY}"
},
"memory": {
"type": "supermemory",
"path": "./memory"
},
"channels": {
"enabled": []
}
}
Setting Up Environment Variables
Create a .env file (add to .gitignore!):
# Required
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
# Optional
DISCORD_BOT_TOKEN=your-token
TELEGRAM_BOT_TOKEN=your-token
SLACK_BOT_TOKEN=your-token
3. Connecting Messaging Platforms
Telegram (Easiest to Start)
- Create a bot via @BotFather on Telegram
- Copy your bot token
- Add to config:
{
"channels": {
"telegram": {
"enabled": true,
"botToken": "${TELEGRAM_BOT_TOKEN}",
"admins": ["your-user-id"]
}
}
}
}
- Restart Gateway:
openclaw gateway restart
- Message your bot — you should get a welcome response!
Discord
- Create an application at discord.com/developers
- Add a bot to your server
- Enable Message Content Intent
- Configure:
{
"channels": {
"discord": {
"enabled": true,
"botToken": "${DISCORD_BOT_TOKEN}",
"serverIds": ["your-server-id"],
"channelIds": ["your-channel-id"]
}
}
}
Slack
- Create a Slack app at api.slack.com/apps
- Enable Bot Token and Event Subscriptions
- Install to workspace
- Configure:
{
"channels": {
"slack": {
"enabled": true,
"botToken": "xoxb-...",
"signingSecret": "your-secret",
"appToken": "xapp-..."
}
}
}
4. Running Your First Agent Task
Basic Interaction
Once connected, just message your agent:
You: What's the weather in Shanghai?
The agent should respond after a brief think cycle.
More Complex Tasks
You: Research the top 5 AI coding assistants and create a comparison table with pricing, features, and pros/cons
OpenClaw will:
- Break down the task
- Search the web
- Compile results
- Format as a table
Multi-Step Automation
Create a skill for recurring tasks:
# skills/daily-standup.md
name: Daily Standup
trigger: /standup
actions:
- type: github
action: get-issues
filters:
assignee: me
updated: today
- type: format
template: "## Yesterday\n{{issues}}\n## Today\n"
5. Agent Teams: Beyond Single Agents
For complex workflows, OpenClaw supports multiple agents working together:
{
"agents": {
"researcher": {
"role": "researcher",
"model": "claude-sonnet-4-20250514",
"skills": ["web-search", "read", "summarize"]
},
"coder": {
"role": "coder",
"model": "claude-sonnet-4-20250514",
"skills": ["write", "edit", "bash"]
},
"reporter": {
"role": "reporter",
"model": "claude-sonnet-4-20250514",
"skills": ["format", "markdown"]
}
},
"teams": {
"default": {
"members": ["researcher", "coder", "reporter"],
"workflow": "sequential"
}
}
}
6. Production Hardening Checklist
Before going live, ensure you've addressed:
Security
- Authentication token enabled
- Gateway behind firewall (or reverse proxy with SSL)
- No sensitive data in config files (use env vars)
- Regular security updates scheduled
Reliability
- Log rotation configured
- Health check endpoint tested
- Restart scripts tested
- Backup strategy for memory files
Monitoring
- Gateway logs accessible
- Error alerts configured
- Resource usage tracked
Performance
- Model latency acceptable
- Channel response times tested
- Concurrent session limits set
7. Troubleshooting Common Issues
"Connection refused" Errors
Check:
openclaw gateway status
netstat -an | grep 18789
Fix: Ensure Gateway is running and port isn't blocked.
Model API Failures
Check:
echo $ANTHROPIC_API_KEY
Fix: Verify API key is set correctly and has credits.
Channel Not Responding
Check:
openclaw channels list
openclaw channels test telegram
Fix: Verify bot tokens and permissions.
Stay tuned for advanced guides that will help you unlock OpenClaw's full potential.
Related Articles
The Rise of AI Agent Marketplaces: Platforms Reshaping Enterprise Automation
AI agent marketplaces are emerging as the new frontier in enterprise automation, enabling businesses to discover, deploy, and manage specialized AI agents for every business function.
AI Agent Security, Performance & Enterprise Deployment: The Deep Dive
we explored the fundamental philosophies behind OpenClaw, Manus AI, and Claude Code. Now it's time for the uncomfortable conversations — the ones every CTO and security lead needs to have before production deployment.
The Agentic Revolution—How AI Is Transforming from Chatbot to Autonomous Worker
AI agents are moving beyond simple chat interactions to autonomously executing complex tasks, marking a fundamental shift in how humans work with artificial intelligence
