How to install on Hostinger VPS on OpenClaw
Purchase a Hostinger VPS plan (KVM2+), connect via SSH, install Docker and Docker Compose, pull the OpenClaw Docker image, run the onboarding wizard to configure your AI provider keys and messaging integrations, then access the Control UI via SSH tunnel. Total setup time: ~15 minutes.
Prerequisites
- Hostinger VPS plan (KVM2 or higher recommended — minimum 2 GB RAM)
- SSH client (Terminal on Linux/macOS, PuTTY or Windows Terminal on Windows)
- API key from Anthropic (Claude) or OpenAI — or use nexos.ai credits
- Basic command-line knowledge
Step-by-Step Instructions
Choose the right Hostinger VPS plan
Hostinger also offers a one-click OpenClaw VPS template that pre-installs everything — if you prefer automated setup, select the OpenClaw template during checkout and skip to Step 5.
Connect to your VPS via SSH
22), and root password. Connect from your terminal:ssh root@YOUR_SERVER_IPEnter the root password from hPanel. Once connected, update the system:apt update && apt upgrade -yInstall Docker and Docker Compose
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
newgrp dockerVerify the installation:docker --version
docker compose versionBoth commands should return version numbers. Docker Compose v2 is included with modern Docker installations.Deploy OpenClaw with Docker Compose
mkdir -p ~/openclaw && cd ~/openclawGenerate a secret key for the gateway:openssl rand -base64 32 > .env
echo "OPENCLAW_SECRET=$(cat .env)" > .envCreate the docker-compose.yml:cat > docker-compose.yml << 'EOF'
version: '3.8'
services:
openclaw:
image: openclaw/gateway:latest
container_name: openclaw
restart: unless-stopped
ports:
- "127.0.0.1:3000:3000"
volumes:
- ./data:/app/data
env_file: .env
environment:
- NODE_ENV=production
EOFStart the container:docker compose up -dRun the onboarding wizard
ssh -L 3000:localhost:3000 root@YOUR_SERVER_IPThen visit http://localhost:3000 in your browser. The onboarding wizard will guide you through:- AI Provider: Enter your Anthropic (Claude) or OpenAI API key, or use nexos.ai credits for multi-model access
- Messaging Apps: Connect WhatsApp, Telegram, Discord, or Slack
- Security: Set a gateway password for the Control UI
- Preferences: Configure language, timezone, and default behaviors
Configure firewall and security
ufw allow 22/tcp
ufw enable
ufw statusFor extra security, change the default SSH port and disable password authentication in favor of SSH keys:nano /etc/ssh/sshd_config
# Change: Port 2222
# Change: PasswordAuthentication no
systemctl restart sshdInstall Fail2Ban for brute-force protection:apt install fail2ban -y
systemctl enable fail2banSet up automatic updates
cat > ~/openclaw/update.sh << 'EOF'
#!/bin/bash
cd ~/openclaw
docker compose pull
docker compose up -d
docker image prune -f
EOF
chmod +x ~/openclaw/update.shAdd a weekly cron job:crontab -e
# Add: 0 4 * * 0 /root/openclaw/update.sh >> /root/openclaw/update.log 2>&1Common Issues & Troubleshooting
Docker container fails to start or crashes immediately
Check logs with docker logs openclaw. Common causes: insufficient RAM (need 2 GB+), missing .env file, or port 3000 already in use. Free up memory with docker system prune -a or stop conflicting services.
Cannot access Control UI via SSH tunnel
Verify the container is running: docker ps. Ensure the SSH tunnel command uses -L 3000:localhost:3000 (not the server IP). Check that port 3000 isn't blocked by the container binding — it should bind to 127.0.0.1:3000.
WhatsApp or Telegram integration not connecting
Check your API keys in the Control UI settings. For WhatsApp, ensure you're scanning the QR code within 60 seconds. For Telegram, verify your bot token from @BotFather is correct. Restart the container after changing integration settings: docker compose restart.
AI responses are slow or timing out
This is usually an API provider issue, not a server issue. Check your API key quota and rate limits. If running local models via Ollama, ensure your VPS has enough RAM (8 GB+ recommended for 7B models). Consider upgrading to a higher Hostinger plan.