English
€EUR
  • openclaw
  • vps
  • ai agent
  • self-hosting
  • linux
  • ubuntu

OpenClaw on a VPS: Full Setup Guide, No Mac mini Needed

Install OpenClaw on a Linux VPS in under an hour: requirements, commands, hardening and a comparison with buying a Mac mini.

  • 8 min read
  • Sarah Belkacem
OpenClaw on a VPS: Full Setup Guide, No Mac mini Needed

A Linux VPS is enough to run OpenClaw around the clock. You don't need to buy a Mac mini: the agent calls language models through an API rather than computing anything itself, and a server with 2 vCPUs and 4 GB of RAM handles it comfortably.

This guide covers the reasoning (why the VPS wins), then the step-by-step installation, hardening and sizing. If you want to get straight to it, the VPS plans for OpenClaw are set up for this use case.

Why not buy a $600 Mac mini

The reflex is common. You see OpenClaw demos running on a Mac mini sitting on a desk, and you assume you need the same. That confuses what works for a demo with what makes sense in production. A personal agent has to answer at 3 a.m., while you are on holiday, even if your home router reboots.

A Mac mini is a purchase of several hundred dollars (around $600 for the entry model), paid up front, before you have checked that the tool is actually useful to you. And the bill doesn't stop there: electricity, a home internet connection, a dynamic IP, outages, macOS updates that restart the machine, and nobody to bring it back if it freezes.

For what OpenClaw does, that power is wasted. The models (Claude, GPT and others) run at their provider. Your machine orchestrates: it keeps the gateway open to WhatsApp, Telegram or Discord, runs tools, and stores memory and logs. That is server work, not desktop work.

Mac mini or VPS: the comparison

CriterionMac mini at homeLinux VPS
Upfront investmentHardware purchaseNo hardware, monthly subscription
Network availabilityDepends on your home routerData center connection, fixed IP
IP addressOften dynamicPublic and stable
Reboot / failureYou intervene on siteConsole and remote access
ScalingReplace the machineMove up a tier in a few clicks
Isolation from your personal dataSame network as your devicesSeparate environment
Trial without heavy commitmentNoYes, stop whenever you want

That last point carries the most weight. A VPS can be tested, destroyed and recreated. A Mac mini, once bought, stays on your desk.

What you need to host OpenClaw

OpenClaw is a Node.js application. The official documentation asks for a recent Node version (22 or later; check the installation page, as it changes). No GPU is needed as long as you use models through an API.

For sizing, here is a realistic baseline:

  • 1 to 2 vCPUs and 2 GB of RAM: enough for a personal agent with one or two messaging channels.
  • 2 to 4 vCPUs and 4 GB of RAM: comfortable if the agent drives a headless browser, scheduled tasks or several channels.
  • 40 GB or more of SSD storage: logs, memory and sessions grow over time.
  • Ubuntu 24.04 LTS or Debian 12: the best-documented distributions for this kind of deployment.

If you plan to run local models (Ollama, for example), the maths changes: you need far more RAM, possibly a GPU. For everyday OpenClaw use with an API key, that isn't necessary. A standard Linux VPS does the job.

Installing OpenClaw on a VPS, step by step

We start from a fresh Ubuntu 24.04 VPS with root access over SSH.

1. Prepare the system and a dedicated user

Don't run an agent that can execute commands as root. Create a separate user.

Bash
apt update && apt upgrade -y adduser claw usermod -aG sudo claw

Then copy your SSH key to that account and test the connection before continuing:

Bash
rsync --archive --chown=claw:claw ~/.ssh /home/claw

2. Enable a minimal firewall

Bash
ufw allow OpenSSH ufw enable ufw status

Note what we do not open: the OpenClaw gateway port. We come back to it in the security section.

3. Install Node.js

Switch to the claw account (su - claw), then install Node 22 from NodeSource:

Bash
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - sudo apt install -y nodejs node -v

4. Install OpenClaw and run the wizard

The official install script takes care of the rest:

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

The onboarding wizard asks for your model provider (API key) and the channels to connect, and installs a service that restarts the agent automatically. Read the output: if an option's syntax has changed, the official documentation is the reference.

