OpenClaw is an open-source AI assistant that runs on your computer or server and connects to messaging platforms like Telegram, WhatsApp, and Slack. This guide walks you through installing OpenClaw on Windows, macOS, and Linux.
Prerequisites
Before installing OpenClaw, make sure you have:
- Node.js 22+ — OpenClaw runs on Node.js. Download it from
nodejs.orgor install via nvm. - An Anthropic API key — sign up at
console.anthropic.comand create an API key. - A Telegram Bot Token — create a bot via
@BotFatheron Telegram.
Installation on macOS
The fastest way to get OpenClaw running on macOS:
# Install Node.js via Homebrew
brew install node
# Install OpenClaw globally
npm install -g openclaw
# Create a configuration directory
mkdir ~/.openclaw && cd ~/.openclaw
# Initialize configuration
openclaw init
The init command creates a config.json file where you'll paste your API keys and Telegram bot token.
Installation on Windows
On Windows, we recommend using WSL2 (Windows Subsystem for Linux) for the best experience:
# Install WSL2 (run in PowerShell as admin)
wsl --install
# Inside WSL, install Node.js
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
nvm install 22
# Install OpenClaw
npm install -g openclaw
openclaw init
Alternatively, you can install Node.js natively on Windows and run OpenClaw directly, though some features work better under WSL2.
Installation on Linux
On Ubuntu/Debian:
# Install Node.js 22 via nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
source ~/.bashrc
nvm install 22
# Install OpenClaw
npm install -g openclaw
openclaw init
Configuration
After running openclaw init, edit the generated config.json:
{
"anthropic_api_key": "sk-ant-your-key-here",
"telegram_bot_token": "123456789:ABCdefGHIjklMNO",
"model": "claude-sonnet-4-20250514",
"system_prompt": "You are a helpful personal assistant."
}
Running OpenClaw
openclaw start
That's it! Open Telegram and message your bot. OpenClaw will respond using Claude.
Troubleshooting
- "Permission denied" — try
sudo npm install -g openclawor fix your npm permissions. - "ECONNREFUSED" — check your API key is valid and you have internet access.
- Bot not responding — verify the Telegram bot token is correct. Try messaging
/startto the bot.
The Easier Way: Use Clawby
If all of this feels like too much work, Clawby handles everything for you. One click, and you get a fully managed OpenClaw instance on a dedicated server — no terminal, no configuration, no maintenance. Just paste your API keys and go.