OpenClaw is an agent you run yourself, which makes a small cloud VM a natural home for it. This tutorial stands one up on Atlas, then installs and onboards the agent over SSH. A couple of the install steps lean on remote scripts, and those deserve a second look before you run them.

Prerequisites

You’ll need an Atlas account, a local terminal with ssh, and an SSH public key to attach to the VM.


Part 1: Provisioning the VM

1. Create a VM Instance

The mechanics of creating an instance are in Creating your first cloud service; this section just calls out what matters for OpenClaw. Use the Ubuntu 24.04 template, and attach your SSH key while you create the VM (if you don’t have one yet, the SSH Key Pairs guide sorts that out first). For size, Atlas.a4 (1 vCPU / 4 GiB) runs the agent comfortably, and Atlas.a5 (2 vCPU / 8 GiB) gives you room if you push it harder.

2. Connect via SSH

Find the instance’s Public IP Address in the Atlas console once it’s running, then connect from your terminal:

ssh root@<YOUR_VM_IP>
# If 'root' fails, try 'ubuntu' (for Ubuntu) or the default user for your template.

(If you are setting this up for a team member, check out Create a new user to manage access.)


Part 2: Installing OpenClaw

1. Install Dependencies

Bring the system up to date and pull in the basics OpenClaw and its toolchain expect, curl, git, a compiler, and Python:

sudo apt update && sudo apt full-upgrade -y
sudo apt install -y curl git build-essential python3

2. Install Node.js

OpenClaw needs Node.js v22 or newer. Volta keeps Node versions tidy and is the easiest way to get a recent one.

A word on the install command: piping a remote script straight into bash runs whatever the server sends as your user, with nothing checked. Download the installer, give it a read, and only then run it:

# Download the installer to a file and review it before running
curl -fsSL https://get.volta.sh -o volta-install.sh
less volta-install.sh
 
# Run the reviewed installer
bash volta-install.sh
 
# Reload your shell configuration (or close/reopen terminal)
source ~/.bashrc
 
# Install Node.js
volta install node

3. Install OpenClaw

There are two ways in. npm is the one to prefer, because pinning a version gives you a release you chose rather than whatever happens to be current, and it skips the unverified-script problem entirely. Swap <version> for the release you want:

npm install -g openclaw@<version>

The official install script is the alternative. It figures out your OS and grabs the latest build, but it’s the same pipe-to-bash pattern as Volta, with no version pin either, so apply the same caution: fetch it, read it, run it.

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

4. Initialize the Agent

Onboarding writes your config and starts the background service. For a first run, the interactive wizard is the gentle path; it walks you through picking an AI provider (OpenAI, Anthropic, and so on), pasting your API key, and the rest of the basics:

openclaw onboard --install-daemon

If you’re scripting the setup instead, you can answer everything with flags. The one thing to be careful about is the API key. Don’t put it on the command line, since anything passed as a flag shows up in ps for other users and lands in your shell history. Hand it over through an environment variable that OpenClaw reads, and set that variable in a way history won’t keep.

A leading space on the export does the trick in most shells, as long as HISTCONTROL includes ignorespace:

 export OPENAI_API_KEY='sk-REPLACE_WITH_YOUR_KEY'
openclaw onboard --non-interactive \
  --mode local \
  --install-daemon \
  --auth-choice openai-api-key

OpenClaw picks OPENAI_API_KEY up from the environment. Clear it with unset OPENAI_API_KEY once onboarding finishes. And if some step ever forces the key onto the command line anyway, treat it as leaked and rotate it afterward, since by then it has passed through ps and your history.

(See openclaw onboard --help for other providers like Anthropic or Gemini.)

5. Verify and Use

Confirm the gateway service came up:

openclaw gateway status

From here there are two ways to drive the agent. The quick one is the CLI: while you’re SSHed into the VM, commands like openclaw message send ... talk to it directly, which is handy for scripting or a fast check.

The other is the web dashboard, and this is where people are tempted to open a public port. Don’t. The dashboard listens on a local port, and the clean way to reach it is an SSH tunnel that forwards that port to your own machine, no firewall change, nothing exposed to the internet:

ssh -L 18789:localhost:18789 root@<YOUR_VM_IP>

With the tunnel up, http://localhost:18789 in your local browser lands on the dashboard as if it were running next to you. Close the SSH session and the access closes with it, which is exactly the property you want.