5. Keep the service running after you log out

If the daemon is installed as a systemd user service, it must survive the end of your SSH session:

Bash
sudo loginctl enable-linger claw systemctl --user status openclaw-gateway

The exact unit name may vary between versions. Check with openclaw gateway status and openclaw doctor, which flags common configuration problems.

Securing the agent: the part that really matters

An agent that reads your messages and performs actions is a prime target. The rule is simple: the control interface must never be exposed in clear text on the internet.

By default, the gateway listens locally (port 18789 in recent versions). Leave it that way and reach it through an SSH tunnel from your workstation:

Bash
ssh -N -L 18789:127.0.0.1:18789 claw@IP_DU_VPS

You then open http://127.0.0.1:18789 in your local browser. Nothing is published, and there is nothing to protect on the firewall side.

A few additional habits:

  • Disable SSH password authentication (PasswordAuthentication no in /etc/ssh/sshd_config) and keep keys only.
  • Install fail2ban to slow down automated login attempts.
  • Limit the agent's privileges: passwordless sudo for an agent is rarely a good idea.
  • Define an allowlist of senders on your messaging channels, so nobody else can talk to it.
  • Watch spending at the API provider: set a monthly limit on your key.

If your agent is exposed to public traffic (webhooks, for example), extra network protection makes sense: see the VPS with DDoS protection.

Updates, backups and monitoring

An agent that is installed and forgotten quickly becomes a problem. Plan for three things from day one.

Updates. Enable unattended-upgrades for system patches, and update OpenClaw by hand from time to time (npm update -g openclaw, or rerun the install script), reading the release notes: the project moves fast.

Backups. The agent's configuration and memory live in the ~/.openclaw directory. A daily archive copied off the server is enough:

Bash
tar czf /tmp/openclaw-$(date +%F).tar.gz -C ~ .openclaw

Also take a snapshot of your VPS before any major update. On a physical machine at home, that safety net simply doesn't exist.

Monitoring. Follow the logs with journalctl --user -u openclaw-gateway -f and set up a simple alert (an external ping, or a Telegram message if the agent stops).

Choosing your OpenClaw VPS

Three criteria matter: RAM (don't go below 2 GB), NVMe or SSD disk space, and location. If your channels and users are in Europe, a server in France or Germany keeps your data within the European framework, which simplifies GDPR questions when the agent handles personal or customer messages.

At Infrawire, the OpenClaw VPS page gathers the suitable plans: you pick the size, you get root access, and you follow the guide above. If the agent becomes central to your work, you move up a tier without reinstalling. And if the tool turns out not to suit you, you shut the server down, with no box left to resell.

To go further with Linux server administration, the tutorials section covers SSH, firewalls and backups.

FAQ

Yes. OpenClaw is a Node.js application that runs on Linux, macOS and Windows (via WSL2). Some features tied to the Apple ecosystem, such as iMessage, require a Mac. For WhatsApp, Telegram, Discord and most everyday uses, a Linux VPS is fine.

Plan for 2 GB of RAM and 1 to 2 vCPUs for simple personal use. Move to 4 GB if the agent drives a browser or manages several channels. The bottleneck is rarely the processor, because the models run at the API provider.

No, as long as you use models hosted by a provider through an API key. A GPU only becomes useful if you run large models yourself, locally, which is a different project with different hardware needs.

It is, provided you configure it properly: a dedicated user, a gateway listening locally, access through an SSH tunnel, key-based authentication, allowed senders and a spending limit on the API key. The classic mistake is opening the control port to the whole internet.

Yes. Back up the ~/.openclaw folder, install OpenClaw on the new machine and restore the archive. On a VPS, you can often also change plan directly without starting from scratch.

Sarah Belkacem

Author

Sarah Belkacem

Marketing Manager, Infrawire

Related articles

Stay up to date with the latest offers, discounts and special promotions.

View promotions

We use cookies

We use analytics cookies to improve your experience on our site. No data is sold to third parties. Learn more in our privacy policy.