TSF – Giải pháp IT toàn diện cho doanh nghiệp SMB | HCM

P3 - Fast & Powerful Install OpenClaw on Ubuntu Guide

🧠 AI Tutorial – P3 Install OpenClaw on Ubuntu in Minutes!

No Hassle Guide for Beginners and IT Users

🚀 In this tutorial, you’ll learn how to install OpenClaw on Ubuntu quickly and efficiently. This guide is designed to be beginner-friendly while still following real-world IT deployment practices.

By the end of this guide, you’ll have a fully functional OpenClaw environment running on Ubuntu, ready to integrate with AI models and external services.


📖 What You’ll Learn

  • ⚙️ How to install OpenClaw on Ubuntu Server
  • 🔐 How to create and use API keys
  • 🌐 How to enable LAN and remote access
  • 🔗 How to connect from a client machine
  • 🚀 How to verify and run OpenClaw

🧩 Prerequisites

Before starting, make sure you have:

  • Ubuntu Server 22.04 LTS
  • Basic knowledge of terminal commands
  • Internet connection
  • A Google Gemini account (for API key)

🔑 1. Create API Key

Log in using your Google Gemini free account:

https://aistudio.google.com/app/apikey

Create project => Create API Key

API key:

 
AIzaSyD6AvnBb9Oly5vQ-k6KwXt_PTlR3Gscxt0
 

⚙️ 2. Installation

🖥️ Step 0: Prepare Ubuntu VM

  • OS: Ubuntu Server 22.04 LTS
  • CPU: 4 vCPU
  • RAM: 8GB
  • Disk: 60GB
  • Network: VirtIO (bridge vmbr0)
  • Network card: Host

👉 Note: Low CPU and RAM will cause AI to respond slowly, not due to VPN.

Set the timezone appropriate for your location (example: Vietnam):

 
sudo timedatectl set-timezone Asia/Ho_Chi_Minh
 

🔄 Step 1: Update System

Run:

 
sudo apt update && sudo apt upgrade –y
 

Install additional basic tools:

 
sudo apt install curl git -y
 

📦 Step 2: Install Node.js (OpenClaw Required)

Install Node 22 LTS+:

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

Check installation:

 
node -v
npm -v
 

🤖 Step 3: Install OpenClaw

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

👉 Enable hook by pressing space


🌐 Step 4: Enable LAN and VPN Connections

Press Ctrl + C to exit AI and run:

Stop the service completely:

 
systemctl –user stop openclaw-gateway.service
 

Edit the configuration file:

 
nano ~/.openclaw/openclaw.json
 

Change bind to:

 
“lan”
 

Restart the service:

 
systemctl –user restart openclaw-gateway
 

🔗 Step 5: Access OpenClaw from Client

Check the token key. If missing, run on the server:

 
cat ~/.openclaw/openclaw.json
 

You will see:

 
“auth”: {
“mode”: “token”,
“token”: “xxxxxxxx”
}
 

On the client, open CMD and run:

 
ssh -N -L 18789:127.0.0.1:18789 bao@192.168.16.250
 

👉 Use SSH username/password of this VM

Then open browser:

 
http://127.0.0.1:18789/#token=
http://127.0.0.1:18789/#token=496bb57e9b68ac6fb1378b6980c578d2ac45befe33a40700
 

🧪 Troubleshooting Tips

⚠️ Common issues you may encounter:

  • OpenClaw not starting → Check Node.js version
  • Cannot access from client → Verify SSH tunnel and port
  • Missing token → Recheck configuration file
  • Slow response → Upgrade CPU/RAM resources

👉 Always review terminal logs for detailed error messages.


🚀 Practical Use Cases

After installation, you can:

  • Build AI-powered automation systems
  • Integrate with Telegram bots or APIs
  • Create internal AI tools for IT operations
  • Deploy AI services in local environments
  • Experiment with different AI models

🎯 Final Thoughts

Installing OpenClaw on Ubuntu is a powerful step toward building your own AI infrastructure. With just a few commands, you can deploy a flexible and scalable system ready for automation and integration.

Once everything is running smoothly, you can expand further by connecting additional tools, enabling advanced features, or integrating with other platforms like Telegram.

See also related articles

P10 – Uninstall OpenClaw Windows Fast

P10 – Uninstall OpenClaw Windows Fast https://youtu.be/1ljEMzohiSY 🚀 AI Tutorial – P10: Uninstall OpenClaw on Windows (Clean Removal & Fix Issues) If you’re facing issues with OpenClaw or simply want to remove it completely, performing a proper Uninstall OpenClaw Windows process is essential. A partial uninstall may leave behind background...

Read More

P9 – Build Local AI Telegram Bot Fast (Ollama Guide)

P9 – Build Local AI Telegram Bot Fast (Ollama Guide) https://youtu.be/YuiLJDLIVr0 🚀 AI Tutorial – P9: Create a Local AI Telegram Bot with Ollama in Minutes Building a Local AI Telegram Bot is one of the fastest ways to bring AI into real-world usage. By combining Ollama with a simple...

Read More

P8 – Ultimate OpenClaw Local AI Setup

P8 – Ultimate OpenClaw Local AI Setup 🚀 AI Tutorial – P8: Complete Guide to Running Local AI with Ollama, Qwen & Open WebUI Running openclaw local AI is one of the most powerful ways to build a private, fast, and cost-efficient AI system. By combining Ollama, Qwen models, and...

Read More