Back to Blog
How to Install OpenClaw in 2026: Complete Setup Guide (3 Methods)
install openclawopenclaw setuphow to install openclawopenclawopenclaw dockeropenclaw vpsopenclaw vps requirementsopenclaw installsetup openclawself-hosted ai

How to Install OpenClaw in 2026: Complete Setup Guide (3 Methods)

Step-by-step guide to installing OpenClaw on any platform — Docker, bare metal Node.js, or managed hosting. Covers VPS requirements, configuration, platform connections, and common setup errors.


OpenClaw is the open-source AI assistant with 180K+ GitHub stars, MIT license, and a community that won't stop building. It connects to your chat apps, remembers everything, and runs on your own infrastructure.

But first you have to install it. And depending on which method you choose, that's either a 2-minute task or a 90-minute rabbit hole.

This guide walks through all three ways to install OpenClaw: Docker, bare metal Node.js, and managed hosting. Each method has real trade-offs, and we'll be honest about what those are.

New to OpenClaw? Read our complete OpenClaw guide first to understand what it is and what it can do. This article focuses purely on installation.

Before You Install OpenClaw: What You Need

No matter which installation method you pick, you'll need two things:

1. An LLM API Key

OpenClaw doesn't include its own AI model. It connects to external LLM providers — Anthropic (Claude), OpenAI (GPT), or OpenRouter (which gives you access to dozens of models through a single key).

You'll paste this key into OpenClaw's configuration during setup. Without it, OpenClaw has no brain.

2. A Chat Platform Token

OpenClaw lives in your chat apps. You need a bot token for at least one platform:

  • Telegram — Create a bot through @BotFather
  • Discord — Create an application in the Discord Developer Portal
  • Slack — Create a Slack app with the right OAuth scopes
  • WhatsApp — Set up through the Meta Business API

Each platform has its own token generation process. The OpenClaw docs walk through each one, but plan for 10-20 minutes per platform on your first setup.

OpenClaw VPS Requirements

If you're self-hosting (Docker or bare metal), you need a server. Here's what OpenClaw actually requires:

RequirementDocker InstallBare Metal Install
RAM2GB minimum1.5GB minimum
CPU1 vCPU (2 recommended)1 vCPU
Storage1GB+ (grows with logs)1GB+ (grows with logs)
OSLinux (Ubuntu recommended)Linux, macOS, or Windows
VPS typeKVM-based (not OpenVZ)Any VPS works
Node.jsNot required on hostv22.16+ (Node 24 recommended)
DockerRequiredNot required

The critical detail for Docker users: OpenVZ-based VPS providers don't support Docker. You need a KVM-based VPS. Most modern providers (Hetzner, DigitalOcean, Linode, Vultr) are KVM. Cheap providers on LowEndBox are sometimes OpenVZ — check before you buy.

A $5-6/month VPS from Hetzner or DigitalOcean covers OpenClaw comfortably. If you're running other services on the same box, bump up to 4GB RAM.

Method 1: Install OpenClaw with Docker

Docker is the method the official docs push hardest. It's reproducible and isolates OpenClaw from your host system. It also introduces its own category of problems.

Step 1: Install Docker

If Docker isn't already on your server:

curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER

Log out and back in for the group change to take effect.

Step 2: Clone the OpenClaw Repository

git clone https://github.com/openclaw/openclaw.git
cd openclaw

Step 3: Configure Your Environment

cp .env.example .env

Open the .env file and fill in your keys:

# LLM Provider (pick one or more)
ANTHROPIC_API_KEY=sk-ant-your-key-here
# OPENAI_API_KEY=sk-your-key-here
# OPENROUTER_API_KEY=sk-or-your-key-here

# Chat Platforms (configure at least one)
TELEGRAM_BOT_TOKEN=your-telegram-token
# DISCORD_BOT_TOKEN=your-discord-token
# SLACK_BOT_TOKEN=xoxb-your-slack-token
# SLACK_APP_TOKEN=xapp-your-slack-app-token

Step 4: Start OpenClaw

docker compose up -d

Check that it's running:

docker compose logs -f

You should see OpenClaw connecting to your configured platform(s). Send a message to your bot — if it responds, you're done.

Docker Gotchas

Docker adds convenience but also friction. The most common issues:

  • Port 3000 conflicts — Another service is using the port. Change it in docker-compose.yml or just remove the ports section if you only need chat platform access.
  • Volume permission errors — The container can't write to its data directory. Run sudo chown -R 1000:1000 ./data on the host.
  • OOM kills on small VPS — Docker itself needs ~200MB overhead. On a 1GB VPS, OpenClaw will get killed by the OOM killer. 2GB minimum, seriously.
  • OpenVZ doesn't support Docker — If you're on a budget VPS and docker commands fail with kernel errors, you're probably on OpenVZ. No fix — you need a KVM VPS or switch to bare metal.

