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.
Beginner quick path (VPS)
Section titled “Beginner quick path (VPS)”- Install Node 24 (recommended; Node 22 LTS, currently
22.14+, still works for compatibility) npm i -g openclaw@latestopenclaw onboard --install-daemon- From your laptop:
ssh -N -L 18789:127.0.0.1:18789 <user>@<host> - Open
http://127.0.0.1:18789/and paste your token
Full Linux server guide: Linux Server. Step-by-step VPS example: exe.dev
Install
Section titled “Install”- Getting Started
- Install & updates
- Optional flows: Bun (experimental), Nix, Docker
Gateway
Section titled “Gateway”Gateway service install (CLI)
Section titled “Gateway service install (CLI)”Use one of these:
openclaw onboard --install-daemonOr:
openclaw gateway installOr:
openclaw configureSelect Gateway service when prompted.
Repair/migrate:
openclaw doctorSystem control (systemd user unit)
Section titled “System control (systemd user unit)”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.targetWants=network-online.target
[Service]ExecStart=/usr/local/bin/openclaw gateway --port 18789Restart=alwaysRestartSec=5
[Install]WantedBy=default.targetEnable it:
systemctl --user enable --now openclaw-gateway[-<profile>].serviceNeed help with your setup? Check out the AI Setup Assistant.
Next steps
Section titled “Next steps”OpenClaw Expert
Still stuck?
If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.