OpenClaw is an open-source AI assistant that runs on your own machine: a Gateway process connects chat apps (for example Telegram, Discord, WhatsApp) to AI agents. Because it can use tools and send messages, the hard part on a VPS is not installing it but managing access correctly.
The guide is based on the official documentation (checked on 4 December 2026). OpenClaw changes quickly, so compare version numbers and commands with docs.openclaw.ai before installing. Montavio does not offer an OpenClaw service; this describes a self-operated installation on your own VPS.
What to know first
- Node.js: at least release 24.16 or 26.1, with 26 recommended. The documentation asks for 24.22.1+ and 26.12.1+, which carry security fixes; older versions produce a warning.
- Resources: the documentation gives no minimum RAM figure. A build from source needs a lot of memory (a 4 GiB machine is too little for it, per the docs), so on a smaller VPS use the default npm install, which fetches prebuilt code.
- You will need an API key from an AI provider, and it is wise to cap the spend at the provider.
- Use a dedicated VPS and a separate non-admin user; do not run it on the machine that hosts your production business application.
Open image full size Installation and service
The official installer is one command that also installs Node if needed. If you would rather not run an unknown script directly, read the downloaded content first, or use the npm route.
- Sign in to the VPS as your separate user and check Node: node --version
- Install OpenClaw with the official installer, or with npm, then run onboarding.
- Onboarding asks whether to keep it running in the background; if you say yes, on Linux a systemd user unit starts the Gateway so it survives closing the terminal.
- Check the state: openclaw gateway status, then openclaw doctor.
curl -fsSL https://openclaw.ai/install.sh | bash
npm install -g openclaw@latest --allow-scripts=openclaw
openclaw onboard --install-daemon
openclaw gateway status
openclaw doctorDo not expose the Gateway to the internet
By the official default the Gateway listens on port 18789 on the loopback address (127.0.0.1), and authentication is required by default. The VPS page advises keeping it on loopback and reaching it through an SSH tunnel or Tailscale Serve. According to the documentation only SSH and any reverse proxy port should be open from outside.
- After the SSH tunnel you reach the interface at http://127.0.0.1:18789/ on your own computer.
- Set a token or password of at least 24 characters; the security audit flags shorter ones. The openssl command above produces a long random value.
- If you run it in Docker, a published port can bypass the host firewall; bind it to 127.0.0.1 and read our Docker guide.
ssh -N -L 18789:127.0.0.1:18789 user@YOUR_VPS_IP
openssl rand -hex 32The built-in security audit
OpenClaw ships its own audit command. Run it after the first start and after every configuration change, before you enable another channel or tool.
| Risk | What it means | What to do |
|---|---|---|
| Open messages (DM, group) | Strangers can instruct the agent. | An allowlist, and only channels you know. |
| Broad tool permissions with open rooms | An injected instruction can trigger a shell, file or network action. | Narrow the tools and require approval for dangerous steps. |
| Network exposure | A public bind or a weak, short token. | Loopback, SSH tunnel or Tailscale Serve, a long token. |
openclaw security audit
openclaw security audit --deepUpdating and maintenance
- Before updating, look at the status and the dry run: openclaw update status, openclaw update --dry-run.
- Update: openclaw update. After a successful update the Gateway restarts and its state is verified.
- Run openclaw doctor and openclaw security audit again.
- Regularly update the VPS operating system and Node as well.



