Install OpenClaw on Google Cloud: Free $300 VM Setup Guide 2026
Quick Summary: Google Cloud Platform (GCP) offers new users $300 in free credits — more than enough to run OpenClaw for several months. This guide walks you through creating a Compute Engine VM, installing Node.js, deploying OpenClaw, configuring the firewall, setting up systemd autostart, and integrating VPN07 so your AI agent can reliably reach Claude API from any region.
Why Google Cloud is a Great Home for OpenClaw
OpenClaw is an open-source personal AI agent that lives on a computer you control — and Google Cloud Platform (GCP) makes that computer remarkably accessible. New GCP accounts receive $300 in free credits valid for 90 days, which translates to roughly 3–6 months of a modest VM running 24/7 at no out-of-pocket cost. After the trial, e2-micro instances in select regions qualify for GCP's Always Free tier, giving you a permanent free path.
Beyond the economics, GCP's global network of data centers in Asia, Europe, and North America means you can position your OpenClaw instance close to the people or services it needs to reach. Regions like Tokyo, Singapore, and Oregon often provide low-latency access to Anthropic's Claude API, which is the default AI brain behind OpenClaw. For users running automation tasks, background cron jobs, or 24/7 Telegram bots, cloud hosting beats leaving a personal laptop on all night.
$300 Free Credit
New accounts get $300 valid for 90 days. An e2-small VM runs around $13–18/month, giving you free OpenClaw hosting for months.
35+ Regions Worldwide
Pick the region closest to your users or the AI API you call. Tokyo and Singapore work great for Asia-Pacific users.
Enterprise Security
Google's VPC firewall, IAM roles, and Cloud Armor protect your OpenClaw instance at the infrastructure level.
Recommended VM Size
For personal use, start with e2-small (2 vCPU, 2 GB RAM) — about $13/month, well within the free credit. For multi-agent or heavy automation, upgrade to e2-medium (2 vCPU, 4 GB RAM) at ~$26/month. OpenClaw's Node.js process typically uses 200–400 MB RAM at idle.
Prerequisites Before You Start
Before spinning up your GCP VM, gather the following:
A Google account with a valid credit card
GCP requires a card to verify identity even for the free tier. You will not be charged until you manually upgrade to a paid account.
An Anthropic API key (for Claude)
Sign up at console.anthropic.com. OpenClaw works best with Claude claude-opus-4-5 or claude-sonnet-4-5. Keep the key private — it goes into OpenClaw's config.
A Telegram account (for the bot interface)
OpenClaw communicates primarily through Telegram. Create a bot via @BotFather and save the token.
Basic SSH / Linux command-line familiarity
You only need about 10 commands covered in this guide. No Linux expertise required — we walk through everything.
Step 1 — Create a Google Cloud Compute Engine VM
Navigate to console.cloud.google.com and create a new project called (for example) openclaw-server. Then follow these steps:
1.1 — Open Compute Engine → VM Instances
In the left sidebar go to Compute Engine → VM Instances. If prompted to enable the API, click Enable. Then click Create Instance.
1.2 — Configure Instance Settings
- • Name: openclaw-agent
- • Region/Zone: us-central1-a (free tier) or asia-east1-a (Tokyo, fast to Claude API)
- • Machine type: e2-small (2 vCPU, 2 GB) — free tier eligible in us-central1
- • Boot disk: Ubuntu 24.04 LTS, 20 GB standard persistent disk
- • Firewall: Check "Allow HTTP traffic" and "Allow HTTPS traffic"
1.3 — Click Create and Wait
GCP takes about 60 seconds to provision the VM. You'll see a green checkmark in the VM Instances list when ready. Note the External IP address — you'll need it for SSH.
Step 2 — Connect via SSH and Update the System
GCP provides a browser-based SSH terminal — click the SSH button next to your VM in the console. Alternatively, install the gcloud CLI locally and use:
gcloud compute ssh openclaw-agent --zone=us-central1-a
Once connected, update the system packages:
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget git build-essential
Step 3 — Install Node.js 22 via NVM
OpenClaw requires Node.js 20 or later. The recommended way is via NVM (Node Version Manager), which allows switching versions easily:
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
# Reload shell environment
source ~/.bashrc
# Install and use Node.js 22 LTS
nvm install 22
nvm use 22
nvm alias default 22
# Verify installation
node --version # should show v22.x.x
npm --version # should show 10.x.x
Why Node.js 22?
OpenClaw's latest releases target Node.js 22 LTS. This version includes native fetch API support, improved performance for JSON parsing (used heavily in AI responses), and long-term security updates until April 2027. Avoid Node.js 16 or 18 — they lack some APIs OpenClaw expects.
Step 4 — Install OpenClaw
OpenClaw offers two installation methods. For cloud servers, the npm global install is cleanest:
# Method A: npm global install (recommended for GCP)
npm install -g openclaw
# Verify installation
openclaw --version
Alternatively, use the official one-liner installer (includes Node.js if missing):
# Method B: Official installer (auto-detects OS)
curl -fsSL https://openclaw.ai/install.sh | bash
After installation, run the onboarding wizard to configure your AI agent's name, personality, and API keys:
openclaw onboard
What the Onboarding Wizard Asks
- • Agent name: What you want to call your AI (e.g., "Aria")
- • AI model: Claude (Anthropic), GPT-4 (OpenAI), or a local model
- • Anthropic API key: Paste your key from console.anthropic.com
- • Telegram bot token: From @BotFather on Telegram
- • Your Telegram user ID: From @userinfobot
- • Communication channels: Telegram, Discord, WhatsApp, Slack, etc.
Step 5 — Configure GCP Firewall Rules
By default, GCP only allows HTTP/HTTPS traffic. OpenClaw itself doesn't require inbound ports (it communicates outbound to Telegram/Claude), but if you want to access a web dashboard or connect remotely, you may need custom firewall rules.
To add a custom firewall rule in GCP console:
Go to VPC Network → Firewall → Create Firewall Rule
Name: openclaw-web | Target: All instances | Source IP: Your IP or 0.0.0.0/0 | Protocols: TCP port 3000
For outbound API calls to Claude (api.anthropic.com), no special rules are needed — GCP allows all outbound traffic by default. However, if Claude's API is unreachable from your GCP region, you'll need a VPN proxy — covered in the VPN07 section below.
# Also configure via gcloud CLI:
gcloud compute firewall-rules create openclaw-web \
--allow tcp:3000 \
--source-ranges="0.0.0.0/0" \
--description="OpenClaw web access"
Step 6 — Set Up systemd for 24/7 Autostart
Cloud VMs occasionally restart due to maintenance or spot-instance preemption. A systemd service ensures OpenClaw restarts automatically:
sudo nano /etc/systemd/system/openclaw.service
Paste the following content (replace YOUR_USERNAME with your actual Linux user):
[Unit]
Description=OpenClaw AI Agent
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=YOUR_USERNAME
WorkingDirectory=/home/YOUR_USERNAME
ExecStart=/home/YOUR_USERNAME/.nvm/versions/node/v22.x.x/bin/openclaw start
Restart=on-failure
RestartSec=10
Environment=NODE_ENV=production
[Install]
WantedBy=multi-user.target
# Enable and start the service
sudo systemctl daemon-reload
sudo systemctl enable openclaw
sudo systemctl start openclaw
# Check status
sudo systemctl status openclaw
# View logs
journalctl -u openclaw -f
Find Your NVM Node Path
Run which openclaw or nvm which 22 to get the exact path for your ExecStart line. The path varies depending on your NVM version.
Step 7 — Solve API Access Issues with VPN07
OpenClaw needs reliable outbound access to Anthropic's Claude API (api.anthropic.com) or OpenAI's API. Depending on your GCP region, you may encounter:
Common API Access Problems
- • High latency (500ms+) to Claude API from Asian GCP regions
- • Intermittent connection drops during long-running tasks
- • Rate limiting triggered by frequent reconnections
- • API timeouts during complex multi-step agent workflows
VPN07 Solves This
- • 1000Mbps bandwidth — zero API throttling
- • US/EU nodes with stable Claude API routing
- • 70+ countries — choose the fastest path
- • Proxy mode: set HTTP_PROXY env var in systemd
To configure VPN07 as a proxy for OpenClaw on GCP, add environment variables to your systemd service:
# In /etc/systemd/system/openclaw.service, under [Service]:
Environment=HTTP_PROXY=http://127.0.0.1:1080
Environment=HTTPS_PROXY=http://127.0.0.1:1080
Environment=NODE_ENV=production
Then install the VPN07 Linux client and configure it to run as a local SOCKS5/HTTP proxy on port 1080. Alternatively, install VPN07 system-wide and all outbound traffic from the VM routes through the VPN tunnel automatically.
GCP Billing: Stay Within the Free Credit
Your $300 GCP credit covers a wide range of services. Here's a cost breakdown for a typical OpenClaw deployment:
| Resource | Specification | Monthly Cost |
|---|---|---|
| VM Instance | e2-small, us-central1 | FREE (Always Free tier) |
| Persistent Disk | 30 GB standard PD | FREE (30 GB free) |
| External IP | Static IP (optional) | ~$3/month |
| Egress Traffic | ~5 GB/month (API calls) | FREE (1 GB/month free) |
| e2-medium upgrade | 2 vCPU, 4 GB RAM | ~$26/month |
Set a Budget Alert
Go to Billing → Budgets & Alerts and create a $50 budget with email alerts at 50%, 90%, and 100%. This prevents surprise charges if your VM usage spikes. GCP will never charge you beyond your free tier without explicit confirmation.
Step 8 — Test Your OpenClaw Deployment
Once OpenClaw is running, verify everything works end-to-end:
Open Telegram and send your bot "Hello" — it should respond within 5 seconds
Ask it: "What's the weather in Tokyo?" — verify it uses web search correctly
Ask: "Remember that my timezone is UTC+8" — check persistent memory
Check systemctl status openclaw shows "active (running)"
Reboot the VM (sudo reboot) and verify OpenClaw restarts automatically
Advanced: Connect Multiple Channels
One of OpenClaw's most powerful features is its ability to receive messages from multiple platforms simultaneously. On your GCP VM, you can configure all of these:
Telegram (Primary)
Direct messages and group chats. Best for automation triggers, daily briefings, and quick queries.
Discord
Great for team use. Your OpenClaw can listen in specific channels and respond to commands.
Via Twilio integration. Useful for non-technical family members or customers who prefer WhatsApp.
Slack
Enterprise workspace integration. Responds to mentions and can post automated reports.
To add a new channel after initial onboarding, use the OpenClaw skill system or run openclaw config to edit your agent's configuration file directly.
Troubleshooting Common GCP Issues
Problem: "openclaw: command not found" after reboot
Cause: NVM isn't loaded in the systemd service environment.
Fix: Use the absolute path in ExecStart. Run which openclaw when nvm is active to get it.
Problem: Claude API returns 401 Unauthorized
Cause: API key not loaded by the service, or key has expired.
Fix: Add Environment=ANTHROPIC_API_KEY=sk-ant-xxx to your systemd unit file, then sudo systemctl daemon-reload && sudo systemctl restart openclaw
Problem: High latency (2000ms+) on Claude API calls
Cause: GCP region is far from Claude's API servers (Virginia, US).
Fix: Route through VPN07 with a US East or US West node. This typically drops latency from 300ms+ to under 80ms.
Problem: VM gets preempted (Spot VM)
Cause: Spot (preemptible) VMs are cheaper but can be stopped by GCP.
Fix: Switch to a standard VM for OpenClaw — the cost difference is minimal. Enable automatic restart in VM settings.
Real-World Use Cases: OpenClaw on GCP
Here are some compelling ways people run OpenClaw on Google Cloud:
🤖 24/7 Telegram Business Bot
Answer customer questions, process orders, and send automated reports — even while you sleep. GCP's uptime SLA is 99.99%, so your bot stays online when your laptop doesn't.
📊 Automated Research & Reporting
Schedule cron jobs to pull data from APIs, analyze it with Claude, and deliver daily/weekly reports to your email or Slack. GCP Cloud Scheduler can trigger these on any time zone.
🔄 GitHub Automation Agent
OpenClaw with GitHub skill can monitor your repos, auto-review PRs, generate changelogs, and even commit bug fixes. Running it on GCP ensures it catches webhooks 24/7.
🌍 Multi-Region AI Agent Team
Deploy multiple OpenClaw instances in different GCP regions — one in Tokyo for Asian users, one in Frankfurt for Europe. Each handles regional requests while sharing memory via cloud storage.
VPN07 — Essential for GCP OpenClaw
1000Mbps · 70+ Countries · Trusted Since 2015
When running OpenClaw on Google Cloud, reliable API access to Claude and other AI services is mission-critical. VPN07's 1000Mbps network with 70+ global server locations ensures your GCP OpenClaw instance connects to any AI API with under 80ms latency and zero packet loss. With 10+ years of operation and a 30-day money-back guarantee, VPN07 is the professional-grade network layer your cloud AI agent deserves — all at just $1.5/month.
Related Articles
OpenClaw on Azure: Student Free Credit & Enterprise VM 2026
Deploy OpenClaw on Microsoft Azure using $100 student or $200 new-user free credits. Includes B2s VM setup and Azure CLI automation.
Read More →OpenClaw on VPS Cloud: DigitalOcean, AWS & Hetzner Guide
Compare three popular cloud VPS providers for running OpenClaw. Find the best option for your budget and location.
Read More →