M
MeshWorld.
OpenClaw Install Self-Hosted Ubuntu macOS Windows AI Node.js Tutorial 5 min read

How to Install OpenClaw on Ubuntu, macOS, and Windows (2026 Guide)

Vishnu
By Vishnu
| Updated: Mar 12, 2026

Installing AI agents is usually a nightmare of broken Python dependencies and cryptic Docker errors. You spend three hours debugging your virtual environment only to find out the library doesn’t support your version of Node. It’s frustrating, and it’s why most people give up before they even start. OpenClaw is different. It’s built on TypeScript, which means if you have Node.js, you’re basically done. No messy containers, no complex setups, just a clean CLI that works. This guide will get you up and running on Ubuntu, macOS, or Windows in less than ten minutes. Let’s get to it.

What do I need before I start?

You don’t need a supercomputer. You just need a few basic tools and an API key. Specifically, make sure you have Node.js 20 or higher installed. If you’re still on an old version of Node, now is the time to upgrade. You’ll also need Git to keep things updated and a key from Anthropic or OpenAI. Without a brain (the API key), the agent won’t do much.

The Scenario: You’re excited to try out a new AI tool you saw on Twitter. You open your terminal, run the install command, and it fails because your Node version is three years old. You spend an hour fixing your environment instead of actually using the tool. Avoid the headache—check your versions first.

How do I install OpenClaw on Ubuntu or Debian?

On Linux, I always recommend using nvm to manage Node versions. It keeps your system clean and lets you swap versions without breaking other apps. Once Node is ready, installing OpenClaw is a single command.

# Install Node 20
nvm install 20
nvm use 20

# Install OpenClaw globally
npm install -g openclaw

# Start the setup
openclaw init

Don’t forget to open port 3000 if you’re planning to access the agent remotely. Otherwise, the firewall will block your connection and you’ll be left wondering why the dashboard won’t load.

The Scenario: You’re setting up a private agent on a cheap VPS. You finish the install, but you can’t connect from your phone. You realize the firewall is blocking everything. One quick ufw allow command later, and you’re in. Always check the ports.

How do I set up OpenClaw on macOS?

If you’re on a Mac, Homebrew is your best friend. Use it to grab Node 20, then use npm for the rest. It’s straightforward, but Apple Silicon users need to make sure their PATH is set up correctly, or the openclaw command will just return a “not found” error.

brew install node@20
npm install -g openclaw
openclaw init

The setup wizard on Mac now includes a remote token option. It’s great for syncing with your iPhone, so don’t skip it if you want to use your agent on the go.

The Scenario: You’re at a coffee shop and want to show off your new agent. You realize you didn’t set up the remote gateway. You have to wait until you get home to finish the config. Set it up now so you can use it anywhere.

Can I run OpenClaw on Windows?

Yes, and it’s actually pretty easy now. You have two choices: use nvm-windows for a native experience or use WSL2 if you want to feel like a “real” developer. Most people prefer the native way because it’s faster to set up.

  1. Install nvm-windows.
  2. Run nvm install 20.
  3. Run npm install -g openclaw.

It works just as well as the Linux version. No more excuses for Windows users.

The Scenario: You’re stuck on a corporate Windows laptop and can’t install Docker. You think you’re out of luck. Then you realize OpenClaw only needs Node. You install it in five minutes and have a private AI assistant running right under IT’s nose.

What happens during the init walkthrough?

When you run openclaw init, the CLI asks you a few questions. It wants to know your agent’s name, which AI provider you’re using, and your API key. It also asks about messaging platforms like Telegram. This is where you decide if your agent is a quiet background worker or a chatty bot that pings you every morning.

  • Agent Name: This is just for your folder structure.
  • LLM Provider: Claude is usually smarter for complex tasks.
  • Heartbeat: Set this if you want the agent to do things on a schedule.

The Scenario: You name your agent “Assistant.” Then you realize you want three different agents for three different projects. You have to re-run init to give them better names like “ResearchBot” or “CodeReviewer.” Pick a good name the first time.

How do I fix common installation errors?

If the openclaw command isn’t working, your PATH is probably messed up. This happens a lot when people use sudo to install things they shouldn’t. If you get an API key error, check for hidden spaces. The CLI is literal—it won’t trim your mistakes for you.

  • Command not found: Fix your npm global path.
  • Permission denied: Don’t use sudo. Fix your folder permissions instead.
  • Bot not responding: Make sure you messaged the bot first.

The Scenario: You copy-paste your API key and it has a trailing space. The agent refuses to start. You spend twenty minutes looking at the code before realizing it’s just a formatting error. It happens to the best of us.