Requirements to Install OpenClaw on Linux

🐧

Supported Linux Distributions

OpenClaw works on all major Linux distributions:

  • Ubuntu 20.04, 22.04, 24.04
  • Debian 11, 12
  • Fedora 38, 39, 40
  • Arch Linux (rolling)
  • openSUSE, Manjaro, and others
📦

Node.js 22 or Newer

OpenClaw requires Node.js version 22+. We recommend using nvm (Node Version Manager) for easy Node.js installation and management.

bash
node --version
🔧

Build Tools

Some npm packages require build tools:

  • Ubuntu/Debian: build-essential
  • Fedora: Development Tools
  • Arch: base-devel
  • Python 3 (for node-gyp)

1 Method 1: Install OpenClaw with nvm (Recommended)

nvm (Node Version Manager) is the recommended way to install Node.js on Linux. It allows easy version management and avoids permission issues.

1
Install nvm

Download and install nvm using the install script:

bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

Close and reopen your terminal, or run:

bash
source ~/.bashrc
2
Install Node.js 22 with nvm

Install and use Node.js version 22:

Set Node.js 22 as default:

bash
nvm alias default 22

Verify installation:

bash
node --version
npm --version
3
Install OpenClaw globally

Use npm to install OpenClaw:

This installs OpenClaw v2026.2.6 globally. With nvm, no sudo required!

4
Run onboarding wizard

Configure your AI model, messaging platforms, and preferences.

5
Start OpenClaw

Access at http://127.0.0.1:18789/

✓ Installation Complete!

OpenClaw is now installed and running on your Linux system. The nvm method provides the cleanest installation without permission issues.

2 Method 2: Install OpenClaw via Package Manager

Install Node.js using your distribution's package manager, then install OpenClaw with npm.

Ubuntu / Debian

Install Node.js from NodeSource repository:

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

Install build tools:

bash
sudo apt-get install -y build-essential

Then install OpenClaw:

bash
sudo npm install -g openclaw@latest

Fedora / RHEL

Install Node.js from NodeSource:

bash
curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash -
sudo dnf install -y nodejs

Install development tools:

bash
sudo dnf groupinstall 'Development Tools'

Then install OpenClaw:

bash
sudo npm install -g openclaw@latest

Arch Linux

Install Node.js from official repositories:

bash
sudo pacman -S nodejs npm

Install base development tools:

bash
sudo pacman -S base-devel

Then install OpenClaw:

bash
sudo npm install -g openclaw@latest

3 Method 3: Install OpenClaw with Install Script

The official install script automates the entire process:

What the script does:

  • Detects your Linux distribution
  • Installs Node.js 22+ if needed
  • Installs required build tools
  • Installs OpenClaw globally
  • Provides next steps

After installation, run the onboarding:

bash
openclaw onboard

⚙️ Set Up OpenClaw as systemd Service (Optional)

Configure OpenClaw to start automatically on boot using systemd:

1
Create service file

Create a systemd service file:

bash
sudo nano /etc/systemd/system/openclaw.service

Add this content (replace YOUR_USER with your username):

ini
[Unit]
Description=OpenClaw AI Assistant
After=network.target

[Service]
Type=simple
User=YOUR_USER
WorkingDirectory=/home/YOUR_USER
ExecStart=/usr/bin/openclaw start
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target
2
Enable and start service
bash
sudo systemctl daemon-reload
sudo systemctl enable openclaw
sudo systemctl start openclaw
3
Check service status
bash
sudo systemctl status openclaw

View logs:

bash
sudo journalctl -u openclaw -f

Service Management Commands

  • sudo systemctl start openclaw - Start service
  • sudo systemctl stop openclaw - Stop service
  • sudo systemctl restart openclaw - Restart service
  • sudo systemctl disable openclaw - Disable auto-start

🔧 Linux-Specific Troubleshooting

Permission Errors

If you get EACCES errors without nvm, fix npm permissions:

bash
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Build Tool Errors

If native modules fail to build, ensure development tools are installed:

bash
# Ubuntu/Debian
sudo apt-get install build-essential python3

# Fedora
sudo dnf groupinstall 'Development Tools'
sudo dnf install python3

# Arch
sudo pacman -S base-devel python

Command Not Found

If openclaw command not found, add npm global bin to PATH:

bash
echo 'export PATH=$PATH:$(npm config get prefix)/bin' >> ~/.bashrc
source ~/.bashrc

More Help

For more troubleshooting: OpenClaw Install Troubleshooting Guide →

Next Steps After Installing OpenClaw on Linux

Linux Resources