Home Sales Installing OpenClaw (Clawdbot) on your VPS

Installing OpenClaw (Clawdbot) on your VPS

Last updated on Aug 26, 2026

OpenClaw — previously known as Clawdbot (and briefly Moltbot) — is an open-source, self-hosted AI assistant that connects to messaging apps like Telegram, Discord, Slack, WhatsApp, and Signal. Instead of opening a separate chat window, you message your assistant like a teammate, and it can run continuously in the background.

Running it on a VPS instead of a local machine keeps it available 24/7 without depending on your laptop staying online, awake, and connected. This guide walks through installing OpenClaw on a VPS, running the onboarding wizard, and locking it down so it isn't exposed to the public internet.

Prerequisites:

You must have a VPS running Ubuntu or Debian

You must have root or sudo access on the VPS

Your VPS should have at least 2 GB RAM for basic chat use, or 4 GB+ if you plan to use automation/browser-based skills

You must have an API key from a model provider (Anthropic, OpenAI, Google, etc.) — the onboarding wizard will ask for this

You can connect to your VPS via SSH using:

ssh [email protected]

Step 1 – Install Node.js

OpenClaw requires a recent Node.js runtime (Node 22.16+ is supported; Node 24+ is recommended). Check what's currently installed:

node --version

If Node isn't installed or the version is too old, install a current release via NodeSource:

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

Confirm the version again:

node --version

Step 2 – Install OpenClaw

You can install it either with the official one-line installer script or manually via npm.

Option A – One-line installer (recommended for most users)

This detects your OS, checks your Node version, installs OpenClaw, and launches onboarding automatically:

curl -fsSL https://openclaw.ai/install.sh -o install.sh

Since this script runs with your permissions, it's worth reading it before executing:

cat install.sh

Then run it:

bash install.sh

Option B – Manual install via npm

npm install -g openclaw@latest

If you're on npm 12 or npm 11.16+, package lifecycle scripts are blocked by default, so allow them explicitly:

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

If the openclaw command isn't found after install, your npm global bin directory likely isn't on your PATH. Add it to your shell profile:

echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Step 3 – Run onboarding

If you used the installer script, onboarding starts automatically. If you installed manually with npm, start it yourself and install the background service (daemon) at the same time so OpenClaw survives reboots:

openclaw onboard --install-daemon

The wizard will walk you through:

  1. Model provider – choose Anthropic, OpenAI, Google, or another supported provider

  2. Authentication – paste in your API key (some providers support a browser-based token flow instead)


  3. Workspace setup – creates the assistant's working directory and initial configuration

  4. Gateway configuration – sets up the background service that manages sessions and channel connections

Onboarding usually takes 5–15 minutes depending on how many optional steps (channels, skills) you configure now versus later.

Step 4 – Connect a messaging channel

Once onboarding finishes, link a messaging app so you can actually talk to your assistant:

openclaw channels login

Follow the prompts for whichever channel you want (Telegram, Discord, Slack, WhatsApp, etc.) — most require scanning a QR code or pasting a bot token from that platform's developer settings.

Step 5 – Verify it's running

Check the daemon's status and confirm it can reach your model provider:

openclaw status
openclaw health

Send a test message from the CLI to confirm everything is wired up correctly:

openclaw chat --message "hello"

If you connected a messaging channel in Step 4, you can also just message the bot directly from that app.

Securing your OpenClaw instance

By default, OpenClaw's Gateway (the background process that manages sessions and channels) should not be exposed directly to the public internet. Older versions allowed running with no authentication at all, which meant anyone who found the address could control the assistant — this has since been removed, and current versions require you to set one of the following:

auth: token      # require a secret token to connect
auth: password   # require a password to connect

On top of requiring auth, it's best practice to avoid exposing the Gateway's port publicly at all. Instead, access it through:

  • An SSH tunnel from your laptop/phone to the VPS, or

  • Tailscale (or another private overlay network), using tailscale serve so only devices on your private network can reach it

Do not open the Gateway's port on your VPS firewall (UFW) the way you would for a public-facing service like a website — it's meant to be accessed privately, not from the open internet.

Keeping OpenClaw updated

Check for and apply updates regularly, since the project moves fast and security fixes ship often:

openclaw update

If you need to move between the stable and dev release channels:

openclaw update --channel stable
openclaw update --channel dev

Troubleshooting

openclaw: command not found after install

Your npm global bin path likely isn't in your shell's PATH. See the fix in Step 2, Option B.

Onboarding or install fails partway through

Run the built-in diagnostics:

openclaw doctor

And check live logs while retrying the failing step:

openclaw logs --follow

The daemon isn't starting on boot

Confirm it was installed as a service:

openclaw onboard --install-daemon

On most Linux VPS setups this registers a systemd service. Check its status directly:

systemctl status openclaw

Security notes

  • Never run the Gateway with no authentication. Set auth: token or auth: password — this used to be optional and is now required for good reason.

  • Don't expose the Gateway's port on your public firewall. Access it privately via SSH tunnel or Tailscale instead.

  • Only install from the official npm package or GitHub repository. Fake extensions and lookalike packages impersonating this project have been found bundling malware — verify you're installing openclaw from npm or github.com/openclaw/openclaw, not a similarly named third-party package.

  • Keep it updated with openclaw update, since fixes for security issues ship frequently.

  • Review what channels and skills you enable. Since the assistant can read messages, browse the web, or run automation depending on what you configure, treat its permissions the same way you'd treat any service with access to your accounts.