Guide Menu expand_more

install vps

Install OpenClaw Without Docker

A no-Docker OpenClaw install path for users who prefer Node-based setup and direct VPS service management.

Difficulty
intermediate
Duration
30 minutes
Tested On
Ubuntu 24.04 VPS
Access Mode
SSH tunnel
verified
Status readiness check
Pre-Flight Approved
Risk rating medium
Gateway status Private

Introduction

Installing OpenClaw directly on your VPS without using Docker gives you full control over the process environment, directory structure, and local dependencies. This guide walks you through cloning, compiling, configuring, and starting OpenClaw safely.

Hinglish Summary: Agar aap Docker seekhna nahi chahte ya system memory kam hai, toh aap directly Node.js ka use karke OpenClaw set up kar sakte hain. Lekin isme config, process restarts, aur updates manually handle karne honge.


Prerequisites

Before starting, ensure you have:

  1. An updated Ubuntu VPS with basic UFW firewall enabled.
  2. Node 24 LTS and npm installed (see the Node 24 Setup Guide).
  3. Git installed:
sudo apt-get install -y git

Step 1: Clone OpenClaw Repo

Create a dedicated folder for your project and clone the codebase:

mkdir -p ~/openclaw-setup
cd ~/openclaw-setup
git clone https://github.com/OpenClaw/openclaw.git .

Step 2: Install Dependencies

OpenClaw has specific npm dependencies. Install them using:

npm install

This will download all node packages under node_modules. If you run into build errors (e.g. node-gyp issues), verify you have the standard compiler tools:

sudo apt-get install -y build-essential

Step 3: Configure Gateway & Secrets

Do not run OpenClaw before setting up your config.

Create Configuration File

Copy the sample config template:

cp config.example.yaml config.yaml

Edit Configuration

Open config.yaml using your favorite CLI editor (e.g. nano):

nano config.yaml

Safety Warning

[!CAUTION] Never check this config.yaml file into any public GitHub repository. It will contain your database passwords, Telegram bot tokens, and WhatsApp sessions.

Ensure the Gateway listens only on the local interface to prevent public scanning:

gateway:
  host: "127.0.0.1" # Do NOT set this to "0.0.0.0" (Public)
  port: 18789

Step 4: Verify with Doctor CLI

OpenClaw provides a doctor command to inspect your environment and verify database/redis connectivity:

npm run openclaw doctor

Good Output Example:

✔ Node version matches requirements (v24.x)
✔ Config file found and parsed successfully
✔ Database connection successful
✔ Redis connection status: OK

Step 5: Secure Remote Access (SSH Tunneling)

Since we bound the Gateway to 127.0.0.1 (loopback only) for security, you cannot open the dashboard directly using http://your-vps-ip:18789. Instead, create a secure SSH tunnel from your local PC.

SSH Tunnel Command (Run on your local computer’s command prompt):

ssh -L 18789:127.0.0.1:18789 user@your-vps-ip

Once connected, open your local browser and navigate to:

http://localhost:18789

This routes all dashboard traffic securely through SSH, bypassing the public internet firewall entirely.


Next Steps

If you close your SSH terminal, the OpenClaw process will terminate. Proceed to Run OpenClaw After Logout to configure PM2 or systemd to daemonize your setup.

ClawReady.in is an independent educational resource and setup service. It is not affiliated with, endorsed by, or operated by OpenClaw.