How to Install OpenClaw on Linux & Ubuntu: Complete Guide (2026)

Quick Answer: Install OpenClaw on Ubuntu or any Debian-based Linux with one command: curl -sSL https://get.openclaw.ai/install.sh | bash. Supports Ubuntu 22.04/24.04, Debian 12+, and Raspberry Pi OS. Requires Node.js 22+ (installed automatically) and 2 GB RAM minimum.

This guide covers three installation methods (one-line installer, manual npm, and Docker), systemd daemon configuration for always-on servers, Raspberry Pi setup, and Linux-specific troubleshooting.

Which Linux Distributions Does OpenClaw Support?

OpenClaw runs on any Linux distribution with Node.js 22+. These are the officially tested and supported options.

Ubuntu 22.04 LTS

Recommended

Long-term support until 2027. Best tested, most community resources. Ideal for both desktop and server.

Ubuntu 24.04 LTS

Supported

Latest LTS release. Full support with the one-line installer. Ships with a recent enough Node.js for manual install.

Debian 12+ (Bookworm)

Supported

Stable and lightweight. Perfect for VPS and headless servers. Uses the same apt-based installer path as Ubuntu.

Raspberry Pi OS (64-bit)

Supported

ARM64-based Debian derivative. Works on Pi 4 and Pi 5 with 4 GB+ RAM. Great for dedicated always-on hardware.

Fedora / Arch Linux

Community-Tested

Not officially supported but community-tested and generally functional. Use the manual npm installation method.

What Are the System Requirements for OpenClaw on Linux?

OpenClaw is lightweight. Most Linux machines and even a Raspberry Pi can run it comfortably.

ComponentMinimumRecommended
CPU1 core2+ cores
RAM2 GB4 GB
Disk Space10 GB free20 GB free
Node.jsv22+v22 LTS (installer handles this)
NetworkInternet connectionStable broadband for API calls
RECOMMENDED

Method 1: One-Line Installer

The fastest way to install OpenClaw on any supported Linux distribution. One command handles everything.

Standard Installation

curl -sSL https://get.openclaw.ai/install.sh | bash

Installs OpenClaw and launches the interactive setup wizard. Perfect for desktop use and development.

Server / Daemon Installation

curl -sSL https://get.openclaw.ai/install.sh | bash --install-daemon

Same as above, plus registers OpenClaw as a systemd service for auto-start on boot. Recommended for VPS and always-on servers.

What Does the Installer Do?

1
Detects your Linux distribution and version
2
Installs Node.js 22 from NodeSource if not present
3
Installs OpenClaw globally via npm
4
Runs openclaw init to create configuration in ~/.openclaw
5
Launches the interactive setup wizard (AI provider, API key, messaging)
6
Optionally registers a systemd daemon with --install-daemon

Method 2: Manual Installation

Full control over each step. Useful if you prefer to manage Node.js yourself, are on an unsupported distribution, or want to understand exactly what gets installed.

Step 1: Install Node.js 22

Add the NodeSource repository and install Node.js 22. This works on Ubuntu, Debian, and Raspberry Pi OS.

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

Step 2: Install OpenClaw via npm

Install the OpenClaw CLI globally. Do not use sudo with npm — if you get permission errors, fix npm's global directory ownership instead.

npm install -g openclaw

Step 3: Initialize OpenClaw

Create the configuration directory and run the setup wizard. This prompts for your AI provider, API key, and messaging platform connections.

openclaw init

Step 4: Start OpenClaw

Launch the OpenClaw agent. It starts the gateway on port 18789 and begins listening for messages and automation triggers.

openclaw start

Fedora / Arch Users

On Fedora, replace the NodeSource apt command with: sudo dnf install nodejs (if Fedora ships Node.js 22+) or use nvm install 22. On Arch: sudo pacman -S nodejs npm. Then proceed with npm install -g openclaw as usual.

Method 3: Docker on Linux

Best for VPS and server deployments. Docker provides container isolation, easy updates, and security sandboxing.

Docker Quick Start

git clone https://github.com/openclaw/openclaw.git && cd openclaw && bash docker-setup.sh

The docker-setup.sh script creates the docker-compose.yml, configures volumes for persistent data (~/.openclaw for config, ~/openclaw/workspace as the agent sandbox), and starts the container.

Container isolation limits blast radius if a skill is compromised
One-command updates: docker compose pull && docker compose up -d
Volumes preserve config and skills across container rebuilds
Best method for production VPS deployments

For a detailed Docker walkthrough including security hardening, see our complete OpenClaw Docker Setup Guide.

