How to Set Up OpenClaw: A Complete Step-by-Step Guide

Setting up your own AI assistant that runs on your infrastructure might sound intimidating, but OpenClaw's installation process is surprisingly straightforward. Whether you're a developer looking to automate your workflow or a tech enthusiast wanting to explore AI agents, this guide will walk you through every step of getting OpenClaw up and running in under 30 minutes.
Share on :

How to Set Up OpenClaw: A Complete Step-by-Step Guide

Setting up your own AI assistant that runs on your infrastructure might sound intimidating, but OpenClaw's installation process is surprisingly straightforward. Whether you're a developer looking to automate your workflow or a tech enthusiast wanting to explore AI agents, this guide will walk you through every step of getting OpenClaw up and running in under 30 minutes.

What You'll Need Before Starting

Before diving into the installation, make sure you have the following prerequisites in place:

System Requirements

Operating System: OpenClaw works on macOS, Linux, or Windows (via WSL2). If you're on Windows, WSL2 is strongly recommended rather than native Windows, as it provides better compatibility and fewer issues.

Node.js: You'll need Node.js version 22 or higher. This is the runtime environment that OpenClaw uses to operate.

Memory and Processing: At minimum, you'll want 4GB of RAM, though 8GB or more is recommended for smooth performance, especially when handling concurrent tasks. Two CPU cores minimum will keep things responsive.

Internet Connection: Required for downloading packages and connecting to AI model providers.

API Keys You'll Need

You'll need at least one AI model provider API key. OpenClaw supports multiple providers:

  • Anthropic Claude (recommended for best performance and security)
  • Google Gemini (good free tier option)
  • OpenAI GPT models
  • Local models (if running entirely offline)

Optional but recommended:

  • Brave Search API key for web search capabilities (get one free at brave.com/search/api)
  • Other service API keys depending on which integrations you want to use

Choosing Where to Install

You have two main options for where to run OpenClaw:

Local Machine: Good for testing and learning. Install directly on your laptop or desktop. This is the easiest way to get started, but your assistant will only be available when your computer is running.

VPS (Virtual Private Server): Recommended for serious use. Providers like DigitalOcean, Hostinger, or BoostedHost offer pre-configured OpenClaw instances that run 24/7. This ensures your assistant is always available regardless of whether your personal computer is on.

For this guide, we'll focus on the local installation method, which is perfect for getting started.

Step 1: Install Node.js

If you don't already have Node.js version 22 or higher, you'll need to install it first.

On macOS

The easiest way is using Homebrew:

brew install node@22

On Linux (Ubuntu/Debian)

Use the NodeSource repository:

curl -fsSL https://deb.nodesource.com/setup_22.x | sudo bash -
sudo apt install -y nodejs

On Windows (WSL2)

First, make sure you have WSL2 installed. Then, inside your WSL2 terminal, use the Linux instructions above.

Verify Installation

Check that Node.js installed correctly:

node --version

You should see v22.x.x or higher.

Step 2: Install OpenClaw

Now for the main event. Open your terminal and run this single command:

npm install -g openclaw@latest

This downloads and installs OpenClaw globally on your system. The installation process typically takes 2-5 minutes depending on your internet connection.

If you see a version number when you run openclaw --version, the installation was successful.

Step 3: Run the Onboarding Wizard

This is where the magic happens. OpenClaw includes an interactive onboarding wizard that handles most of the configuration automatically. Run:

openclaw onboard --install-daemon

The --install-daemon flag tells OpenClaw to set up a background service so it keeps running even after you close your terminal.

What the Wizard Does

The onboarding wizard launches an interactive Terminal UI (TUI) that walks you through configuration. Here's what you'll encounter:

QuickStart vs Custom Setup: When prompted, choose QuickStart. This applies sensible defaults and gets you running fast. You can always fine-tune settings later.

Gateway Configuration: The wizard automatically sets up a local gateway on port 18789. This is the control center that manages all your messaging connections and AI interactions.

Security Token: The wizard generates a security token and stores it in your configuration. Keep this safe-you'll need it to access the web dashboard.

Step 4: Configure Your AI Model Provider

