Running OpenClaw on your local machine is great for testing, but for production use — where you want your AI agent available 24/7, responding to Telegram messages at 3am, and processing tasks while your laptop is closed — you need a VPS or cloud server. This guide covers the complete setup process for DigitalOcean, Hetzner, and AWS.
For most OpenClaw deployments, a server with at least 2 vCPUs and 4GB RAM is the minimum. If you're running multiple agents or using local AI models, scale up accordingly. Our recommendations:
After provisioning your server, connect via SSH and perform initial hardening before installing OpenClaw.
# Update system packages sudo apt update && sudo apt upgrade -y # Create a non-root user sudo adduser openclaw sudo usermod -aG sudo openclaw # Set up SSH key authentication (from your local machine) ssh-copy-id openclaw@YOUR_SERVER_IP # Disable password authentication sudo nano /etc/ssh/sshd_config # Set: PasswordAuthentication no sudo systemctl restart sshd # Configure firewall sudo ufw allow OpenSSH sudo ufw allow 80/tcp sudo ufw allow 443/tcp sudo ufw enableFollow the standard installation process, but with a few server-specific considerations. Install pyenv system-wide and use a dedicated directory for the OpenClaw installation.
# Install dependencies sudo apt install -y build-essential python3-dev git curl # Install pyenv curl https://pyenv.run | bash # Add to .bashrc and reload # Install Python 3.11 pyenv install 3.11.8 pyenv global 3.11.8 # Clone and install OpenClaw git clone https://github.com/openclaw/openclaw.git /opt/openclaw cd /opt/openclaw python -m venv .venv source .venv/bin/activate pip install -r requirements.txtTo ensure OpenClaw starts automatically on boot and restarts if it crashes, configure it as a systemd service.
# Create service file sudo nano /etc/systemd/system/openclaw.service [Unit] Description=OpenClaw AI Agent After=network.target [Service] Type=simple User=openclaw WorkingDirectory=/opt/openclaw ExecStart=/opt/openclaw/.venv/bin/python -m openclaw Restart=always RestartSec=10 Environment=PYTHONUNBUFFERED=1 [Install] WantedBy=multi-user.target # Enable and start sudo systemctl daemon-reload sudo systemctl enable openclaw sudo systemctl start openclaw sudo systemctl status openclawFor webhook-based integrations (Telegram, etc.), you need HTTPS. Set up Nginx as a reverse proxy with a Let's Encrypt SSL certificate.
# Install Nginx and Certbot sudo apt install -y nginx certbot python3-certbot-nginx # Configure Nginx sudo nano /etc/nginx/sites-available/openclaw server {}server_name yourdomain.com; location {/} {}proxy_pass http://localhost:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr;}}}sudo ln -s /etc/nginx/sites-available/openclaw /etc/nginx/sites-enabled/ sudo nginx -t && sudo systemctl reload nginx # Get SSL certificate sudo certbot --nginx -d yourdomain.comOnce OpenClaw is running on your server, set up basic monitoring to be alerted if it goes down. We recommend using UptimeRobot (free tier) to monitor your OpenClaw endpoint and send email/SMS alerts if it becomes unreachable. For log monitoring, use journalctl -u openclaw -f to follow live logs.
VPS deployments add significant complexity to the OpenClaw setup process — firewall configuration, SSL certificates, systemd services, and reverse proxy setup all need to work together correctly. If you'd prefer to have experts handle this, our OpenClawRUS team offers complete VPS deployment services with 14-day post-deployment support included.
Skip the troubleshooting. Our team handles installation, configuration, and repairs — guaranteed working setup.