Deploy openclaw.ai on Google Cloud

Intermediate ⏱ 30 minutes 📅 Updated Aug 2026

Deploy on Google Compute Engine with a private Gateway and SSH-tunneled Control UI.

🆓

Check Current Trial Terms

Google Cloud credits and free-tier limits can change by account and region. Confirm current eligibility and expiration in Cloud Billing.

Special Offer

Check current Google Cloud offers

Review current trial credits, free-tier limits, and Compute Engine pricing.

Get Started →

📋 Prerequisites

1

Create a Compute Engine VM Instance

Open the Compute Engine Console and create a new VM:

  1. Click Create Instance
  2. Name your instance (e.g., openclaw-vm)
  3. Choose a Region and Zone close to you (e.g., us-central1-a)
  4. Under Machine configuration, select E2 → e2-small (2 GB RAM) or a current equivalent
  5. Under Boot disk, click Change → select Ubuntu 24.04 LTS or a newer supported LTS release, with 20 GB or more
  6. Under Firewall, leave HTTP and HTTPS unchecked; the Gateway will remain private
  7. Click Create
â„šī¸

CLI Alternative

You can also create the VM using the gcloud CLI if you prefer the command line.

bash
# Alternative: Create via gcloud CLI
gcloud compute instances create openclaw-vm \
  --zone=us-central1-a \
  --machine-type=e2-small \
  --image-family=ubuntu-2204-lts \
  --image-project=ubuntu-os-cloud \
  --boot-disk-size=20GB \
  --tags=openclaw-server
2

Connect via SSH

The easiest way to connect is through the GCP Console:

  1. Go to Compute Engine → VM instances
  2. Click the SSH button next to your instance

Or connect from your local terminal:

bash
# Connect using gcloud (auto-handles SSH keys)
gcloud compute ssh openclaw-vm --zone=us-central1-a

# Or use standard SSH with the external IP
ssh username@your-vm-external-ip
3

System Update & Dependencies

Update the package index and upgrade all installed packages:

bash
sudo apt update && sudo apt upgrade -y
4

Install supported Node.js version

openclaw.ai requires Node.js 22.22.3+, 24.15+, or 25.9+ (installer defaults to Node 26). Install it from the official NodeSource repository:

bash
curl -fsSL https://deb.nodesource.com/setup_26.x | sudo -E bash -
sudo apt-get install -y nodejs
node --version  # Should show v26.x.x
5

Install openclaw.ai

Run the official one-line installer:

bash
curl -fsSL https://openclaw.ai/install.sh | bash
6

Run Onboarding

Launch the interactive onboarding wizard. The --install-daemon flag automatically configures openclaw.ai to run as a background service:

bash
openclaw onboard --install-daemon

The wizard will walk you through:

  • Authentication setup (API keys for your LLM provider)
  • Gateway configuration (port, allowed origins)
  • Optional channel setup (Slack, Discord, etc.)
7

Verify Installation

Confirm everything is running correctly:

bash
# Check system configuration
openclaw doctor

# Verify the gateway is healthy
openclaw health

# Print the authenticated dashboard URL
openclaw dashboard --no-open

# On your local computer, forward the private Gateway port
ssh -N -L 18789:127.0.0.1:18789 YOUR_USER@your-vm-external-ip
# Then open http://127.0.0.1:18789
8

Configure VPC Firewall Rules

Keep the Gateway on its default loopback bind. You do not need a VPC firewall rule for port 18789; use the SSH tunnel from Step 7:

bash
# Run this on your local computer
gcloud compute ssh openclaw-vm \
  --zone=us-central1-a \
  -- -N -L 18789:127.0.0.1:18789

# Then open http://127.0.0.1:18789
âš ī¸

Keep the Gateway Private

Do not create an internet-facing rule for port 18789. Use SSH forwarding or Tailscale for remote access.

9

Keep Running with systemd

The --install-daemon flag from Step 6 already set up a systemd user service. To check its status:

bash
# Check gateway status via openclaw CLI
openclaw gateway status

# Or check directly via systemd
systemctl --user status openclaw-gateway

# View live logs
journalctl --user -u openclaw-gateway -f

The service will automatically restart on failure and start on boot.

🔧 Troubleshooting

Check the Gateway on the VM, then restart the SSH tunnel locally:

bash
# On the VM
openclaw gateway status
ss -tlnp | grep 18789

# On your local computer
gcloud compute ssh openclaw-vm \
  --zone=us-central1-a \
  -- -N -L 18789:127.0.0.1:18789

GCP SSH requires port 22 to be open. Verify the default SSH firewall rule exists:

bash
gcloud compute firewall-rules list --filter="name=default-allow-ssh"

If missing, create it or use the GCP Console browser-based SSH as a fallback.

The e2-micro instance has only 1 GB RAM. If you're experiencing OOM issues, add swap space:

bash
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

Or upgrade to an e2-small (2 GB RAM) for a smoother experience.