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

Runs 24/7

OpenClaw keeps working even when your computer is off.

Works from anywhere

You can use OpenClaw from your laptop, phone, desktop, or messaging apps.

Better for chat apps

It can stay connected to Telegram, WhatsApp, Discord, or Slack.

More stable than a laptop

It does not stop because of sleep mode, Wi-Fi issues, or computer restarts.

Keeps your computer clean

API keys, logs, files, and tools stay on the VPS, not your personal device.

More control

You can manage Docker, Node.js, domains, logs, updates, and server settings.

Easy to upgrade

If your workflows grow, you can increase RAM, CPU, or storage.

Better for real workflows

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.

RequirementRecommended
OSUbuntu 22.04 / 24.04, Debian also works
RAM2GB minimum, 4GB recommended
CPU1 vCPU minimum, 2 vCPU recommended
Storage20GB minimum, 50GB recommended
AccessSSH access with sudo/root permission
RuntimeDocker + Docker Compose v2, or Node.js setup
SecurityFirewall, gateway token, SSH tunnel or private access
AI keyOpenAI, 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 CaseRecommended VPS Specs
Testing only2GB RAM, 1 vCPU, 20GB storage
Personal use4GB RAM, 2 vCPU, 50GB storage
Daily workflows4GB to 8GB RAM, 2 vCPU, 50GB+ storage
Small team8GB to 16GB RAM, 4 to 8 vCPU, 100GB storage
Heavy automation16GB+ RAM, 8 vCPU+, 150GB+ storage

What Affects VPS Size?
Number of connected apps

More apps like Telegram, WhatsApp, Slack, and Discord need more memory and stability.

Number of users

One person needs less power. A team needs more RAM and CPU.

Type of workflows

Simple chat replies need fewer resources. Browser automation, file work, and long tasks need more.

Docker usage

Docker is better for VPS setup, but it needs enough RAM and disk space.

Logs and stored files

OpenClaw can create logs, config files, sessions, and workflow data, so storage matters.

Local AI models

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.

1
Choose a VPS Hosting Provider

First, create an account with a VPS provider and buy a Linux VPS.

For most users, choose:

RequirementRecommended
OSUbuntu 22.04 or 24.04
RAM4GB recommended
CPU2 vCPU recommended
Storage50GB SSD recommended
AccessSSH 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.”

2
Connect to Your VPS

Open your terminal and connect to your server:

ssh root@your-server-ip

Replace your-server-ip with your real VPS IP address.

3
Update Your Server

Run this command first:

apt update && apt upgrade -y

This updates your server packages before installing OpenClaw.

4
Create a Separate User for OpenClaw

For a safer setup, do not run everything as root. Create a separate user for OpenClaw:

adduser openclaw
usermod -aG sudo openclaw
su - openclaw

This keeps your OpenClaw setup cleaner and safer.

5
Install OpenClaw

Run the official OpenClaw installer:

curl -fsSL https://openclaw.ai/install.sh | bash

This installs OpenClaw and starts the setup process.

6
Run OpenClaw Onboarding

If onboarding does not start automatically, run:

openclaw onboard --install-daemon

During 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
7
Check Gateway Status

After setup, check if the gateway is running:

openclaw gateway status

OpenClaw Gateway commonly uses port 18789. Gateway commands such as install, start, stop, restart, and status are listed in the official gateway CLI docs.

8
Access OpenClaw Safely

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-ip

Then open:

http://127.0.0.1:18789

This lets you open the OpenClaw dashboard safely without making the gateway public.

9
Keep OpenClaw Running 24/7

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-gateway

If that does not work, try this:

systemctl --user status openclaw

To view live logs, use:

journalctl --user -u openclaw-gateway -f

If that does not work, try:

journalctl --user -u openclaw -f

This step helps OpenClaw stay online all the time, restart properly, and keep working even when your VPS terminal is closed.

10
Connect Your Messaging Apps

After OpenClaw is running, connect the messaging apps you want to use with your agent.

Common options include:

Common Problems When Running OpenClaw on VPS

ProblemFix
OpenClaw does not installUpdate the server and make sure your VPS has enough RAM. Use 4GB RAM for safer setup.
Dashboard does not openCheck if the gateway is running and make sure your SSH tunnel is active.
Port 18789 issueDo not open port 18789 publicly. Use SSH tunnel or Tailscale.
OpenClaw stops after closing SSHEnable background running with sudo loginctl enable-linger "$USER".
Messaging app does not connectRecheck your Telegram, WhatsApp, Discord, or Slack token and reconnect the app.
API errors appearCheck your AI provider key, billing, and usage limits.
SSH tunnel stops workingReopen the SSH tunnel and keep that terminal running.

FAQs About OpenClaw on VPS

1. How do I set up OpenClaw on a VPS?
To set up OpenClaw on a VPS, first buy a Linux VPS. Then connect to it with SSH, update the server, install OpenClaw, run the setup process, add your AI provider key, and open the dashboard safely.
2. What VPS specs do I need for OpenClaw?
For normal use, choose a VPS with 2 vCPU, 4GB RAM, and 50GB SSD storage. This is enough for basic workflows, messaging apps, and daily use.
3. Is OpenClaw better on a VPS or a local computer?
OpenClaw is better on a VPS if you want it to run all the time. A local computer is fine for testing, but OpenClaw can stop when your laptop sleeps, shuts down, or loses internet.
4. How do I access the OpenClaw dashboard on a VPS?
The safest way is to access the dashboard through an SSH tunnel or a private network like Tailscale. Do not open the OpenClaw gateway directly to the public internet.
5. What port does OpenClaw use?
OpenClaw Gateway commonly uses port 18789. Keep this port private and access it through a secure method like SSH tunnel or Tailscale.
6. Can I use OpenClaw on a VPS without keeping my laptop on?
Yes. OpenClaw runs on the VPS, not your laptop. Once it is set up, your laptop does not need to stay open or connected.

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