Black Friday: Save 10% for life on all of our VPS plans, now through Cyber Monday

10% off on selected plans for as long as you keep the service · new orders · up to 10 uses per customer · ends Dec 1, 2026, 12:00 AM EST.

See plans
Guideschevron_rightServers

Servers · 8 min read · Updated

How to Run OpenClaw on a VPS

To run OpenClaw on a VPS, create a non-root user on Ubuntu, run the official installer (curl -fsSL https://openclaw.ai/install.sh | bash) as that user and follow its onboarding, then install the gateway as a service with openclaw gateway install and turn on lingering so it keeps running after you log out. The gateway listens on port 18789 on the server only; reach its dashboard through an SSH tunnel, never an open port, and approve each person who messages it.

1. A Server of Its Own

OpenClaw's README is direct about the trust model: messages that reach the assistant are untrusted input, and unless you configure a sandbox, its tools run on the host. Its security documentation treats one gateway as one trust boundary, not a wall between strangers. So give it a VPS that does nothing else, and do not put your other projects' keys or data on it.

On a fresh Ubuntu 24.04 server, secure it first, then create the user OpenClaw will run as. The docs say never to run the gateway as root:

sudo adduser claw
sudo loginctl enable-linger claw     # keep its services running after logout
sudo -iu claw

2. Install and Onboard

As claw:

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

The installer adds Node.js 24 if it is missing (OpenClaw needs Node 24.16 or 26.1 and newer) and starts the onboarding wizard, which asks for a model provider and its API key and which chat apps to connect. If you install with npm instead, start the wizard yourself:

npm install -g openclaw@latest --allow-scripts=openclaw
openclaw onboard --install-daemon

Then check the install:

openclaw --version
openclaw doctor

3. Run the Gateway as a Service

openclaw gateway install
systemctl --user enable --now openclaw-gateway.service
openclaw gateway status
openclaw logs --follow

If systemctl --user says it cannot connect to the bus, set export XDG_RUNTIME_DIR=/run/user/$(id -u) in that shell first; that happens when you switch user with sudo on a headless server. The service restarts by itself if it stops, and survives reboots because of the lingering you turned on in step 1.

4. Open the Dashboard Over SSH

On a normal install the gateway binds to the server's loopback address, port 18789, and requires a token or password. That one port serves the dashboard and its API. From your own computer:

ssh -N -L 18789:127.0.0.1:18789 [email protected]
# then open http://127.0.0.1:18789 in your browser

The tunnel does not skip the gateway's own sign-in: you still need its token. OpenClaw's docs prefer Tailscale or a VPN for regular access; on our servers, WireGuard does the same. Do not open 18789 in the firewall, and if you run OpenClaw in a container, note that container installs bind to every address by default.

5. Decide Who Can Talk to It

  • Pairing: by default, someone new who messages the assistant gets a pairing code instead of an answer. Approve only people you know, with openclaw pairing approve <channel> <code>.
  • Groups: group chats are allowlisted and usually need a mention; keep it that way.
  • Audit: run openclaw security audit after any change to channels or tools, and openclaw doctor --fix when something looks wrong.
  • Separate people, separate gateways: for users who should not see each other's data, run a gateway per person, ideally on separate servers.

Updates and Backups

Update with the method you installed with (for npm, the same npm install -g openclaw@latest command), then openclaw gateway restart. Its state, memory and credentials live in the claw user's home directory; back it up as carefully as a password manager, with Borg to a storage box.

Weighing up other agents? Hermes Agent runs the same way and can import an OpenClaw setup.

Common Questions

  • What is OpenClaw?

    A free, MIT-licensed AI assistant that you run yourself. One gateway process connects a language model to the chat apps you already use, such as WhatsApp, Telegram, Discord, Slack, Signal or iMessage, and keeps its memory and credentials on your own machine. It was previously called Clawdbot and Moltbot.

  • Why run OpenClaw on a VPS instead of my laptop?

    The assistant only answers while the gateway is running. On a VPS it is online all the time, and it is also a separate machine: if the agent runs a command it should not, it does so on a server that holds nothing but the assistant, not on the computer with your files and passwords.

  • How much memory does OpenClaw need?

    The normal install uses prebuilt packages and runs on a small server, since the language model itself usually runs at a provider. Its documentation warns that building from source needs a 4,352 MiB Node heap, more than a 4 GB machine can give, so use the installer rather than a source build on small plans.

  • Can OpenClaw use a local model instead of a paid API?

    Its README describes hosted and local model providers. A local model needs far more memory or a GPU than the assistant itself; see self-hosting Open WebUI with Ollama for running models on your own GPU server.

Plans and prices

VPS Plans

KVM servers with NVMe storage and full root access, online around the clock.

See all plans
  • Bronze

    3 vCPU · 6 GB RAM · 75 GB NVMe

    2 TB transfer

    $37.50/mo

    Configure inAshburnDallas
  • Silver

    4 vCPU · 8 GB RAM · 100 GB NVMe

    4 TB transfer

    $46.50/mo

    Configure inAshburnDallas
  • Gold

    6 vCPU · 12 GB RAM · 150 GB NVMe

    6 TB transfer

    $60.00/mo

    Configure inAshburnDallas
  • Diamond

    8 vCPU · 16 GB RAM · 200 GB NVMe

    8 TB transfer

    $73.50/mo

    Configure inAshburnDallas

Network port: 10 Gbps in Ashburn, VA, 50 Gbps in Dallas, TX. Pick the location when you configure.

Keep Reading

All guides