AI Agent

How to Set Up OpenClaw: Complete Guide to Creating Your Own AI Agent

How to Set Up OpenClaw: Complete Guide to Creating Your Own AI Agent

Social Swarm Marketing Blog

Feb 17, 2026

Introduction: What is OpenClaw and Why You Need It

Imagine having a personal AI assistant that works 24/7, answers messages on your behalf, manages your calendar, and even helps with coding tasks—all while running on your own hardware. That's exactly what OpenClaw delivers.

OpenClaw is an open-source personal AI assistant that you can self-host on virtually any device. Unlike cloud-based AI services that charge monthly subscriptions and store your data on their servers, OpenClaw gives you complete control, privacy, and significant cost savings.

In this comprehensive guide, I'll walk you through setting up OpenClaw on Mac, Windows, Raspberry Pi, or a VPS—even if you have zero technical experience. By the end, you'll have your own AI agent ready to automate your business and personal tasks.

Why I Recommend a VPS for OpenClaw: While you can run OpenClaw on your local machine, a Virtual Private Server (VPS) ensures your AI assistant is always online. I personally use and recommend Hostinger VPS for its reliability, affordability, and excellent performance for AI workloads.

What You'll Need Before Starting

Before diving into the installation, gather these essentials:

  • Hardware: Mac, Windows PC, Raspberry Pi (4 or newer recommended), or a VPS

  • API Keys: You'll need API access from Anthropic (Claude) or OpenAI

  • Terminal Access: Basic familiarity with command line (don't worry—I'll provide exact commands)

  • Patience: Initial setup takes 30-60 minutes, but it's a one-time process

Cost Breakdown:

Step 1: Choose Your Platform

OpenClaw supports multiple platforms. Here's how to decide:

Option A: Mac (Easiest for Beginners)

Best for: Apple ecosystem users who want local control

  • Works natively on macOS

  • Easy integration with iMessage, Calendar, and Contacts

  • Great for testing before moving to VPS

Option B: Windows (via WSL2)

Best for: Windows users comfortable with Linux subsystem

  • Requires Windows Subsystem for Linux 2 (WSL2)

  • Full functionality once configured

  • Good for development environments

Option C: Raspberry Pi (Budget-Friendly)

Best for: Tech enthusiasts who want a low-cost, always-on solution

  • Extremely energy-efficient

  • One-time hardware cost (~$100)

  • Great learning experience

Option D: VPS (Recommended for Business)

Best for: Businesses needing 24/7 availability without maintaining hardware

  • Always online—no computer to keep running

  • Accessible from anywhere

  • Scalable resources as you grow

  • Professional reliability

My Recommendation: For business use, go with a VPS. Hostinger's VPS plans offer the perfect balance of performance and affordability for running OpenClaw.

Step 2: Setting Up Your VPS (Skip if Using Local Machine)

If you chose Mac, Windows, or Raspberry Pi, skip to Step 3. For VPS users, let's get your server ready.

2.1 Sign Up for Hostinger VPS

  1. Visit Hostinger and create an account

  2. Navigate to VPS hosting plans

  3. Select the KVM 2 plan or higher (2GB RAM minimum recommended for AI workloads)

  4. Choose Ubuntu 22.04 LTS as your operating system

  5. Complete checkout and wait for provisioning (usually 5-10 minutes)

Why Hostinger? Their VPS includes DDoS protection, automated backups, and 24/7 support—all at prices lower than competitors. Plus, their control panel makes server management incredibly simple.

2.2 Connect to Your VPS

Once your VPS is ready:

  1. Go to your Hostinger control panel

  2. Find your VPS and click "Manage"

  3. Note the IP address provided

  4. Open Terminal (Mac) or PowerShell (Windows)

  5. Connect via SSH: ssh root@YOUR-VPS-IP

  6. Enter the password provided by Hostinger

Security Tip: After first login, change your root password immediately with passwd command.

Step 3: Install OpenClaw

Now for the main event—installing OpenClaw. The process is similar across all platforms.

3.1 Install Prerequisites

First, update your system and install required packages:

# For Ubuntu/Debian (VPS and Raspberry Pi)
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget git nodejs npm

# For macOS
brew install node git

# For Windows (in WSL2)
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget git nodejs npm
# For Ubuntu/Debian (VPS and Raspberry Pi)
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget git nodejs npm

# For macOS
brew install node git