We wrote an entire article on these issues: OpenClaw Docker: Setup Problems and Fixes.

Method 2: Install OpenClaw with Node.js (Bare Metal)

Bare metal means installing OpenClaw directly on your machine without Docker. Fewer layers, fewer abstraction problems, slightly more manual management.

Step 1: Install Node.js 18+

On Ubuntu/Debian:

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

Verify:

node --version  # Should show v20.x or higher

Step 2: Initialize OpenClaw

This is the fastest path to a running instance:

npx openclaw@latest init

This command scaffolds the project, creates configuration files, and walks you through the initial setup interactively. It will ask for your API keys and platform tokens.

Step 3: Start OpenClaw

npx openclaw@latest start

OpenClaw should boot and connect to your chat platform. Test it by sending a message.

Step 4: Keep OpenClaw Running with PM2

If you close your terminal, OpenClaw stops. PM2 is a process manager that keeps it alive:

npm install -g pm2
pm2 start "npx openclaw@latest start" --name openclaw
pm2 startup
pm2 save

Now OpenClaw will:

  • Restart automatically if it crashes
  • Start on server boot
  • Keep running after you close your SSH session

Bare Metal Trade-offs

The good: no Docker overhead, no port mapping confusion, no volume permission issues, works on any VPS (including OpenVZ).

The less good: you're responsible for Node.js version management, and if something conflicts with another Node.js app on the same server, you'll need to sort it out yourself. For most people running a single OpenClaw instance, this is the simpler path.

Method 3: Managed Hosting (Skip the Setup Entirely)

Both methods above require a VPS, SSH access, terminal comfort, and willingness to debug things when they break. If that sounds like more than you signed up for, managed hosting exists specifically for this reason.

We'll be upfront: ClawdHost is our product. We built it because we kept seeing the same installation problems in OpenClaw communities — and not everyone wants to become a sysadmin just to run an AI assistant.

How It Works

  1. Sign up at clawdhost.net
  2. Enter your LLM API key (Anthropic, OpenAI, OpenRouter, etc.)
  3. Connect your chat platform tokens
  4. Your OpenClaw instance is live — typically in about 60 seconds

No VPS. No Docker. No terminal. No PM2 configuration.

What You Get

  • Dedicated Hetzner VPS (not a shared container)
  • 4-platform support: Discord, Telegram, WhatsApp, Slack
  • Automatic OpenClaw updates and crash recovery
  • AES-256 encryption for your credentials

Pricing

One plan: $29/month. BYOK (bring your own key) — you pay your own LLM API costs separately. No hidden tiers, no included credits, no surprise bills.

The honest comparison: a self-hosted VPS runs $5-18/month, so you're paying a premium for not having to deal with setup, maintenance, security hardening, and troubleshooting. Whether that's worth it depends on how you value your time.

Comparing All Three OpenClaw Installation Methods

DockerBare Metal (Node.js)Managed (ClawdHost)
Setup time30-90 minutes15-45 minutes~60 seconds
Monthly cost$5-18 (VPS)$5-18 (VPS)$29
Technical skillIntermediateIntermediateNone
VPS requiredYes (KVM only)Yes (any type)No
RAM minimum2GB1.5GBN/A
Docker requiredYesNoNo
Crash recoveryManual/customPM2 auto-restartAutomatic + alerts
UpdatesManual pullManual updateAutomatic
SecurityYour responsibilityYour responsibilityHandled for you
Multi-platformManual config per platformManual config per platformDashboard toggle
AI credits includedNo (BYOK)No (BYOK)No (BYOK)

Pick Docker if: you already use Docker for other services and understand the tooling.

Pick bare metal if: you want the simplest self-hosted setup with the least overhead.

Pick managed hosting if: you want OpenClaw running without dealing with servers.

Configuring OpenClaw After Installation

Once OpenClaw is running, the install is only half the story. Here's what to set up next.

The .env File

All three self-hosted methods use a .env file for configuration. The key variables:

# Which LLM to use as the "brain"
ANTHROPIC_API_KEY=sk-ant-...
DEFAULT_MODEL=claude-sonnet-4-20250514

# Platform connections
TELEGRAM_BOT_TOKEN=...
DISCORD_BOT_TOKEN=...

# Optional: customize OpenClaw's personality
SYSTEM_PROMPT="You are a helpful assistant named..."

The LLM choice matters more than you might expect. Different models have different costs, speed, and capability profiles. We break this down in OpenClaw API Costs: What Nobody Tells You.

Memory: soul.md and memory.md

OpenClaw uses two files for persistent context:

  • soul.md — Defines the assistant's personality, rules, and long-term instructions. Think of it as the system prompt that persists across conversations.
  • memory.md — OpenClaw writes here itself. It stores facts it learns about you, preferences you mention, things it should remember.

