OpenClaw is a self-hosted AI agent framework that runs on any Linux server. Deploying it on Linode gives you a private, always-on agent with full control over your API keys, conversation history, and configuration. If you prefer a managed setup, Ampere.sh gets OpenClaw running in 60 seconds — no server required.
Requirements
Before starting, make sure your Linode meets these specs. An undersized plan is the most common reason installs fail.
| Component | Requirement |
|---|---|
| Linode Plan | Linode 4 GB (2 vCPU / 4 GB RAM) minimum — 8 GB for multi-agent |
| OS Image | Ubuntu 24.04 LTS or Ubuntu 22.04 LTS |
| Node.js | v22.16 or higher — install via NodeSource, not apt |
| SSH Access | SSH key authentication — disable password auth after first login |
| Firewall | UFW — allow SSH (22), deny port 18789 from public access |
| Storage | 25 GB disk minimum — default Linode disk is enough |
Step 1: Create Your Linode
Log in to the Linode Cloud Manager and click Create → Linode:
- Image: Ubuntu 24.04 LTS x64
- Plan: Linode 4 GB for personal use — Linode 8 GB for multi-agent
- Region: Pick the closest one for low latency
- Authentication: SSH Key — add your public key during creation
- Label:
openclaw-agent
Once the Linode boots, SSH in and create a non-root user:
ssh root@YOUR_LINODE_IP
adduser openclaw
usermod -aG sudo openclaw
su - openclawStep 2: Install Node.js
OpenClaw requires Node.js v22.16 or higher. Never use apt install nodejs — it installs an outdated version. Always install from NodeSource:
sudo apt update && sudo apt upgrade -y
# Install Node.js 22 LTS via NodeSource
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs build-essential
# Verify — must show v22.x or higher
node --version
npm --versionOn a 2 GB Linode? Add a swap file before installing to prevent OOM kills during npm install:
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile && sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstabRunning on Windows? Follow the WSL guide to run OpenClaw on Windows Subsystem for Linux instead.
Step 3: Install OpenClaw
Run the official installer — it detects Node and installs the CLI globally:
curl -fsSL https://openclaw.ai/install.sh | bashPrefer to inspect the script first:
curl -fsSL https://openclaw.ai/install.sh -o install.sh
less install.sh
bash install.shIf openclaw is not found after install, fix PATH:
export PATH="$(npm prefix -g)/bin:$PATH"
echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
openclaw --versionOnce installed, explore the best OpenClaw skills or learn how to build a custom skill.
Step 4: Onboarding & Connect Your Channels
Run the onboarding wizard — it configures your AI provider, connects a channel, and installs the systemd daemon:
openclaw onboard --install-daemonThe wizard walks you through selecting your AI provider, entering an API key, choosing a model, and connecting a channel. OpenClaw supports all major channels:
| Channel | Setup Guide |
|---|---|
| Telegram | Connect OpenClaw to Telegram → |
| Connect OpenClaw to WhatsApp → | |
| Discord | Connect OpenClaw to Discord → |
| iMessage | Connect OpenClaw to iMessage → |
| Notion | Connect OpenClaw to Notion → |
Verify your agent is live:
openclaw statusStep 5: Enable systemd & Configure Firewall
Enable linger so the service starts on boot without an active SSH session, then start the gateway:
loginctl enable-linger $USER
systemctl --user enable --now openclaw-gateway
systemctl --user status openclaw-gatewayNow lock down the firewall. Port 18789 must never be publicly accessible. For a full hardening checklist, see the OpenClaw security checklist and the complete security guide.
sudo apt install -y ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw deny 18789
sudo ufw --force enable
sudo ufw status verboseNever expose port 18789 publicly. If you need a web-accessible endpoint, use nginx as a reverse proxy with Certbot HTTPS — never point a public DNS record directly at port 18789.
To update OpenClaw:
npm install -g openclaw@latest
systemctl --user restart openclaw-gatewayTroubleshooting
Most issues come down to four things: Node.js version, PATH, memory, and systemd linger.
openclaw: command not found
npm installed OpenClaw globally but the global bin directory is not in your PATH. Fix it permanently:
export PATH="$(npm prefix -g)/bin:$PATH"
echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
openclaw --versionnpm install killed — exit code 137 (OOM)
You ran out of memory during install. This happens on the 1 GB or 2 GB Linode. Add swap before retrying:
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile && sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstabnode --version shows v12 or v18 (too old)
You installed Node.js from apt instead of NodeSource. Remove and reinstall:
sudo apt remove nodejs
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
node --versionGateway does not start on reboot
Linger is not enabled — user services only start when you are logged in without it:
loginctl enable-linger $USER
systemctl --user daemon-reload
systemctl --user enable --now openclaw-gateway
journalctl --user -u openclaw-gateway -n 30systemd service fails — ExecStart path not found
The unit file references the wrong binary path. Find the correct path and update:
which openclaw
# Update ExecStart in the unit file:
nano ~/.config/systemd/user/openclaw-gateway.service
systemctl --user daemon-reload && systemctl --user restart openclaw-gatewayPort 18789 refused or gateway unreachable
The gateway binds to 127.0.0.1 by default — it is not reachable publicly on purpose. Access it via SSH tunnel:
# On your local machine:
ssh -L 18789:localhost:18789 openclaw@YOUR_LINODE_IP
# Then open http://localhost:18789 in your browserLinode vs Ampere.sh
Running OpenClaw on Linode gives you full control but requires server management. Ampere.sh is the managed alternative — same OpenClaw, zero infrastructure. Also worth reading: AI agent hosting options compared.
| Feature | Linode (Self-Hosted) | Ampere.sh (Managed) |
|---|---|---|
| Setup Time | 1–2 hours | 60 seconds |
| Technical Skill | Linux, SSH, systemd | None required |
| Server Management | You manage everything | Fully managed |
| Uptime | Depends on VPS health | 99.9% SLA |
| Maintenance | Manual updates | Automatic |
| Data Privacy | Your server, full control | Managed cloud |
| Cost | Server cost + your time | Free credits to start |
Frequently Asked Questions
Which Linode plan should I use for OpenClaw?
Does OpenClaw work on Ubuntu 22.04 LTS on Linode?
Will OpenClaw keep running after I close my SSH session?
Can I run OpenClaw on a Linode Nanode (1 GB)?
Do I need a domain for OpenClaw on Linode?
How do I update OpenClaw on Linode?
Can I run multiple agents on one Linode?
Is the installer script safe to run?
Skip the Server Setup?
Deploy OpenClaw in 60 seconds on Ampere.sh — no VPS, no systemd, no firewall config. Free credits to get started.
Deploy on Ampere.sh →