# For Windows (in WSL2)
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget git nodejs npm
# For Ubuntu/Debian (VPS and Raspberry Pi)
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget git nodejs npm

# For macOS
brew install node git

# For Windows (in WSL2)
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget git nodejs npm

3.2 Install OpenClaw CLI

The easiest way to install OpenClaw is via npm:

npm install -g openclaw
npm install -g openclaw
npm install -g openclaw

Verify installation:

openclaw --version
openclaw --version
openclaw --version

3.3 Run the Onboarding Wizard

OpenClaw includes an excellent onboarding wizard that guides you through setup:

openclaw onboard
openclaw onboard
openclaw onboard

The wizard will:

  • Create your workspace directory

  • Set up the gateway configuration

  • Configure your preferred messaging channels

  • Install essential skills

Follow the prompts carefully—the wizard explains each step.

Step 4: Configure Your AI Model

OpenClaw works with multiple AI providers. Here's how to set up the most popular options:

4.1 Anthropic Claude (Recommended)

Claude offers excellent reasoning and long-context understanding—perfect for an AI assistant.

  1. Visit console.anthropic.com

  2. Create an account and add billing ($5 minimum)

  3. Generate an API key

  4. In OpenClaw, run: openclaw auth add anthropic YOUR_API_KEY

4.2 OpenAI (ChatGPT)

If you prefer GPT models:

  1. Go to platform.openai.com

  2. Create an account and add billing

  3. Generate an API key

  4. In OpenClaw: openclaw auth add openai YOUR_API_KEY

Pro Tip: Start with Anthropic Claude—it performs better for assistant tasks and is more resistant to prompt injection attacks.

Step 5: Connect Messaging Channels

This is where OpenClaw shines. You can connect multiple channels so your AI can respond wherever you communicate.

5.1 Telegram (Easiest to Start)

  1. Message @BotFather on Telegram

  2. Create a new bot with /newbot

  3. Copy the API token provided

  4. In OpenClaw: openclaw channel add telegram --token YOUR_BOT_TOKEN

5.2 Discord

  1. Go to Discord Developer Portal

  2. Create a new application

  3. Generate a bot token

  4. Add to your server

  5. Configure in OpenClaw: openclaw channel add discord --token YOUR_TOKEN

5.3 Slack

  1. Create a Slack app at api.slack.com

  2. Enable Bot permissions

  3. Install to your workspace

  4. Add to OpenClaw with your Bot User OAuth Token

5.4 Other Channels

OpenClaw also supports:

  • WhatsApp (via WhatsApp Business API)

  • Signal

  • iMessage (via BlueBubbles on Mac)

  • Google Chat

  • Microsoft Teams

  • WebChat (browser-based interface)

Step 6: Start Your AI Agent

With everything configured, it's time to start your assistant:

# Start the OpenClaw gateway
openclaw gateway start

# In a new terminal window, start the agent
openclaw agent
# Start the OpenClaw gateway
openclaw gateway start

# In a new terminal window, start the agent
openclaw agent
# Start the OpenClaw gateway
openclaw gateway start

# In a new terminal window, start the agent
openclaw agent

Your AI is now running! Try sending a message through one of your connected channels, or use:

openclaw agent --message "Hello, what can you help me with?"
openclaw agent --message "Hello, what can you help me with?"
openclaw agent --message "Hello, what can you help me with?"

Step 7: Essential Configuration and Skills

Make your AI truly useful by adding skills and configuring preferences.

7.1 Install Useful Skills

# Calendar integration
openclaw skill install calendar

# Web search capability
openclaw skill install web-search

# Weather updates
openclaw skill install weather

# GitHub integration
openclaw skill install github
# Calendar integration
openclaw skill install calendar

# Web search capability
openclaw skill install web-search

# Weather updates
openclaw skill install weather

# GitHub integration
openclaw skill install github
# Calendar integration
openclaw skill install calendar

# Web search capability
openclaw skill install web-search

# Weather updates
openclaw skill install weather

# GitHub integration
openclaw skill install github

7.2 Set Your Preferences

Edit your configuration file at ~/.openclaw/config.json:

  • Set your timezone

  • Configure notification preferences

  • Customize the AI's personality and response style

Step 8: Running OpenClaw 24/7 (VPS Users)

If you're running on a VPS, you'll want OpenClaw to stay running even when you log out.