The wizard will prompt you to select an AI provider. Here's how to set up the most common options:

Option A: Anthropic Claude (Recommended)

  1. Select "Anthropic" from the provider list
  2. When prompted, enter your Anthropic API key
  3. Choose your preferred model (Claude Sonnet 4.5 is recommended for everyday use)

To get an API key:

  • Visit console.anthropic.com
  • Create an account or sign in
  • Navigate to API Keys and create a new key
  • Copy the key (you won't be able to see it again)

Option B: Google Gemini

  1. Select "Google" from the provider list
  2. You'll be prompted to authenticate via OAuth in your browser
  3. Choose a model (Gemini 1.5 Flash is fast and has a generous free tier)

Option C: OpenAI

  1. Select "OpenAI" from the provider list
  2. Enter your OpenAI API key when prompted
  3. Choose your preferred model (GPT-4 recommended)

The model choice isn't permanent. You can switch providers or add fallback models later.

Step 5: Connect Your First Chat Platform

OpenClaw can connect to multiple messaging platforms. Let's set up your first one:

Telegram (Easiest to Start With)

  1. When the wizard asks about chat platforms, select Telegram
  2. You'll be prompted to enter your phone number
  3. Telegram will send you a verification code
  4. Enter the code in the terminal
  5. OpenClaw creates a new session and logs in

That's it! OpenClaw is now connected to Telegram.

WhatsApp (QR Code Method)

  1. Select WhatsApp from the platform options
  2. A QR code will appear in your terminal
  3. Open WhatsApp on your phone
  4. Go to Settings > Linked Devices > Link a Device
  5. Scan the QR code
  6. OpenClaw connects to your WhatsApp account

Discord, Slack, and Others

The setup process is similar for each platform. The wizard will guide you through the authentication steps specific to each service.

Skills are modular tools that extend OpenClaw's capabilities. During setup, you'll be asked whether to configure skills.

For First-Time Users

When asked about skills, you can safely select "Skip for now." It's better to get the basic assistant working first, then add skills once you understand how OpenClaw operates.

Installing Skills Later

Once you're comfortable, you can install skills through the web dashboard or via command:

openclaw skills install <skill-name>

Popular skills include:

  • Google Calendar integration
  • File management tools
  • Web automation
  • Gmail access
  • Smart home controls

OpenClaw can search the web for current information, but this requires a Brave Search API key.

To configure web search:

openclaw configure --section web

When prompted, enter your Brave Search API key. You can get a free API key at brave.com/search/api with 2,000 searches per month at no cost.

Step 8: Start Your Assistant

If you installed the daemon service, OpenClaw should already be running in the background. To verify:

openclaw gateway status

If it's not running, start it manually:

openclaw gateway --port 18789

Step 9: Access the Web Dashboard

OpenClaw includes a web-based control panel where you can monitor activity, manage settings, and chat with your assistant.

  1. Open your browser
  2. Navigate to http://127.0.0.1:18789/
  3. When prompted for a token, find it in your configuration file at ~/.openclaw/gateway.auth.token
  4. Paste the token to log in

Important Security Note: The dashboard is only accessible from your local machine by default. This is intentional for security. Never expose this port directly to the internet without proper authentication.

Step 10: Hatch Your Assistant

This is the final step where your assistant comes to life. In the Terminal UI, select "Hatch in TUI" when prompted.

OpenClaw will ask you a few simple questions:

  • What should it call you?
  • What's your role or what do you do?
  • What should it help you with?

Based on your answers, it generates a personalized identity and memory context. Your assistant is now fully operational.

Testing Your Setup

Let's verify everything works:

Test 1: Send a Message via Terminal

openclaw message send --to telegram --message "Hello, OpenClaw! Are you working?"

You should receive a response in your Telegram app.

Test 2: Web Dashboard Chat

  1. Open the web dashboard at http://127.0.0.1:18789/
  2. Click on the WebChat interface
  3. Send a test message: "What's 2+2?"
  4. Verify you get a response

Test 3: Web Search (if configured)

Send a message asking about current events: "What happened in the news today?"

If web search is working, OpenClaw will search the web and provide current information.

Common Issues and Solutions

Issue: "Node version too old"

Solution: Upgrade to Node.js 22 or higher using the installation instructions in Step 1.

Issue: "Cannot connect to Telegram"

Solution: Make sure you entered the correct phone number with country code (e.g., +1234567890). Check that you're not being rate-limited by Telegram.

Issue: "Gateway won't start"

Solution: Check if another process is using port 18789:

lsof -i :18789

Kill the process or change the port in your configuration.

Issue: "OpenClaw responds very slowly"

Solution: This usually means your chosen AI model is rate-limited or you're on a free tier. Consider upgrading your API plan or switching to a faster model.

Issue: "Skills won't install"

Solution: Make sure you selected npm as your package manager during setup. Run openclaw doctor to diagnose configuration issues.

Security Best Practices

Now that OpenClaw is running, follow these security guidelines:

Limit Permissions: Start with minimal permissions. Grant access to email, file systems, and other sensitive areas only as needed.

Use Strong Models: Prompt injection is an unsolved problem in AI. Use strong models like Claude Opus 4.5 that have better resistance to manipulation.

Regular Updates: Keep OpenClaw updated with:

npm update -g openclaw

Token Security: Never share your gateway authentication token. Treat it like a password.

Monitor Activity: Regularly check the dashboard to see what actions OpenClaw is taking. The activity log shows every command executed.

Next Steps

Congratulations! You now have OpenClaw running. Here's what to do next:

Personalize Your Assistant

Spend time chatting with OpenClaw to help it learn your preferences. The more context it has, the better it can assist you.

Install Useful Skills

Browse the skill registry and install tools that match your workflow. Start with simple skills like calendar management before moving to more powerful automation.

Set Up Additional Channels

Connect OpenClaw to all the messaging platforms you use regularly so you can interact with it anywhere.

Create Custom Automations

Explore webhooks and scheduled tasks to automate recurring workflows. OpenClaw can send you morning summaries, monitor specific websites, or process data on a schedule.

Join the Community

The OpenClaw Discord and GitHub community are excellent resources for learning advanced configurations, troubleshooting issues, and discovering new use cases.

Advanced Setup: Running on a VPS

For those ready to take the next step, running OpenClaw on a VPS ensures your assistant is always available.

Quick VPS Setup

Several providers offer one-click OpenClaw deployments:

DigitalOcean: Search for "OpenClaw" in their marketplace and launch a pre-configured droplet. The basic $12/month plan works well.

Hostinger VPS: Offers a Docker-based OpenClaw template with automatic updates and management tools.

BoostedHost: Provides specialized OpenClaw hosting with the entire setup completed for you.

Manual VPS Installation

If you prefer manual setup on your own VPS:

  1. Provision a VPS with Ubuntu 24.04
  2. SSH into your server
  3. Follow the same installation steps as local setup
  4. Use SSH tunneling or Tailscale to securely access the dashboard remotely

Never expose port 18789 directly to the internet. Always use SSH tunnels, VPNs, or secure proxies.

Troubleshooting with the Doctor Command

OpenClaw includes a diagnostic tool that can catch common configuration problems:

openclaw doctor

This command checks your installation, verifies all dependencies, tests connectivity to AI providers, and reports any issues with permissions or configuration files.

Updating OpenClaw

The project updates frequently with new features and security improvements. To update:

npm update -g openclaw@latest
openclaw onboard --update

The update process preserves your configuration while upgrading to the latest version.

Conclusion

You've successfully set up OpenClaw, configured an AI model provider, connected messaging platforms, and verified everything works. You now have a personal AI assistant running on infrastructure you control.

Remember: OpenClaw is powerful software that deserves respect. Start with simple tasks, understand what it's doing before expanding permissions, and always monitor its actions. Used thoughtfully, OpenClaw becomes an invaluable tool for automation and productivity.

The learning curve continues beyond installation. Experiment with different skills, explore advanced configurations, and engage with the community. The real power of OpenClaw emerges not from following tutorials, but from discovering how it can uniquely serve your specific workflows and needs.

Your assistant is ready. What will you build together?


For more detailed documentation, troubleshooting guides, and community support, visit docs.openclaw.ai and join the OpenClaw Discord community.