OpenClaw on VPS
Run OpenClaw on VPS to keep your AI agent online 24/7, connect messaging apps, automate real workflows, and choose the right setup for your needs.
What Is OpenClaw on a VPS?
OpenClaw is an AI agent that helps you complete real tasks, not just chat. It can connect with apps, read messages, follow instructions, run actions, and automate daily workflows.
A VPS means Virtual Private Server. It is a remote computer that runs online. When you run OpenClaw on VPS, your agent works from that remote server instead of your personal computer.
Here is the flow:
Your computer turns off → OpenClaw still runs on the VPS → Your connected apps still work → Your agent can keep replying, running tasks, and handling workflows.
Why Use a VPS for OpenClaw?
A VPS gives OpenClaw a stable place to run online. Your computer does not need to stay open, and your agent can keep working from the server.
Main Benefits
OpenClaw keeps working even when your computer is off.
You can use OpenClaw from your laptop, phone, desktop, or messaging apps.
It can stay connected to Telegram, WhatsApp, Discord, or Slack.
It does not stop because of sleep mode, Wi-Fi issues, or computer restarts.
API keys, logs, files, and tools stay on the VPS, not your personal device.
You can manage Docker, Node.js, domains, logs, updates, and server settings.
If your workflows grow, you can increase RAM, CPU, or storage.
A VPS is better if you want OpenClaw to handle messages, automations, reminders, and app connections all day.
VPS Requirements To Run OpenClaw
To run OpenClaw on VPS, you need a Linux server with enough RAM, storage, SSH access, and a secure way to open the OpenClaw dashboard.
| Requirement | Recommended |
|---|---|
| OS | Ubuntu 22.04 / 24.04, Debian also works |
| RAM | 2GB minimum, 4GB recommended |
| CPU | 1 vCPU minimum, 2 vCPU recommended |
| Storage | 20GB minimum, 50GB recommended |
| Access | SSH access with sudo/root permission |
| Runtime | Docker + Docker Compose v2, or Node.js setup |
| Security | Firewall, gateway token, SSH tunnel or private access |
| AI key | OpenAI, Anthropic, OpenRouter, Gemini, or another provider |
How To Decide VPS Specs for OpenClaw
Choose VPS specs based on how many tasks, apps, and users you want OpenClaw to handle. Do not buy the cheapest 1GB server and then act betrayed when it collapses.
Simple VPS Spec Guide
| Use Case | Recommended VPS Specs |
|---|---|
| Testing only | 2GB RAM, 1 vCPU, 20GB storage |
| Personal use | 4GB RAM, 2 vCPU, 50GB storage |
| Daily workflows | 4GB to 8GB RAM, 2 vCPU, 50GB+ storage |
| Small team | 8GB to 16GB RAM, 4 to 8 vCPU, 100GB storage |
| Heavy automation | 16GB+ RAM, 8 vCPU+, 150GB+ storage |
More apps like Telegram, WhatsApp, Slack, and Discord need more memory and stability.
One person needs less power. A team needs more RAM and CPU.
Simple chat replies need fewer resources. Browser automation, file work, and long tasks need more.
Docker is better for VPS setup, but it needs enough RAM and disk space.
OpenClaw can create logs, config files, sessions, and workflow data, so storage matters.
If you use cloud AI like Claude, GPT, Gemini, or OpenRouter, the VPS can be smaller. If you run local models, you need much more RAM and CPU.
How To Set Up OpenClaw on VPS
Follow these steps to install OpenClaw on VPS and keep it running safely.
First, create an account with a VPS provider and buy a Linux VPS.
For most users, choose:
| Requirement | Recommended |
|---|---|
| OS | Ubuntu 22.04 or 24.04 |
| RAM | 4GB recommended |
| CPU | 2 vCPU recommended |
| Storage | 50GB SSD recommended |
| Access | SSH access with sudo/root permission |
For testing, 2GB RAM can work. For regular use, 4GB RAM is safer. A weak 1GB VPS may fail during setup or slow down later, because apparently “cheap” sometimes means “future problem with a login page.”
Open your terminal and connect to your server:
ssh root@your-server-ipReplace your-server-ip with your real VPS IP address.
Run this command first:
apt update && apt upgrade -yThis updates your server packages before installing OpenClaw.
For a safer setup, do not run everything as root. Create a separate user for OpenClaw:
adduser openclaw
usermod -aG sudo openclaw
su - openclawThis keeps your OpenClaw setup cleaner and safer.
Run the official OpenClaw installer:
curl -fsSL https://openclaw.ai/install.sh | bashThis installs OpenClaw and starts the setup process.
If onboarding does not start automatically, run:
openclaw onboard --install-daemonDuring onboarding, you can:
- Choose your AI provider
- Add your API key
- Set gateway options
- Generate or set a gateway token
- Connect channels like Telegram, Discord, Slack, or WhatsApp
- Install OpenClaw as a background service
After setup, check if the gateway is running:
openclaw gateway statusOpenClaw Gateway commonly uses port 18789. Gateway commands such as install, start, stop, restart, and status are listed in the official gateway CLI docs.
Do not expose the OpenClaw gateway port 18789 directly to the public internet. Use an SSH tunnel or private network access instead.
ssh -N -L 18789:127.0.0.1:18789 openclaw@your-server-ipThen open:
http://127.0.0.1:18789This lets you open the OpenClaw dashboard safely without making the gateway public.
After setup, make sure OpenClaw keeps running even after you close the SSH terminal.
Run this command:
sudo loginctl enable-linger "$USER"This allows OpenClaw to keep running in the background after you log out of the VPS.
Now check if OpenClaw is running:
systemctl --user status openclaw-gatewayIf that does not work, try this:
systemctl --user status openclawTo view live logs, use:
journalctl --user -u openclaw-gateway -fIf that does not work, try:
journalctl --user -u openclaw -fThis step helps OpenClaw stay online all the time, restart properly, and keep working even when your VPS terminal is closed.
Common Problems When Running OpenClaw on VPS
| Problem | Fix |
|---|---|
| OpenClaw does not install | Update the server and make sure your VPS has enough RAM. Use 4GB RAM for safer setup. |
| Dashboard does not open | Check if the gateway is running and make sure your SSH tunnel is active. |
| Port 18789 issue | Do not open port 18789 publicly. Use SSH tunnel or Tailscale. |
| OpenClaw stops after closing SSH | Enable background running with sudo loginctl enable-linger "$USER". |
| Messaging app does not connect | Recheck your Telegram, WhatsApp, Discord, or Slack token and reconnect the app. |
| API errors appear | Check your AI provider key, billing, and usage limits. |
| SSH tunnel stops working | Reopen the SSH tunnel and keep that terminal running. |
FAQs About OpenClaw on VPS
1. How do I set up OpenClaw on a VPS?
2. What VPS specs do I need for OpenClaw?
3. Is OpenClaw better on a VPS or a local computer?
4. How do I access the OpenClaw dashboard on a VPS?
5. What port does OpenClaw use?
6. Can I use OpenClaw on a VPS without keeping my laptop on?
Ready To Run OpenClaw Without VPS Setup?
If you want to run OpenClaw the easier way, use a managed OpenClaw hosting platform like Ampere.sh. It helps you launch OpenClaw faster without managing servers, Docker, ports, updates, or security setup yourself.
Deploy OpenClaw Now