8.1 Install as a System Service

openclaw onboard --install-daemon
openclaw onboard --install-daemon
openclaw onboard --install-daemon

This sets up OpenClaw to automatically start on boot and restart if it crashes.

8.2 Monitor Your Agent

# Check if OpenClaw is running
openclaw status

# View logs
openclaw logs

# Restart if needed
openclaw gateway restart
# Check if OpenClaw is running
openclaw status

# View logs
openclaw logs

# Restart if needed
openclaw gateway restart
# Check if OpenClaw is running
openclaw status

# View logs
openclaw logs

# Restart if needed
openclaw gateway restart

Troubleshooting Common Issues

Issue: "Command not found" after installation

Solution: Add npm global bin to your PATH:

export PATH="$PATH:$(npm bin -g)"
export PATH="$PATH:$(npm bin -g)"
export PATH="$PATH:$(npm bin -g)"

Issue: API errors when starting agent

Solution: Verify your API key is correct:

openclaw auth list
openclaw auth list
openclaw auth list

Issue: Gateway won't start on VPS

Solution: Check if port 18789 is available:

sudo netstat -tulpn | grep 18789
sudo netstat -tulpn | grep 18789
sudo netstat -tulpn | grep 18789

Issue: Messages not being received

Solution: Check channel configuration:

openclaw channel list
openclaw channel list
openclaw channel list

Advanced Tips for Business Use

Automating Workflows

Create custom commands for repetitive tasks:

openclaw cron add --name "daily-report" --schedule "0 9 * * *" --message "Generate daily summary"
openclaw cron add --name "daily-report" --schedule "0 9 * * *" --message "Generate daily summary"
openclaw cron add --name "daily-report" --schedule "0 9 * * *" --message "Generate daily summary"

Multi-User Setup

Configure different permission levels if multiple team members will interact with the AI.

Backup Your Configuration

Regularly backup your workspace:

cp -r ~/.openclaw ~/openclaw-backup-$(date +%Y%m%d)
cp -r ~/.openclaw ~/openclaw-backup-$(date +%Y%m%d)
cp -r ~/.openclaw ~/openclaw-backup-$(date +%Y%m%d)

Conclusion: Your AI Assistant Awaits

You now have a fully functional AI assistant running on your own infrastructure. Whether you chose Mac, Windows, Raspberry Pi, or a Hostinger VPS, your OpenClaw agent is ready to help automate your business, manage communications, and boost productivity.

What's Next?

  • Explore the OpenClaw documentation for advanced features

  • Join the Discord community for support and ideas

  • Experiment with different skills and integrations

  • Set up monitoring to track your AI's performance

Remember: The initial setup is the hardest part. Once running, OpenClaw requires minimal maintenance while delivering massive value through automation and AI assistance.

Disclaimer: This post contains affiliate links. If you purchase a Hostinger VPS through my link, I may earn a commission at no extra cost to you. I only recommend products I personally use and trust.

About the Author

Collin Johnson is a web designer, marketer, and owner of Social Swarm Marketing with over seven years of experience building fast, conversion-focused websites. His work emphasizes performance, clarity, and sustainable growth, helping businesses and founders create online presences that load quickly, rank well, and drive results.

Collin D Johnson

Founder, Marketer, Designer

About the Author

Collin Johnson is a web designer, marketer, and owner of Social Swarm Marketing with over seven years of experience building fast, conversion-focused websites. His work emphasizes performance, clarity, and sustainable growth, helping businesses and founders create online presences that load quickly, rank well, and drive results.

Collin D Johnson

Founder, Marketer, Designer

About the Author

Collin Johnson is a web designer, marketer, and owner of Social Swarm Marketing with over seven years of experience building fast, conversion-focused websites. His work emphasizes performance, clarity, and sustainable growth, helping businesses and founders create online presences that load quickly, rank well, and drive results.

Collin D Johnson

Founder, Marketer, Designer

Let’s Build Something

Whether it’s a cutting-edge design, seamless development, or ongoing support, we’re here to bring your vision to life. Let’s talk and make it happen!

Let’s Build Something

Whether it’s a cutting-edge design, seamless development, or ongoing support, we’re here to bring your vision to life. Let’s talk and make it happen!

Let’s Build Something

Whether it’s a cutting-edge design, seamless development, or ongoing support, we’re here to bring your vision to life. Let’s talk and make it happen!