Install OpenClaw on Ubuntu 24
OpenClaw is an open-source AI agent platform that runs on your own infrastructure. In this guide, we'll walk through installing OpenClaw on an Ubuntu 24.04 VPS — from creating a dedicated user to pairing your first Telegram bot.
Prerequisites
| Component | Minimum (Running Only) | Recommended (Production) |
|---|---|---|
| CPU | 2 vCPU | 4 vCPU or more |
| RAM | 2 GB | 8 GB |
| Storage | 20 GB SSD | 40 GB+ SSD |
| OS | Ubuntu 22.04 / 24.04 | Ubuntu 24.04 LTS |
Step 1: Create a Non-Root User
First, create a dedicated user for OpenClaw and grant sudo access:
adduser openclaw-admin
usermod -aG sudo openclaw-adminThen switch to the new user and update the system:
su - openclaw-admin
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl git unzip build-essentialStep 2: Install Node.js v22
OpenClaw requires Node.js v22 or later. The easiest way is using nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash
source ~/.bashrc
nvm install 22
nvm use 22
node --versionStep 3: Install OpenClaw
Run the official installation script:
curl -fsSL https://openclaw.ai/install.sh | bashVerify the installation:
openclaw statusStep 4: Configure Your AI Model
Set a default AI model for your agent:
openclaw models set openai/gpt-4o-miniStep 5: Pair Telegram Bot
Launch the dashboard to generate a pairing code:
openclaw dashboard
# For remote servers, tunnel the port:
ssh -N -L 18789:127.0.0.1:18789 user@your-server-ip -vThen approve the pairing from your terminal:
openclaw pairing approve telegram 
Conclusion
You now have OpenClaw running on your Ubuntu server. Your AI agent is ready to help with tasks, answer questions, and automate workflows directly from Telegram.
For more details, visit the official OpenClaw documentation.