These files live in OpenClaw's data directory. You can edit soul.md directly to shape how your assistant behaves. memory.md is mostly managed by OpenClaw automatically, but you can edit or clear it if needed.

Skills: Extending What OpenClaw Can Do

OpenClaw has a skills system with 100+ community-built skills available. Skills let OpenClaw do things like check the weather, manage your calendar, search the web, or interact with APIs.

The interesting part: OpenClaw can write its own skills. If you ask it to do something it can't do yet, it can create a new skill on the fly. This is one of the things that makes it genuinely "agentic" rather than just another chatbot wrapper.

Common OpenClaw Setup Errors and Fixes

Even after a successful install, things can go sideways. Here are the most frequent problems.

"Connection refused" or Bot Not Responding

Your platform token is wrong, expired, or missing the right permissions. Double-check:

  • Telegram: Is the token from @BotFather correct? Did you start a conversation with the bot first?
  • Discord: Does the bot have the right intents enabled in the Developer Portal? Is it invited to your server with proper permissions?
  • Slack: Are both the bot token (xoxb-) and app token (xapp-) configured? Did you enable Socket Mode?

Port 3000 Already in Use

Something else is using port 3000. Find it:

sudo lsof -i :3000

Kill it or change OpenClaw's port in your .env or docker-compose.yml.

Out of Memory (OOM) Kills

Your VPS doesn't have enough RAM. Symptoms: OpenClaw starts fine, runs for a while, then silently dies.

Check if OOM killed it:

dmesg | grep -i "oom\|killed"

Fix: upgrade your VPS to 2GB+ RAM, or add swap space as a temporary measure:

sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

Swap isn't a substitute for real RAM, but it prevents hard crashes on occasional memory spikes.

Permission Denied on Data Directory

OpenClaw can't write its database or memory files. This happens most often with Docker (see our Docker problems guide) but can also hit bare metal installs if you ran the initial setup as root and then switched to a regular user.

# Check who owns the data directory
ls -la data/

# Fix ownership to your user
sudo chown -R $USER:$USER data/

FAQ

How long does it take to install OpenClaw?

With bare metal (Node.js), expect 15-45 minutes including configuration. Docker takes 30-90 minutes depending on your familiarity with Docker and how many issues you hit. Managed hosting through a provider like ClawdHost takes about 60 seconds.

Can I install OpenClaw on my local machine instead of a VPS?

Yes. OpenClaw runs on macOS, Linux, and Windows. The bare metal method (npx openclaw@latest init) works locally. The catch: your assistant only runs while your machine is on and the process is running. For 24/7 operation, you need a VPS or managed hosting.

What are the minimum VPS requirements for OpenClaw?

1.5GB RAM for bare metal, 2GB for Docker. 1 vCPU works but 2 is smoother. KVM-based VPS required if you're using Docker — OpenVZ doesn't support it. A $5-6/month Hetzner or DigitalOcean droplet is enough for a single instance.

Is OpenClaw free to install?

The software is free and open-source under the MIT license. You'll pay for your VPS ($5-18/month for self-hosting) and your LLM API usage (varies wildly — $5 to hundreds per month depending on how much you use it). Managed hosting adds a fee on top.

Can OpenClaw connect to multiple chat platforms at once?

Yes. You can run OpenClaw on Telegram, Discord, Slack, and WhatsApp simultaneously from a single instance. Just add all the relevant tokens to your .env file. Each platform needs its own bot/app configuration, which adds setup time but works out of the box once configured.

Do I need to know Linux to install OpenClaw?

For Docker and bare metal installs, yes — basic Linux command line skills are needed. You'll be SSHing into a server, editing config files, and running terminal commands. If that's outside your comfort zone, managed hosting like ClawdHost handles the infrastructure entirely.

What's the difference between npx openclaw@latest init and cloning the repo?

npx openclaw@latest init is the quick-start method — it scaffolds a fresh project and walks you through setup interactively. Cloning the GitHub repo gives you the full source code, which is what the Docker method uses. For most users, the npx approach is simpler. Clone the repo if you want to modify OpenClaw's source code or use Docker.

How do I update OpenClaw after installing it?

Bare metal: run npx openclaw@latest start again — it checks for updates. Docker: pull the latest image with docker compose pull then docker compose up -d. In both cases, back up your data directory and .env file before upgrading. Managed hosting handles updates automatically.


Ready to Get Started?

If you want OpenClaw running without managing servers, ClawdHost deploys a fully managed instance in 60 seconds. One plan at $29/month, BYOK, with support for Discord, Telegram, WhatsApp, and Slack.

Bring your API key. Connect your chat platform. Done.

Try ClawdHost free for 24 hours →


Sources

Related Articles