OpenClaw Setup: From Zero to Running in 30 Minutes

OpenClaw Setup: From Zero to Running in 30 Minutes

This guide walks you through installing and configuring OpenClaw from scratch. By the end, you’ll have a working AI agent you can talk to via Telegram. No coding experience needed — just follow each step carefully.

What You’ll Need Before Starting

  • A computer running Windows, macOS, or Linux (or a cloud server — more on that below)
  • An internet connection
  • An Anthropic API key (free to create, pay-as-you-go usage)
  • A Telegram account (free)
  • About 30 minutes

Step 1: Install Node.js

OpenClaw runs on Node.js, a free software platform. If you don’t have it installed:

  1. Go to nodejs.org
  2. Download the LTS (Long Term Support) version for your operating system
  3. Run the installer and follow the on-screen instructions
  4. Verify the install by opening a terminal and typing: node --version

You should see a version number like v20.x.x or higher. If you do, you’re good to go.

Step 2: Install OpenClaw

Open your terminal (Terminal on Mac/Linux, PowerShell or Command Prompt on Windows) and run:

npm install -g openclaw

This installs OpenClaw globally on your system, making the openclaw command available anywhere. The download takes 1–3 minutes depending on your connection speed.

Verify the install worked:

openclaw --version

Step 3: Get an Anthropic API Key

OpenClaw uses Claude (by Anthropic) as its AI brain by default. Here’s how to get your API key:

  1. Go to console.anthropic.com and create a free account
  2. Once logged in, navigate to API Keys in the left sidebar
  3. Click Create Key, give it a name like “OpenClaw”, and copy the key
  4. Add a payment method (you won’t be charged unless you use it — it’s pay-as-you-go)

Tip: Keep your API key private. Don’t share it or commit it to a public GitHub repo.

Step 4: Initialize OpenClaw

In your terminal, run:

openclaw init

This launches an interactive setup wizard. You’ll be asked:

  • Where to create your workspace folder (the default is usually fine)
  • Your Anthropic API key (paste it in here)
  • Which AI model to use (Claude Sonnet is the default — good balance of speed and quality)

The wizard creates a workspace folder with starter files including SOUL.md (your agent’s personality), USER.md (info about you), and memory files.

Step 5: Set Up Your Telegram Bot

Telegram is the recommended way to chat with your OpenClaw agent. Here’s how to create a bot:

  1. Open Telegram and search for @BotFather
  2. Send the command: /newbot
  3. Follow the prompts: choose a name and a username for your bot (username must end in “bot”)
  4. BotFather will give you a bot token — copy it

Now connect it to OpenClaw:

openclaw plugin install telegram

Follow the prompts to enter your bot token. Once configured, your agent will be reachable through your Telegram bot.

Step 6: Start OpenClaw

Launch your agent with:

openclaw start

You should see output indicating the agent is running and connected. Open Telegram, find your bot, and send it a message — something simple like “Hello!” Your agent should respond within a few seconds.

Step 7: Customize Your Agent

Now it’s time to make the agent yours. Open your workspace folder and edit these files:

SOUL.md

This file defines your agent’s personality and behavior. You can tell it to be more formal or casual, give it a name, or define how it should handle certain situations. Edit it in any text editor.

USER.md

Tell your agent about yourself — your name, timezone, preferences, and what you’re working on. The more context you give it, the more helpful it becomes.

AGENTS.md

This file contains operational instructions for your agent — like startup routines, memory guidelines, and how to handle heartbeats.

Optional: Run on a Cloud Server for 24/7 Access

Running OpenClaw on your laptop means it goes offline when you close it. For a truly always-on assistant, consider a cloud VPS:

  • DigitalOcean — $4/month Droplet; easy setup, great docs
  • Vultr — From $2.50/month; fast global network, competitive pricing

Both platforms offer one-click Ubuntu servers that work perfectly for hosting OpenClaw. See our full Best Hosting for OpenClaw guide for a detailed comparison.

Troubleshooting Common Issues

“openclaw: command not found”

This usually means npm’s global bin directory isn’t in your PATH. Try running npm install -g openclaw again, or check if npm’s bin path is configured correctly for your shell.

Telegram Bot Not Responding

Make sure your OpenClaw process is still running in the terminal. If you closed the terminal, the agent stopped. Use a terminal multiplexer like tmux or run OpenClaw as a background service.

API Key Errors

Double-check the key was entered correctly — no extra spaces. Make sure your Anthropic account has billing set up (even if your usage is within the free tier).

You’re Up and Running!

Congratulations — your OpenClaw agent is live. Here’s what to explore next:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *