Prerequisites
Before installing OpenClaw, ensure you have:
- Node.js 18+ โ Download from nodejs.org
- npm or yarn โ Comes with Node.js
- Git โ For version control
- API Keys โ At minimum, an Anthropic or OpenAI key
- Basic terminal knowledge โ You'll be running commands
Installation
Install OpenClaw CLI
Install the OpenClaw command-line interface globally:
npm install -g openclaw
Verify installation:
openclaw version
Initialize Your Workspace
Create a new OpenClaw workspace:
mkdir my-openclaw-setup
cd my-openclaw-setup
openclaw init
This creates the basic directory structure and configuration files.
Configure Environment Variables
OpenClaw needs API keys and configuration. Create a .env file:
# AI Model Keys
ANTHROPIC_API_KEY=your_anthropic_key_here
OPENAI_API_KEY=your_openai_key_here
# Gateway Configuration
OPENCLAW_PORT=3000
OPENCLAW_HOST=localhost
# Optional: Telemetry (set to false to disable)
OPENCLAW_TELEMETRY=false
.env to your .gitignore file immediately.
Create Your First Agent
Generate an agent configuration:
openclaw agent create
You'll be prompted to configure:
- Agent name (e.g., "Assistant", "Ops Agent")
- Primary model (Claude, GPT-4, etc.)
- System prompt/persona
- Initial skills to include
Start the Gateway
Launch the OpenClaw gateway server:
openclaw gateway start
You should see output like:
โ Gateway running on port 3000
โ Agent "Assistant" connected
โ Skills loaded: 3
โ Ready to receive connections
Test Your Agent
Open a new terminal and test the connection:
openclaw chat
This opens a direct chat interface. Try asking:
- "Hello, who are you?"
- "What skills do you have?"
- "What can you help me with?"
Basic Configuration
Agent Persona (SOUL.md)
Your agent's personality is defined in the SOUL.md file. This controls how it communicates and behaves:
# SOUL.md โ Your Assistant
**Name:** Assistant | **Email:** assistant@yourcompany.com
**Emoji:** ๐ค | **Persona:** Professional helper
## Tone & Style
- Professional but friendly
- Clear, concise responses
- Always ask for clarification when uncertain
- Use bullet points for complex information
## Capabilities
- Answer questions about your business
- Help with scheduling and organization
- Provide information and research
- Create content and documents
## Never
- Make assumptions about sensitive topics
- Access external systems without permission
- Share confidential information
Memory Configuration
OpenClaw agents maintain memory in two forms:
- Daily Memory:
memory/YYYY-MM-DD.mdโ Detailed daily logs - Long-term Memory:
MEMORY.mdโ Curated insights
The agent automatically manages these files, but you can review and edit them to guide future behavior.
Adding Skills
Skills extend your agent's capabilities. Install your first skill:
openclaw skills install web-search
Available built-in skills include:
web-searchโ Search the internetfile-managerโ Read/write local filescalendarโ Schedule managementemailโ Email integrationgithubโ Git repository management
Connecting Clients
Mobile App
Download the OpenClaw companion app:
- iOS: Search "OpenClaw" in the App Store
- Android: Download from Google Play
Connect by scanning the QR code displayed when you run:
openclaw node pair
Telegram Integration
For Telegram integration:
- Create a bot via @BotFather
- Get the bot token
- Add to your
.env:
TELEGRAM_BOT_TOKEN=your_bot_token_here
Restart the gateway and your agent will be available in Telegram.
Common Issues & Troubleshooting
Gateway Won't Start
- Port in use: Change
OPENCLAW_PORTin.env - Missing API keys: Verify all required keys are in
.env - Node version: Ensure Node.js 18+ is installed
Agent Not Responding
- Model issues: Check API key validity and account credits
- Rate limiting: Reduce request frequency
- Memory issues: Clear the
memory/directory if corrupted
Skills Not Loading
- Permission errors: Ensure proper file permissions
- Dependency issues: Run
npm installin the skills directory - Configuration errors: Check skill YAML files for syntax
Next Steps
Now that OpenClaw is running, consider:
- Custom Skills: Build skills specific to your business workflows
- Automation: Set up cron jobs for recurring tasks
- Security: Implement proper access controls for production
- Monitoring: Add health checks and logging
- Integration: Connect to your existing tools and APIs
Production Deployment
For production use, you'll need:
- Dedicated server โ VPS, cloud instance, or on-premise
- Process management โ PM2, systemd, or similar
- Reverse proxy โ nginx for HTTPS and domain routing
- Backup strategy โ Regular memory and configuration backups
- Monitoring โ Health checks, logging, and alerting
- Security hardening โ Firewall, access controls, key rotation
Getting Help
If you're stuck:
- Documentation: Check the official OpenClaw docs
- Community: Join the OpenClaw Discord/forums
- Professional Setup: Book a consultation with our team
Remember: OpenClaw is powerful but complex. Don't hesitate to get help โ a properly configured system saves weeks of troubleshooting later.