How to Install OpenClaw on Cloud Servers

2026-05-27 By Nathan 254 Views AI openclaw windows linux
0 reviews

OpenClaw is an automation tool designed to streamline tasks, manage complex workflows, and execute AI-driven operations. Running seamlessly in the background of your server, it supports a wide range of automation and integration needs.


Requirements


Before installing, please ensure your server meets the following requirements:

  • Node.js: Version 22 or higher
  • Version Control: Git installed
  • Memory: Minimum 8GB RAM (16GB recommended)
  • Storage: At least 10GB of free disk space
  • OS Support: Ubuntu 20.04+ OR Windows 10/11 (via WSL2)


Installing OpenClaw on Windows Server


Step 1: Install Prerequisites


Node.js Download and install Node.js (v22 or the latest LTS version) from the official website:

=> https://nodejs.org/en

Git Download and install Git for Windows via the following link:

=> https://git-scm.com/install/windows

pnpm (OpenClaw's preferred package manager) Follow the installation guide on the official pnpm website:

=> https://pnpm.io/installation


Please restart your server after completing the installations above to ensure all environment variables (PATH) are updated.


Once restarted, open your command prompt (CMD or PowerShell) and run the following commands to verify the installation:


Verify Node.js (Should be v22 or later)

# node --version  

Verify Git

# git --version

Verify pnpm

# pnpm --version


Step 2: Clone OpenClaw Repository

Open PowerShell or Command Prompt and run the following commands to clone the repository and navigate into the project directory:

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

# cd openclaw


Step 3: Install Dependencies and Build

Run the following commands to install all required packages and build the OpenClaw project components:


Install all required npm packages

# pnpm install

Build the frontend UI dashboard

# pnpm ui:build

Compile the core OpenClaw application

# pnpm build


This will automatically fetch all dependencies and compile both the user interface and the core backend services.


Step 4: Run the Setup Wizard

Run the following command to initialize the configuration:

# pnpm openclaw onboard –install-daemon


This will launch the interactive setup wizard, which will guide you through configuring OpenClaw's core components, including:

  • AI Models: Connect your preferred LLM providers (e.g., OpenAI, Anthropic).

  • Channels & Integrations: Set up communication workflows.

  • Workspaces: Define your automation environments.


Installing OpenClaw on Linux Server


Step 1: Install Node.js, Git, and pnpm

Run the following commands in your terminal to update the package manager and install all required prerequisites:


Update package manager repositories

# sudo apt update

Add NodeSource official repository for Node.js 22 and install it

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

Install Git

# sudo apt install -y git

Install pnpm

# npm install -g pnpm


Step 2: Download and Build Openclaw

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

# cd openclaw

# pnpm install

# pnpm ui:build

# pnpm build


Step 3: Run the Setup Wizard

Run the following command to start the interactive onboarding process and configure the background service:

# pnpm openclaw onboard --install-daemon


This configuration initialises OpenClaw and sets up a background service, ensuring the application remains running automatically in your environment.


Troubleshooting Common Installation Issues


Issue A: pnpm install fails with permission errors (EACCES)

On Linux, avoid using sudo to bypass pnpm or npm installation errors, as this can corrupt global file ownership. Instead, resolve the permission structure properly by redirecting the global binaries to your user directory.


Configure a dedicated global directory and update the path:


Run the following commands in your terminal to set up a local prefix and append it permanently to your shell profile:


Create a local directory for global packages

# mkdir ~/.npm-global

Configure npm to use the new directory prefix

# npm config set prefix '~/.npm-global'

Append the path permanently to your bash profile and reload it

# export PATH=~/.npm-global/bin:$PATH


Issue B: "Node version not supported" Error

This error occurs when your server's active Node.js environment does not meet OpenClaw's core requirements. OpenClaw requires Node.js version 22 or later. Please upgrade your Node.js runtime to the latest LTS version and try again. You can verify your current active version by running:

# node --version


If your current version is outdated, you can upgrade your environment using one of the following methods:


  • Option 1: Direct Download

    Download the latest stable LTS installer directly from the Official Node.js Website.

  • Option 2: Node Version Manager (nvm)

    If you manage multiple projects, we highly recommend using nvm to handle runtime versions. Run the following commands to install and activate Node.js 22:

    • Install Node.js 22 LTS

      # nvm install 22

    • Switch the active shell environment to Node.js 22

      # nvm use 22


Issue C: Port already in use

This error occurs when another application or service is already occupying OpenClaw's default gateway port. You can resolve this either by stopping the conflicting application or by assigning OpenClaw to a different port using the --port flag:

# openclaw gateway --port 18790


Issue D: Missing Native Dependencies (Linux)

Certain underlying Node.js native modules (such as C++ bindings for AI encoding or network protocols) require system-level build tools. If the installation fails on Linux, ensure the basic compilation tools are installed on your server:

# sudo apt install build-essential


Step 4: Verify Your Installation (Built-in Diagnostics):

OpenClaw features a built-in diagnostic utility to automatically verify your environment matrix, network channels, and AI configuration. Run the "doctor" command to inspect your setup:

# openclaw doctor


Finally, execute a simple agent command to verify that the AI engine and background services are communicating correctly:

# openclaw agent --message "Hello, are you working?"


If OpenClaw returns a successful response from the AI agent, your installation is officially complete and ready for production!


Step 5: Updating OpenClaw

To update OpenClaw to the latest version, choose the command that matches your installation method:


Option 1: If Installed Globally

# openclaw update --channel stable


Option 2: If Built from Source

# cd openclaw

# git pull origin main

# pnpm install

# pnpm ui:build

# pnpm build

What do you think about this article?

Rate this article
LayerStack Promotion
Need assistance?

Try this guide to receive free bundled services at signup on a new free account.

Sign Up

Your Feedback Is Important

We hope you’ll give the new products and updates a try. If you have an idea for improving our products or want to vote on other user ideas so they get prioritized, please submit your feedback on our Community platform. And if you have any questions, please feel free to ask in the Community or contact our Technical Support team.