How to Set Up an OpenClaw Agent on a VPS (Step-by-Step)

작성자

카테고리:

← 피드로
DEV Community · hakiimi · 2026-08-10 개발(SW)

hakiimi

Running an OpenClaw agent on a VPS unlocks 24/7 automation without keeping your laptop on. This is the setup I use for my content agents. Here is the exact path.

Why a VPS

A VPS gives your agents a permanent home: always-on, stable IP, no sleep mode, and room for multiple agents and scheduled jobs. Any basic Linux VPS (2GB RAM) is enough to start.

1. Spin up the server

  • Choose a Linux distro (Ubuntu 22.04 LTS is the easiest start).
  • Connect over SSH.
  • Update everything: sudo apt update && sudo apt upgrade -y.

2. Install Node.js (required for OpenClaw)

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
node --version

Enter fullscreen mode Exit fullscreen mode

3. Install OpenClaw

npm i -g openclaw
openclaw --version

Enter fullscreen mode Exit fullscreen mode

Configure the gateway token and keep it bound to loopback or behind a reverse proxy.

4. Run as a service (survives reboots)

Create /etc/systemd/system/openclaw.service, enable and start it, and your gateway comes back automatically after any reboot.

5. Connect from anywhere

With the agent headless on the server, connect a chat channel (Telegram, Slack, Discord) and schedule jobs on the server clock.

Security checklist

  • Keep the gateway bound to 127.0.0.1 or behind HTTPS reverse proxy.
  • Use a strong auth token.
  • Never expose raw ports publicly.

Wrap up

That is the whole flow: server, Node, OpenClaw, systemd, remote access. Once it is running, your agent works around the clock – the entire point of a VPS.

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다