Installing OpenClaw

OpenClaw is distributed as an npm package. You can install it globally and have a running AI agent in under 5 minutes — or skip the setup entirely and deploy with Clawly.

Not technical or just don't want the hassle?

Clawly is a hosted platform that deploys and manages your OpenClaw agent for you — no terminal, no servers, no Docker. Pick a plan, connect your channels, and you're live in seconds.

Try Clawly Instead

> Prerequisites

Before installing OpenClaw, make sure you have:

  • Node.js 22 or later. OpenClaw uses modern JavaScript features that require Node 22+. Check your version with node --version.
  • An AI provider API key. You'll need a key from Anthropic (Claude), OpenAI (GPT), Google (Gemini), or another supported provider.
  • A messaging platform bot token. Create a Telegram bot via @BotFather or a Discord bot in the Developer Portal.
  • A server (for 24/7 operation). Any VPS, cloud VM, or always-on machine. A $5/month server is enough for a single agent.

> Installation

Install OpenClaw globally via npm:

npm install -g openclaw

Verify the installation:

openclaw --version

> Configuration

OpenClaw uses a .env file for configuration. Create a working directory and initialize it:

mkdir my-agent && cd my-agent
openclaw init

This creates a .env file with the required variables. At minimum, you'll need to set:

# AI Provider
ANTHROPIC_API_KEY=sk-ant-...

# Telegram (optional)
TELEGRAM_BOT_TOKEN=123456:ABC-...

# Discord (optional)
DISCORD_BOT_TOKEN=MTIz...

# Agent personality
AGENT_NAME=MyAgent
AGENT_SYSTEM_PROMPT="You are a helpful assistant."

You only need to configure the channels you want to use. OpenClaw supports Telegram, Discord, WhatsApp, Signal, Slack, iMessage, and more — just add the relevant token.

> Running your agent

Start the agent with the gateway command:

openclaw gateway

The agent connects to your configured channels and starts listening for messages. You'll see output like:

[OpenClaw] Agent "MyAgent" starting...
[OpenClaw] Telegram connected
[OpenClaw] Discord connected
[OpenClaw] Ready — listening on 2 channels

For production deployments, use a process manager like pm2 or Docker to keep the agent running:

# With pm2
pm2 start "openclaw gateway" --name my-agent

# With Docker
docker run -d --env-file .env --name my-agent openclaw-agent

> Common issues

"Error: Node.js version too old"

OpenClaw requires Node.js 22+. Use nvm install 22 or download from the official Node.js website.

"Telegram polling conflict"

This happens if another process is already polling the same bot token. Stop any other instances or use a different bot token.

"API rate limit exceeded"

Your AI provider is throttling requests. Check your plan's rate limits and consider upgrading or adding request queuing.

Too much setup?

Clawly handles the installation, hosting, monitoring, and updates for you. Pick a plan, connect your channels, and your agent is live in seconds.

Deploy Without the Hassle