OpenClaw Setup Guide
Complete step-by-step guide from zero to running your first autonomous AI agent. Works on old laptops, Mac Minis, or cloud VPS.
Choose Your Hardware
Old Laptop/Desktop
Perfect starting point. Any computer with 4GB+ RAM can run OpenClaw.
- • Cost: Free (existing hardware)
- • Setup: Easy local installation
- • Best for: Learning & testing
Dedicated Machine
Mac Mini, small PC, or Raspberry Pi for 24/7 operation.
- • Cost: $200-800 one-time
- • Setup: Install on dedicated OS
- • Best for: Production use
Cloud VPS
Hetzner, DigitalOcean, or AWS for remote deployment.
- • Cost: $20-100/month
- • Setup: SSH + remote config
- • Best for: Always-on agents
💡 Pro Tip: Hybrid Setup
Many power users run the OpenClaw Gateway on a cloud server with local device nodes connected via Tailscale. This gives you always-on capabilities plus access to platform-specific features (Mac apps, local hardware, etc).
Prerequisites
Node.js 22+
OpenClaw requires Node.js version 22 or higher for optimal performance.
# Install Node.js 22
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejsAI Model API Keys
Choose your AI provider(s). You can start with one and add others later.
Popular Options:
- • OpenAI (GPT-4, ChatGPT)
- • Anthropic (Claude)
- • Google (Gemini)
- • OpenRouter (All models)
Cost Estimates:
- • Light use: $50-100/month
- • Heavy use: $200-500/month
- • Business: $500-1500/month
Command Line Access
Basic terminal/command line knowledge for installation and configuration. Don't worry - we'll walk you through every command.
Installation Steps
1Install OpenClaw
Install the OpenClaw CLI globally using npm.
npm install -g openclaw@latestopenclaw command globally on your system.2Initialize Your Agent
Run the onboarding process to set up your first agent.
openclaw onboard --install-daemon- • Create your workspace directory
- • Generate initial configuration files
- • Install the daemon service
- • Guide you through API key setup
3Configure API Keys
Set up your AI model API keys in the environment file.
# Edit your .env file
nano ~/.openclaw/.env
# Add your API keys:
OPENAI_API_KEY=sk-your-key-here
ANTHROPIC_API_KEY=sk-ant-your-key-hereSecurity Tip: Consider using 1Password CLI for secure credential management in production.
4Start the Gateway
Launch the OpenClaw Gateway (the control plane for your agents).
openclaw gateway --port 18789 --verbose5Test Your Agent
Open a new terminal and test your agent configuration.
openclaw agent --message "Hello! I'm ready to help." --thinking highConnect Messaging Platforms
Once your agent is running, connect it to messaging platforms for real-world interaction. Start with one platform and add others as needed.
Telegram (Easiest)
- 1. Create a bot via @BotFather
- 2. Get your bot token
- 3. Add to .env:
TELEGRAM_BOT_TOKEN=your-token - 4. Restart gateway and test
Discord
- 1. Create Discord application
- 2. Create bot user
- 3. Get bot token and add to .env
- 4. Invite to server and configure
WhatsApp Business
- 1. Set up WhatsApp Business API
- 2. Get webhook credentials
- 3. Configure OpenClaw webhook
- 4. Test message routing
Other Platforms
- • Slack: Enterprise workspace integration
- • Signal: Private messaging
- • Teams: Microsoft ecosystem
- • Matrix: Decentralized chat
Security Basics
Important Security Configuration
Before giving your agent broad permissions, configure these security settings to prevent accidental damage.
Sandbox Configuration
Limit what your agent can access on your system.
# Edit config/security.json
{
"allowedPaths": ["/home/user/workspace"],
"restrictedCommands": ["rm -rf", "sudo", "passwd"]
}Autonomy Policies
Define what actions require permission vs automatic execution.
Green (Auto)
- • Read files
- • Research tasks
- • Generate content
Yellow (Ask)
- • Send messages
- • Make purchases
- • System changes
Red (Never)
- • Delete important files
- • Change passwords
- • Financial actions
Your Agent is Running — Now What?
🎉 Congratulations!
Your OpenClaw agent is now running and ready for action. Here's how to get the most out of it:
Install Skills
Add capabilities like browser automation, calendar integration, and custom business workflows.
Set Up Automation
Configure cron jobs for overnight processing, monitoring, and autonomous business operations.
Configure Memory
Set up agent memory systems for context retention and continuous improvement.
Explore Tools
Discover the best tools and services to integrate with your OpenClaw agents.
Master Advanced OpenClaw Techniques
Get weekly tutorials on automation, security best practices, and advanced agent configurations. Built for OpenClaw operators.
Setup FAQ
What hardware do I need to run OpenClaw?
OpenClaw runs on any device with Node.js 22+. Minimum: old laptop with 4GB RAM. Recommended: Mac Mini, dedicated Linux machine, or VPS with 8GB+ RAM. More powerful hardware enables faster processing and multi-agent workflows.
Can I run OpenClaw in the cloud?
Yes! OpenClaw works perfectly on cloud VPS providers like Hetzner, DigitalOcean, or AWS. Use Tailscale for secure remote access. Many users run the gateway on cloud while connecting local device nodes for platform-specific features.
How much does it cost to run OpenClaw?
OpenClaw itself is free. Operating costs: API keys ($100-300/month for ChatGPT/Claude), optional hosting ($20-100/month), and internet connection. Total typically $370-750/month depending on usage and model choices.
What if something goes wrong during setup?
Check the OpenClaw logs with openclaw logs. Common issues include missing Node.js version, incorrect API keys, or port conflicts. Join the Discord community for troubleshooting help.
Ready to Power Up Your Agent?
Your agent is running — now add skills and automation to unlock its full potential.