Installation Guide

How to Run OpenClaw with Linode

Deploy OpenClaw on a Linode VPS and run AI agent with full privacy and control.

12 min read
Mar 20, 2026
Ampere Team

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.

ComponentRequirement
Linode PlanLinode 4 GB (2 vCPU / 4 GB RAM) minimum — 8 GB for multi-agent
OS ImageUbuntu 24.04 LTS or Ubuntu 22.04 LTS
Node.jsv22.16 or higher — install via NodeSource, not apt
SSH AccessSSH key authentication — disable password auth after first login
FirewallUFW — allow SSH (22), deny port 18789 from public access
Storage25 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 - openclaw

Step 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 --version

On 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/fstab

Running 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 | bash

Prefer to inspect the script first:

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

If 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 --version

Once 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-daemon

The wizard walks you through selecting your AI provider, entering an API key, choosing a model, and connecting a channel. OpenClaw supports all major channels:

ChannelSetup Guide
TelegramConnect OpenClaw to Telegram →
WhatsAppConnect OpenClaw to WhatsApp →
DiscordConnect OpenClaw to Discord →
iMessageConnect OpenClaw to iMessage →
NotionConnect OpenClaw to Notion →

Verify your agent is live:

openclaw status

Step 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-gateway

Now 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 verbose

Never 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-gateway

Troubleshooting

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 --version

npm 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/fstab

node --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 --version

Gateway 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 30

systemd 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-gateway

Port 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 browser

Linode 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.

FeatureLinode (Self-Hosted)Ampere.sh (Managed)
Setup Time1–2 hours60 seconds
Technical SkillLinux, SSH, systemdNone required
Server ManagementYou manage everythingFully managed
UptimeDepends on VPS health99.9% SLA
MaintenanceManual updatesAutomatic
Data PrivacyYour server, full controlManaged cloud
CostServer cost + your timeFree credits to start

Frequently Asked Questions

Which Linode plan should I use for OpenClaw?
The Linode 4 GB (2 vCPU / 4 GB RAM) is the recommended starting point for personal use. The 2 GB plan can work with swap but leaves little headroom. Use the 8 GB plan for multiple agents or heavier models.
Does OpenClaw work on Ubuntu 22.04 LTS on Linode?
Yes. Both Ubuntu 22.04 LTS and Ubuntu 24.04 LTS are fully supported. The commands in this guide apply to both.
Will OpenClaw keep running after I close my SSH session?
Yes — once you enable linger and the systemd service in Step 5, OpenClaw runs as a background daemon. It starts on boot and restarts on crash without an active SSH session.
Can I run OpenClaw on a Linode Nanode (1 GB)?
Not reliably. The npm install process requires more than 1 GB RAM and will be killed by the OOM killer. Add a 2 GB swap file to get through the install, but upgrade to the 4 GB plan for stable use.
Do I need a domain for OpenClaw on Linode?
No. OpenClaw connects to messaging platforms outbound — no inbound port exposure needed. A domain is only required if you want a custom HTTPS nginx endpoint for the gateway UI.
How do I update OpenClaw on Linode?
Run npm install -g openclaw@latest, then restart: systemctl --user restart openclaw-gateway. Keep system packages updated too with sudo apt update && sudo apt upgrade -y.
Can I run multiple agents on one Linode?
Yes, on a Linode 8 GB or higher. Each agent is a separate Node.js process with its own systemd unit file and port assignment.
Is the installer script safe to run?
Yes. To review it first: curl -fsSL https://openclaw.ai/install.sh -o install.sh, inspect with less install.sh, then bash install.sh. Alternatively: npm install -g openclaw@latest.

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 →