serverserv serverserv

How to install OpenClaw, step by step

By Siam Ahmed, software engineer · 7 min read · Updated

Installing OpenClaw takes about 15 minutes: install Node.js, install the OpenClaw package, then run its onboarding wizard, which connects your AI model, installs the always-on gateway service, and walks you through your first chat channel. This guide does it on a Linux server, because an agent is only useful if it stays on — but the same steps work on a computer at home if you are just trying it out.

What you need first

You need a machine that can stay on — a small VPS is the usual choice — with at least 1 GB of RAM (2 GB or more is comfortable), Node.js 22 or newer, and a way to connect an AI model: an API key from Anthropic, OpenAI or Google, an OpenRouter account, or a local model through Ollama. OpenClaw itself is free and open source under the MIT licence. New to it? Our What is OpenClaw? guide explains what it does, and the OpenClaw VPS requirements guide covers sizing in detail.

Everything below runs in a terminal, as a user with sudo access, on Ubuntu 22.04 or 24.04. On your own computer the package and wizard steps are the same; only the Node.js install differs.

Step 1: install Node.js 22

OpenClaw runs on Node.js 22 or newer. On Ubuntu, install the current 22.x release from NodeSource:

curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs
node --version

The last command should print a version starting with v22. If it prints something older, the new install did not take — fix that before moving on, because OpenClaw will refuse to start on an old Node.

Step 2: install OpenClaw

OpenClaw installs as a single global npm package:

sudo npm install -g openclaw@latest
openclaw --version

That is the whole install. OpenClaw keeps its configuration, workspace and memory in a folder called .openclaw in your home directory — worth knowing later, because backing up that one folder backs up your agent.

Step 3: run the onboarding wizard

The wizard is where OpenClaw becomes your agent. One command starts it, and it also installs the gateway as a background service, so the agent restarts by itself after a reboot:

openclaw onboard --install-daemon

The wizard asks you, in order:

  • Which model to connect — sign in or paste an API key for Anthropic, OpenAI, Google or OpenRouter, or point it at a local Ollama model. You can change this later; you are not locked in.
  • Your workspace — where the agent keeps its files. The default is fine.
  • The gateway service — accept the daemon install so OpenClaw runs in the background, always on.
  • A first channel — you can connect a chat app now or skip and do it in the next step.

Step 4: check the gateway is running

The gateway is the always-on heart of OpenClaw — it receives your messages and hands them to the model. Confirm it is alive:

openclaw gateway status

It should report the gateway running, listening on its default port, 18789. The wizard also gives you a local dashboard address — open it in your browser to see the agent's status, channels and memory in one place. Do not expose that port to the public internet without protection; the security section below explains why.

Step 5: connect a chat channel

Channels are how you talk to your agent — from your phone, in an app you already use. Telegram is the fastest first channel: you create a bot with BotFather, paste the token into OpenClaw, and send your first message. Our OpenClaw Telegram setup guide walks through it in minutes.

Prefer a different app? The WhatsApp setup guide and the Discord setup guide cover those channels the same way. Connect one channel, send a real request — "summarise my unread emails" is a good first test if you connect email later, or simply ask it to set a reminder — and watch it work before adding more.

Keep it running, updated and secure

The daemon keeps OpenClaw running day to day. Your three ongoing jobs are updates, backups and access control. Update with openclaw update (or reinstall the npm package) and read the release notes first. Back up the .openclaw folder — it holds your agent's memory and settings. And treat the gateway like a door into your digital life, because it is one.

An agent that can read your messages and act for you deserves ten careful minutes on security: keep the dashboard off the public internet or behind a VPN, approve which senders the agent listens to, and review what tools it can use. Our OpenClaw security guide covers the full checklist.

Can you run OpenClaw on a free model?

Yes — there are two genuinely free routes. You can run a local model on your own hardware through Ollama, which costs nothing per message, or use a hosted free tier, such as Google's Gemini free tier, which costs nothing to start. Many people begin free and switch to a low-cost paid model later, when the agent has earned it.

The honest trade-offs: a local model is only as good as your hardware. On a computer with a decent graphics card, a mid-size local model is capable and completely private. On a small cloud server with no GPU, local models run slowly and answer less sharply — for a server install, a hosted free tier is the better free start. At personal volumes, paid API models typically cost a few dollars a month, so treat free as a starting point, not a life sentence.

To change models later, just re-run the model step of the wizard or edit the configuration — your agent, memory and channels stay untouched.

How to uninstall OpenClaw

Three steps remove OpenClaw completely: stop the gateway, remove the package, and delete its folder. The folder step is the one to think about — it holds your agent's memory.

openclaw gateway stop
sudo npm uninstall -g openclaw

That stops the agent and removes the software. Your configuration, workspace and memory stay behind in the .openclaw folder in your home directory, so a later reinstall picks up where you left off. Only delete that folder if you want everything gone for good — and back it up first if there is any chance you will return.

Don't want to install it yourself?

The install is the easy part; the ongoing part is the server — updates, uptime, backups, keeping the gateway healthy at 3 a.m. If you would rather skip all of it, serverserv OpenClaw Hosting gives you your own server with OpenClaw already installed and set up for you, from $8.39 a month on a 3-year term — and the first month is $1 on a monthly plan. You connect your model and your chat apps, and start delegating.

Questions? Contact our team.

Questions

What do I need to install OpenClaw?

A computer or server that can stay on, Node.js 22 or newer, at least 1 GB of RAM (2 GB or more is comfortable), and a model to connect — an API key from Anthropic, OpenAI or Google, an OpenRouter account, or a local model through Ollama. The install itself takes about 15 minutes.

Is OpenClaw free to install?

Yes. OpenClaw is free and open source under the MIT licence. Your costs are the machine it runs on and whatever your model provider charges for usage — OpenClaw itself does not add a subscription.

Can I install OpenClaw on my own computer?

Yes — it runs on macOS, Windows and Linux, and a home computer is a fine way to try it. The catch is that the agent only works while the computer is on and awake. Most people who come to rely on it move it to a small VPS so it stays available around the clock.

How long does it take to install OpenClaw?

About 15 minutes for the install and the onboarding wizard, plus a few minutes per chat channel you connect. Telegram is the fastest first channel — creating the bot and pasting its token takes around five minutes.

How do I update OpenClaw?

Run openclaw update, or reinstall the latest npm package. Check the release notes before updating an agent you rely on, and back up your .openclaw folder first — it holds the agent's configuration, workspace and memory.

What is the best free AI model for OpenClaw?

For a completely free setup, a local model through Ollama — the largest model your hardware runs comfortably. On a machine with a decent graphics card that can be a very capable model; on a small cloud server, small models run but are slow and less sharp. Hosted free tiers, such as Google's Gemini free tier, are the easier free start. Many people start free and later switch to a low-cost paid model for a few dollars a month at personal volumes.

How do I uninstall OpenClaw?

Stop the gateway (openclaw gateway stop), remove the package (sudo npm uninstall -g openclaw), and — only if you want everything gone — delete the .openclaw folder in your home directory. That folder holds the agent's memory, configuration and workspace, so back it up first if you might reinstall.

Ready to deploy?

Pick a plan, choose a term and our team sets up your server for you.

See all plansTalk to sales

Need a custom server, bulk pricing or help moving from another host? Our team will build a quote for you.

Plans from $2.99/moSee plans