
How to Install OpenClaw: Step-by-Step Setup Guide
developers • 8 min read
Published March 16, 2026
Get OpenClaw running on your machine in under 10 minutes. This guide walks through npm installation, config, Telegram setup, and sending your first agent message.
📑 In This Guide
Prerequisites
Before you start, make sure you have Node.js 18+ installed on your system. You can check your Node version by running 'node --version' in your terminal. You'll also need npm (Node Package Manager), which comes with Node. Additionally, you'll need: a Telegram account (free), a text editor or IDE, and basic familiarity with the terminal. For cloud deployment, you may also need access to a VPS provider like DigitalOcean or Linode, but local setup works first.
Step 1: Install OpenClaw via npm
Open your terminal and run 'npm install -g openclaw' to install OpenClaw globally on your system. This makes the 'openclaw' command available from any directory. Alternatively, you can create a new project directory and run 'npm install openclaw' locally. The global installation is recommended for first-time users. Once installed, verify the installation by running 'openclaw --version' to confirm the version number appears.
Step 2: Create your configuration file
OpenClaw requires a config file to know which AI model to use and how to connect to messaging platforms. Create a file named 'openclaw.config.json' in your home directory or project folder. The config needs: your AI model preference (set 'model': 'gpt-4' for GPT-4, or 'claude-3' for Claude, or 'llama-2-local' if running locally), your API key for the model (get this from OpenAI or Anthropic's dashboard), and Telegram bot token (create this in Telegram via BotFather). A basic config looks like: { 'model': 'gpt-4', 'apiKey': 'your-key-here', 'telegramToken': 'your-telegram-token' }
Step 3: Set up Telegram Bot connection
Open Telegram and search for '@BotFather'. Send the message '/newbot' and follow the prompts to create a new bot. BotFather will give you a token — copy this into your openclaw.config.json file in the 'telegramToken' field. Then send the generated token to OpenClaw by running 'openclaw configure --telegram'. Your agent will now respond to messages in any Telegram chat where you've added the bot. Add the bot to a private group or personal chat for testing.
Step 4: Start your agent and send your first message
Run 'openclaw start' in your terminal to launch the agent. You should see output confirming that the agent is running and listening for Telegram messages. Open Telegram, find your newly created bot, and type a simple message like 'Hello, can you help me?' The agent will respond with a message generated by your configured AI model. Try asking it to perform an action like 'List the files in my downloads folder' or 'Check the weather' — the agent will execute these based on the skills you've enabled.
Troubleshooting common issues
If your bot doesn't respond, check: that Telegram bot token in your config is correct (copy from BotFather again if unsure), that your API key (OpenAI/Anthropic) is valid and has remaining credits, that your firewall isn't blocking outbound HTTPS connections. For npm installation issues on Windows, try 'npm install -g openclaw --legacy-peer-deps'. If the agent crashes, check logs by running 'openclaw logs' to see error messages. Most issues are config-related — re-run 'openclaw configure' to walk through setup interactively.
🛠️ Tools Mentioned
📚 Related Guides
What is OpenClaw? The AI Agent Platform Explained
OpenClaw is an open-source AI agent platform that lets you build, deploy, and control AI agents from Telegram, Slack, or any messaging app. Here's everything you need to know.
10 Real-World OpenClaw Use Cases for Small Businesses
Discover practical ways OpenClaw can automate workflows, save time, and scale operations. From email handling to data processing, here are 10 proven use cases.
Not sure which tool is right for your team?
ToolStack Radar is run by an independent IT consultant specialising in SaaS selection, Salesforce, and AI tool implementation for European businesses. We can help you choose, integrate, and get ROI from your software stack.
- ✓15+ years Salesforce experience
- ✓Swiss & EU B2B specialist
- ✓CRM, automation & AI tooling
- ✓Free 30-min discovery call
Ready to find the right tools?
Browse our independent comparisons and reviews — no hype, just honest data.