Skip to content

Install OpenClaw on Linux: Quick VPS Setup Guide

Setting up services on a Linux server can be a real test of patience. You often find yourself jumping between terminal windows and configuration files, hoping everything stays online after you close your SSH session.

The Gateway is fully supported on Linux. I recommend using Node as your runtime. You should avoid using Bun for the Gateway right now because of some bugs with WhatsApp and Telegram.

Native Linux companion apps are in the works. If you want to help build one, the team welcomes contributions.

  1. Install Node 24 (recommended; Node 22 LTS, currently 22.14+, still works for compatibility)
  2. npm i -g openclaw@latest
  3. openclaw onboard --install-daemon
  4. From your laptop: ssh -N -L 18789:127.0.0.1:18789 <user>@<host>
  5. Open http://127.0.0.1:18789/ and paste your token

Full Linux server guide: Linux Server. Step-by-step VPS example: exe.dev

Use one of these:

openclaw onboard --install-daemon

Or:

openclaw gateway install

Or:

openclaw configure

Select Gateway service when prompted.

Repair/migrate:

openclaw doctor

OpenClaw installs a systemd user service by default. You should use a system service for shared or always-on servers. You can find the full unit example and guidance in the Gateway runbook.

Minimal setup:

Create ~/.config/systemd/user/openclaw-gateway[-<profile>].service:

[Unit]
Description=OpenClaw Gateway (profile: <profile>, v<version>)
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/local/bin/openclaw gateway --port 18789
Restart=always
RestartSec=5
[Install]
WantedBy=default.target

Enable it:

systemctl --user enable --now openclaw-gateway[-<profile>].service

Need help with your setup? Check out the AI Setup Assistant.

OpenClaw

OpenClaw Expert

Still stuck?

If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.