How Do You Run OpenClaw as a Daemon on Linux?

Register OpenClaw as a systemd service so it auto-starts on boot, restarts on crash, and runs in the background 24/7.

Install as daemon (automatic)

The one-line installer can register OpenClaw as a systemd service automatically.

curl -sSL https://get.openclaw.ai/install.sh | bash --install-daemon

Create a systemd unit file (manual)

If you installed manually, create a service file to manage OpenClaw with systemd.

sudo tee /etc/systemd/system/openclaw.service > /dev/null <<'EOF' [Unit] Description=OpenClaw AI Agent After=network.target [Service] Type=simple User=openclaw ExecStart=/usr/bin/openclaw start --headless Restart=on-failure RestartSec=10 Environment=NODE_ENV=production [Install] WantedBy=multi-user.target EOF

Enable and start the service

Tell systemd to start OpenClaw on boot and launch it now.

sudo systemctl daemon-reload && sudo systemctl enable openclaw && sudo systemctl start openclaw

Check status, restart, view logs

Common commands for managing the OpenClaw daemon after it is running.

sudo systemctl status openclaw # Check if running sudo systemctl restart openclaw # Restart the service sudo journalctl -u openclaw -f # Follow live logs

Linux-Specific Troubleshooting

Solutions to the most common issues when installing OpenClaw on Linux. If your problem is not listed, our workshop includes a dedicated troubleshooting module.

"Node.js version too old" or installer fails on Node.js

Your distribution ships an outdated Node.js. Install Node.js 22 from NodeSource: curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - && sudo apt-get install -y nodejs. Then re-run the OpenClaw installer.

EACCES: permission denied when installing npm packages

Do not use sudo with npm install -g. Instead, fix npm's default directory ownership: mkdir -p ~/.npm-global && npm config set prefix '~/.npm-global' && export PATH=~/.npm-global/bin:$PATH. Add the export line to your ~/.bashrc for persistence.

"curl: command not found"

curl is not installed by default on minimal server images. Install it: sudo apt update && sudo apt install -y curl. On Fedora: sudo dnf install curl. On Arch: sudo pacman -S curl.

Port 18789 already in use

Another process is occupying OpenClaw's default port. Find it: sudo lsof -i :18789 — then stop that process or change OpenClaw's port in ~/.openclaw/config. Kill the process: kill -9 <PID>.

Ubuntu 20.04 compatibility issues

Ubuntu 20.04 is not officially supported. The default Node.js (v10/v12) is too old. Install Node.js 22 manually from NodeSource, then install OpenClaw via npm install -g openclaw. The one-line installer may not detect 20.04 correctly — use the manual method instead.

How Do You Install OpenClaw on a Raspberry Pi?

The Raspberry Pi is an excellent dedicated always-on device for running OpenClaw. Low power, low cost, and fully yours.

Hardware Requirements

  • Raspberry Pi 4 (4 GB+) or Pi 5 (recommended)
  • 64-bit Raspberry Pi OS (Bookworm)
  • NVMe SSD via M.2 HAT (avoid microSD for reliability)
  • USB-C power supply (5V 3A minimum)

Reliability Tips

  • Add a USB-C UPS (~$25-40) to survive power outages
  • Use NVMe SSD over microSD to prevent data corruption
  • Enable watchdog timer for automatic crash recovery
  • Connect via Ethernet for stable network

Install on Raspberry Pi

curl -sSL https://get.openclaw.ai/install.sh | bash --install-daemon

The same one-line installer works on Raspberry Pi OS (64-bit). Use the --install-daemon flag so OpenClaw auto-starts when the Pi boots. The installer detects ARM64 architecture automatically.

For a dedicated Raspberry Pi deep dive, see our complete installation guide which covers Pi-specific networking and hardware recommendations.

Stop Wasting 40-60% of Your AI Budget

Download the free '6 Token Drains' guide — identify the hidden patterns burning through your tokens and get copy-paste fixes for each one.

Read the Free Guide
See what we've built for real businesses →

Skip the Setup Headaches

Get OpenClaw running in 20 minutes with our guided workshop. Includes setup guidance, prompt examples, and troubleshooting tips. One payment, no subscriptions, 30-day guarantee.

Save 10+ hours/week Cut AI costs by 97% Deploy in under 20 min

Get the Automation Playbook (Free)

One deploy-ready automation every week. Same strategies our clients pay thousands for. 400+ business owners already inside.

Need it done for you?

Book a Free Strategy Call See what we've built for real businesses →

Linux Installation FAQ