This guide walks you through provisioning a Linux virtual machine on Atlas infrastructure and installing the OpenClaw agent.
## Prerequisites
- A **Atlas** account
- A local terminal with `ssh` installed
- An SSH public key
---
## Part 1: Provisioning the VM
### 1. Create a VM Instance
Follow the general guide for **[Creating your first cloud service](https://docs.runatlas.is/Atlas+Docs/Tutorials/Creating+your+first+cloud+service)** to set up a new instance.
**Important settings for OpenClaw:**
- **Template**: Choose **Ubuntu 24.04**.
- **SSH Key**: Ensure you attach your SSH key during creation. If you haven't set one up, follow the **[SSH Key Pairs](https://docs.runatlas.is/Atlas+Docs/Compute/SSH+Key+Pairs)** guide first.
- **Resources**: A plan with at least **2GB RAM** is recommended for stable agent performance.
### 2. Connect via SSH
Once the instance is running, locate its **Public IP Address** in the [Atlas console](https://sky.runatlas.is).
Connect from your terminal:
```bash
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](https://docs.runatlas.is/Atlas+Docs/Tutorials/Create+a+new+user) to manage access.)*
---
## Part 2: Installing OpenClaw
### 1. Install Dependencies
Update the system and install basic tools:
```bash
sudo apt update && sudo apt full-upgrade -y
sudo apt install -y curl git build-essential python3
```
### 2. Install Node.js
OpenClaw requires Node.js (v22+). We recommend **[Volta](https://volta.sh)** for hassle-free version management.
```bash
# Install Volta
curl https://get.volta.sh | bash
# Reload your shell configuration (or close/reopen terminal)
source ~/.bashrc
# Install Node.js
volta install node
```
### 3. Install OpenClaw
You can install OpenClaw using the official install script or via npm.
**Option A: Install Script (Recommended)**
This script automatically detects your OS and installs the latest version.
```bash
curl -fsSL https://openclaw.ai/install.sh | bash
```
**Option B: via npm**
If you prefer to use npm directly:
```bash
npm install -g openclaw@latest
```
### 4. Initialize the Agent
Run the onboarding wizard to create your config and start the background service:
**Interactive Mode (Recommended for first-time users):**
```bash
openclaw onboard --install-daemon
```
Follow the prompts to select your AI provider (e.g., OpenAI, Anthropic), enter your API key, and configure basic settings.
**Non-Interactive Mode (For scripts/automation):**
You can bypass prompts by passing flags. Replace the API key variable with your actual key or environment variable.
```bash
openclaw onboard --non-interactive \
--mode local \
--install-daemon \
--auth-choice openai-api-key \
--openai-api-key "$OPENAI_API_KEY"
```
*(See `openclaw onboard --help` for other providers like Anthropic or Gemini.)*
### 5. Verify and Use
Check that the gateway service is running:
```bash
openclaw gateway status
```
**How to Interact:**
- **CLI:** Run commands directly on the VM (e.g., `openclaw message send ...`).
- **Dashboard:** To access the web UI securely without exposing ports, use an SSH tunnel from your local machine:
```bash
ssh -L 18789:localhost:18789 root@<YOUR_VM_IP>
```
Then open `http://localhost:18789` in your local browser.
---
## Related Atlas Resources
- **[Creating your first cloud service](https://docs.runatlas.is/Atlas+Docs/Tutorials/Creating+your+first+cloud+service)** – Standard guide for provisioning VMs.
- **[SSH Key Pairs](https://docs.runatlas.is/Atlas+Docs/Compute/SSH+Key+Pairs)** – Creating and managing SSH keys.
- **[Website hosting on a VM](https://docs.runatlas.is/Atlas+Docs/Tutorials/Website+hosting+on+a+VM)** – Parallel concepts for running services on instances.