Installing OpenClaw on RHEL/CentOS VPS (1GB RAM)
Memory Note: Since you are running on 1GB of RAM, you must set up Swap Space first to prevent the system from crashing (OOM Killer).
Step 1: Create 2GB Swap Space
Run these commands as root to provide emergency virtual memory:
# Create, secure, and enable swap
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
# Make swap permanent after reboot
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Step 2: Install Node.js 22 (RHEL/DNF)
Since apt is not available on your system, use the dnf package manager:
# Add NodeSource Repo for RHEL-based systems
curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash -
# Install Node.js
sudo dnf install -y nodejs
# Verify version
node -v
Step 3: Install & Optimize OpenClaw
Run the official installer and then start the gateway with memory limits:
# Run the installer
curl -fsSL https://openclaw.ai/install.sh | bash
# Set memory limit and start
export NODE_OPTIONS="--max-old-space-size=512"
openclaw gateway start
Step 4: Accessing the Web UI
Because the VPS binds to localhost, run this on your local machine to view the dashboard:
ssh -N -L 18789:127.0.0.1:18789 root@your_vps_ip
Then visit http://localhost:18789 in your browser.
Low-Memory Best Practices
- Use Telegram/Discord: These use far less RAM than keeping the Web UI open.
- Avoid Browser Tasks: Do not run “Playwright” or “Puppeteer” skills; they will exceed 1GB RAM instantly.
- Monitor Logs: Use
openclaw logs --followto watch for errors.
Leave a Reply