我们能为您提供什么帮助?

搜索我们的指南和教程,或浏览下方分类。

How to Install OpenClaw on a Hostcarts VPS (Step‑by‑Step)

361 次浏览 Markdown

Here’s the clean, correct, Hostcarts‑friendly way to install OpenClaw on your VPS.
I’ll give you the exact commands, the required environment, and the recommended production setup — all aligned with the latest OpenClaw installation guides.


✅ How to Install OpenClaw on a Hostcarts VPS (Step‑by‑Step)

(OpenClaw requires Node.js 22+, Git, and a Linux VPS — Hostcarts VPS is perfect.)


Update your VPS

sudo apt update && sudo apt upgrade -y

Install Node.js 22 (required by OpenClaw)

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

Verify:

node -v

Should show v22.x.x


Install Git

sudo apt install -y git

Install OpenClaw (official one‑command installer)

According to the latest OpenClaw VPS installation guides vpswala.org:

curl -fsSL https://raw.githubusercontent.com/openclawhq/openclaw/main/install.sh | bash

This script will:

  • Install OpenClaw Gateway
  • Install dependencies
  • Create the system directory /opt/openclaw
  • Set up the dashboard on port 18789

Start OpenClaw

cd /opt/openclaw
npm install
npm run start

You can now access the dashboard at:

http://YOUR_SERVER_IP:18789

This ensures OpenClaw stays online 24/7 — essential for WhatsApp/Telegram bots.

Create service file:

sudo nano /etc/systemd/system/openclaw.service

Paste:

[Unit]
Description=OpenClaw Gateway
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/opt/openclaw
ExecStart=/usr/bin/npm run start
Restart=always

[Install]
WantedBy=multi-user.target

Enable + start:

sudo systemctl daemon-reload
sudo systemctl enable openclaw
sudo systemctl start openclaw

Check status:

systemctl status openclaw

Secure your VPS (UFW Firewall)

From the official guide vpswala.org:

sudo ufw allow 22
sudo ufw allow 18789
sudo ufw enable

Connect WhatsApp or Telegram

OpenClaw dashboard → Channels → choose WhatsApp or Telegram.
The official guide confirms both are supported vpswala.org.


Connect your AI model

OpenClaw supports:

  • OpenAI
  • Claude
  • Gemini
  • Local models (Ollama)

Dashboard → Models → Add API key.


Keep OpenClaw Updated

cd /opt/openclaw
git pull
npm install
systemctl restart openclaw

Your OpenClaw is now fully installed on Hostcarts VPS

 

这对您有帮助吗?

感谢您的反馈!

仍需帮助?

如果上述内容未能解答您的问题,我们的支持团队全天候为您服务。