How to Run OpenClaw on Hostinger — Budget Hosting for AI Agents
Hostinger offers popular budget VPS hosting. Someone already wrote about OpenClaw on Hostinger. Here's your complete deployment guide.

If you've been following the AI agent space at all, you know the biggest bottleneck isn't building the agent — it's keeping it running. You can have the most elegant OpenClaw agent in the world, but if it dies every time you close your laptop, you don't have an agent. You have a script you babysit.
The fix is simple: throw it on a VPS and let it run 24/7. And if you're not trying to burn $50/month on infrastructure for a side project, Hostinger is one of the cheapest ways to do it.
This post walks you through the entire process — from purchasing a Hostinger VPS to having your OpenClaw agent running headlessly, connected to Telegram, and alive around the clock. No fluff, no theory. Just the steps.
Why Hostinger for OpenClaw Agents
Let me be blunt: Hostinger isn't the most powerful VPS provider. It's not going to win benchmarks against Hetzner or a dedicated server from OVH. But that's not the point.
The point is that OpenClaw agents are lightweight. They're not running massive language models locally. They're orchestrating API calls, processing text, managing state, and executing tool chains. For that workload, you need reliable uptime, decent network speeds, and root access to a Linux box. You don't need 64 GB of RAM.
Here's what Hostinger gives you:
| Plan | vCPU | RAM | Storage (NVMe) | Bandwidth | Price/mo (48-mo) |
|---|---|---|---|---|---|
| KVM 1 | 1 | 1 GB | 20 GB | 1 TB | $3.99 |
| KVM 2 | 1 | 2 GB | 40 GB | 2 TB | $4.99 |
| KVM 4 | 2 | 4 GB | 80 GB | 4 TB | $7.99 |
| KVM 8 | 4 | 8 GB | 160 GB | 8 TB | $11.99 |
| KVM 16 | 8 | 16 GB | 320 GB | 12 TB | $19.99 |
For a single OpenClaw agent handling Telegram interactions, web scraping, or scheduled tasks, the KVM 2 plan at $4.99/month is the sweet spot. Two gigs of RAM, 40 GB of fast NVMe storage, and 2 TB of bandwidth. That's more than enough.
If you're running multiple agents or doing anything with heavier processing — like agents that manage databases or serve web dashboards — bump to KVM 4 at $7.99. Still cheaper than your Netflix subscription.
Key things that matter for our use case:
- Full root SSH access (you need this to install dependencies and run background processes)
- KVM virtualization (real isolated resources, not oversold shared hosting)
- 99.9% uptime SLA (your agent stays alive)
- DDoS protection included
- Instant setup (you're deploying in minutes, not waiting for provisioning)
The one downside: Hostinger only offers Linux VPS. No Windows. But if you're deploying OpenClaw agents, you're running Linux anyway, so this is irrelevant.
Step 1: Purchase and Access Your VPS
Go to hostinger.com/vps-hosting and grab the KVM 2 plan. The 48-month commitment gets you the $4.99 price. If you don't want to commit that long, monthly pricing is higher but still reasonable.
During setup:
- OS: Select Ubuntu 22.04 LTS. It has the best package support and the most community troubleshooting resources.
- Location: Pick whatever's closest to your users or API endpoints. If your Telegram bot serves people in Europe, pick a European datacenter.
- Root password: Set something strong. You'll change your access method to SSH keys shortly.
After payment, Hostinger provisions the VPS almost instantly. You'll get an IP address and can access everything through hPanel (their control panel) or directly via SSH.
Open your terminal:
ssh root@YOUR_SERVER_IP
Enter your password. You're in.
First thing — lock down access and update everything:
# Update system packages
apt update && apt upgrade -y
# Create a non-root user (running everything as root is asking for trouble)
adduser openclaw
usermod -aG sudo openclaw
# Set up SSH key authentication
mkdir -p /home/openclaw/.ssh
# Copy your public key
echo "your-public-key-here" >> /home/openclaw/.ssh/authorized_keys
chown -R openclaw:openclaw /home/openclaw/.ssh
chmod 700 /home/openclaw/.ssh
chmod 600 /home/openclaw/.ssh/authorized_keys
# Disable root password login (do this AFTER confirming key access works)
sed -i 's/PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config
systemctl restart sshd
Now set up the firewall:
ufw allow OpenSSH
ufw enable
ufw status
Good. Your server is updated, secured, and ready.
Step 2: Install OpenClaw and Dependencies
Here's where it gets fun. SSH in as your new user and install everything OpenClaw needs to build and run:
sudo apt install -y git cmake build-essential python3 python3-pip python3-venv \
libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libglew-dev libglm-dev \
libpng-dev libvorbis-dev libogg-dev libphysfs-dev xvfb curl wget unzip
That's a big list. Here's what matters:
- git, cmake, build-essential: For cloning and compiling OpenClaw from source
- python3, pip, venv: For running agent scripts and managing dependencies
- SDL2 libraries: OpenClaw's rendering and audio stack
- xvfb: Virtual framebuffer — lets OpenClaw run headlessly on a server with no monitor
- curl, wget: For grabbing files and hitting APIs
Now clone and build OpenClaw:
cd /opt
sudo git clone --recursive https://github.com/OpenClaw/OpenClaw.git
sudo chown -R openclaw:openclaw /opt/OpenClaw
cd OpenClaw
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
The make -j$(nproc) flag uses all available CPU cores for compilation. On KVM 2's single vCPU, this takes about 5-10 minutes. On KVM 4 with two cores, it's noticeably faster.
If you hit any cmake errors about missing GLM or GLEW versions, try:
cmake .. -DCMAKE_BUILD_TYPE=Release -DOPENCLAW_USE_SYSTEM_GLM=ON
After compilation finishes, verify the binary exists:
ls -la /opt/OpenClaw/build/src/OpenClaw
You should see the executable. OpenClaw is built.
Step 3: Configure Headless Execution
Your Hostinger VPS doesn't have a monitor, a GPU, or a display server. OpenClaw uses SDL2 and OpenGL for rendering, which means it expects a display. On a headless server, we fake one with Xvfb (X Virtual Framebuffer).
Test it manually first:
# Start a virtual display
Xvfb :99 -screen 0 1024x768x24 &
export DISPLAY=:99
# Test that OpenClaw launches
cd /opt/OpenClaw/build
./src/OpenClaw
If OpenClaw starts without crashing, you're golden. It'll be rendering to a virtual screen you can't see — which is fine for agent workloads. If you actually need to see the screen (for debugging or demo purposes), we'll set up VNC access later.
Important note about game data: OpenClaw is an engine reimplementation of the 1997 game Claw. It needs the original game's WAD files to run the actual game content. If you legally own the game, upload the data files:
# From your local machine
scp -r /path/to/claw/data/* openclaw@YOUR_SERVER_IP:/opt/OpenClaw/data/
For agent-only workloads where you're using OpenClaw's platform capabilities rather than the game engine itself, you may not need the full game data. Check your specific agent's requirements.
Step 4: Set Up Your OpenClaw Agent
Now for the actual agent. Create a dedicated project directory and Python environment:
mkdir -p /home/openclaw/agent
cd /home/openclaw/agent
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
Install the packages your OpenClaw agent needs. The specifics depend on what your agent does, but a typical Telegram-connected agent might need:
pip install python-telegram-bot requests aiohttp python-dotenv schedule
Create your environment file for API keys and configuration:
cat > /home/openclaw/agent/.env << 'EOF'
TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
OPENCLAW_API_KEY=your_openclaw_key_here
AGENT_NAME=my-openclaw-agent
LOG_LEVEL=INFO
EOF
chmod 600 /home/openclaw/agent/.env
Your agent script goes in this directory. A minimal OpenClaw agent connected to Telegram might look like:
#!/usr/bin/env python3
"""OpenClaw Agent - Telegram Bot on Hostinger VPS"""
import os
import logging
from dotenv import load_dotenv
from telegram import Update
from telegram.ext import Application, CommandHandler, MessageHandler, filters, ContextTypes
load_dotenv()
logging.basicConfig(
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
level=getattr(logging, os.getenv('LOG_LEVEL', 'INFO'))
)
logger = logging.getLogger(__name__)
TELEGRAM_TOKEN = os.getenv('TELEGRAM_BOT_TOKEN')
async def start(update: Update, context: ContextTypes.DEFAULT_TYPE):
await update.message.reply_text(
"OpenClaw agent is live. Running 24/7 on Hostinger. What do you need?"
)
async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE):
user_message = update.message.text
logger.info(f"Received: {user_message}")
# Your OpenClaw agent logic goes here
# Process the message, call APIs, execute tools, return results
response = process_with_openclaw(user_message)
await update.message.reply_text(response)
def process_with_openclaw(message: str) -> str:
"""
Core agent logic powered by OpenClaw.
Replace this with your actual OpenClaw agent implementation.
"""
# OpenClaw agent processing
# This is where your agent's intelligence lives
return f"Processed: {message}"
def main():
app = Application.builder().token(TELEGRAM_TOKEN).build()
app.add_handler(CommandHandler("start", start))
app.add_handler(MessageHandler(filters.TEXT & ~filters.COMMAND, handle_message))
logger.info("OpenClaw agent starting on Hostinger VPS...")
app.run_polling(allowed_updates=Update.ALL_TYPES)
if __name__ == '__main__':
main()
Save this as /home/openclaw/agent/bot.py. Test it:
cd /home/openclaw/agent
source venv/bin/activate
python bot.py
Send your Telegram bot a message. If it responds, your agent works. Now we make it permanent.
Step 5: Keep It Running Forever with Systemd
This is the critical step. Without this, your agent dies the moment your SSH session ends. Systemd turns your agent into a proper service that starts on boot and restarts on crash.
sudo cat > /etc/systemd/system/openclaw-agent.service << 'EOF'
[Unit]
Description=OpenClaw AI Agent (Telegram)
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=openclaw
Group=openclaw
WorkingDirectory=/home/openclaw/agent
ExecStart=/home/openclaw/agent/venv/bin/python /home/openclaw/agent/bot.py
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
Environment=PYTHONUNBUFFERED=1
[Install]
WantedBy=multi-user.target
EOF
Enable and start it:
sudo systemctl daemon-reload
sudo systemctl enable openclaw-agent
sudo systemctl start openclaw-agent
Check status:
sudo systemctl status openclaw-agent
You should see "active (running)" in green. View logs anytime with:
sudo journalctl -u openclaw-agent -f
If the agent crashes, systemd waits 10 seconds and restarts it. If the server reboots (Hostinger maintenance, etc.), the agent starts automatically. This is what "always-on" actually means.
If you also need the OpenClaw engine running headlessly alongside your agent (for rendering, testing, or asset processing), create a second service:
sudo cat > /etc/systemd/system/openclaw-engine.service << 'EOF'
[Unit]
Description=OpenClaw Engine (Headless)
After=network.target
[Service]
Type=simple
User=openclaw
WorkingDirectory=/opt/OpenClaw/build
ExecStartPre=/usr/bin/Xvfb :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset
ExecStart=/opt/OpenClaw/build/src/OpenClaw
Restart=always
RestartSec=5
Environment=DISPLAY=:99
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable openclaw-engine
sudo systemctl start openclaw-engine
Two services, both managed independently, both auto-restarting.
Step 6: Optional — Remote Visual Access with VNC
If you need to actually see what OpenClaw is rendering (debugging, demos, monitoring), set up VNC:
sudo apt install -y tigervnc-standalone-server tigervnc-common
vncserver :1 -geometry 1280x720 -depth 24
Set a VNC password when prompted. Then open the port:
sudo ufw allow 5901
Also open port 5901 in Hostinger's hPanel firewall settings (VPS → Firewall section).
Connect with any VNC client from your local machine to YOUR_SERVER_IP:5901. You'll see the virtual desktop with OpenClaw running.
For browser-based access without installing a VNC client:
sudo apt install -y novnc websockify
websockify --web /usr/share/novnc 6080 localhost:5901 &
sudo ufw allow 6080
Then hit http://YOUR_SERVER_IP:6080/vnc.html in your browser. Remote desktop in a browser tab. Pretty slick for $4.99/month.
Step 7: Monitoring and Maintenance
Your agent is running. Now keep it healthy.
Check resource usage:
htop # Install with: sudo apt install htop
On KVM 2, a typical OpenClaw agent uses under 200 MB of RAM and barely touches the CPU except during processing spikes. You have plenty of headroom.
Set up log rotation so logs don't eat your 40 GB of storage:
sudo cat > /etc/logrotate.d/openclaw-agent << 'EOF'
/var/log/openclaw-agent/*.log {
daily
missingok
rotate 7
compress
delaycompress
notifempty
}
EOF
Automatic security updates:
sudo apt install unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades
Backups: Hostinger offers snapshots as an add-on. Take one after you've confirmed everything works. It's faster than redeploying from scratch if something breaks.
The Cost Breakdown
Let's be honest about what this costs:
| Item | Monthly Cost |
|---|---|
| Hostinger KVM 2 VPS (48-mo commitment) | $4.99 |
| Domain name (optional, via Hostinger) | ~$1.00 |
| Snapshots/Backups (optional add-on) | ~$2.00 |
| Total | $4.99 – $7.99 |
Compare that to running a local machine 24/7 (electricity alone costs more) or using a "serverless" platform where you pay per invocation and hit surprise bills. For under $8/month, you get a dedicated box that runs your OpenClaw agent continuously, handles your Telegram bot traffic, and gives you full control over the environment.
If you need to scale — maybe you're running five agents, or your agent processes heavy payloads — the KVM 4 at $7.99 or KVM 8 at $11.99 gives you real breathing room. But start small. You can always upgrade through hPanel without losing data.
Troubleshooting Common Issues
Build fails with SDL2 errors: Make sure you installed all the -dev packages. The most commonly missed one is libphysfs-dev.
"Cannot open display" errors: You forgot to start Xvfb or set the DISPLAY variable. Check that the virtual framebuffer is running: ps aux | grep Xvfb.
Agent stops responding after a few hours: Check memory usage with free -h. If you're running out of RAM on KVM 1, upgrade to KVM 2. Also check journalctl -u openclaw-agent --since "1 hour ago" for crash logs.
SSH connection refused: You probably locked yourself out with the firewall. Use Hostinger's hPanel browser-based terminal (VPS dashboard → Terminal) to fix UFW rules.
Slow compilation: KVM 1's single vCPU makes builds take 10-15 minutes. This is a one-time cost. If it bothers you, compile locally and SCP the binary over.
What's Next
You now have an OpenClaw agent running 24/7 on a $5/month Hostinger VPS. It auto-restarts on crash, survives reboots, and is accessible via Telegram (or whatever interface you've connected).
From here, the interesting work begins:
- Add more tools and capabilities to your OpenClaw agent — web scraping, database queries, API integrations
- Connect multiple interfaces — Telegram, Discord, a web dashboard, all hitting the same agent
- Set up a reverse proxy with Nginx and a domain name for webhook-based integrations instead of polling
- Deploy additional agents on the same VPS — KVM 2 can comfortably handle 3-4 lightweight agents simultaneously
Browse the Claw Mart listings for pre-built OpenClaw agents and tools you can deploy directly onto your new server. Why build everything from scratch when someone's already solved your specific use case?
The whole setup — from purchasing the VPS to having a running agent — takes about 30 minutes. Most of that is waiting for packages to install and OpenClaw to compile. The actual configuration is maybe 10 minutes of work.
Five dollars a month. Thirty minutes of setup. An AI agent that never sleeps.
That's the whole point.