Running OpenClaw on a Google Cloud VM
Deploy OpenClaw on Google Compute Engine with automated provisioning and management.
Google Cloud Deployment
Google Compute Engine (GCE) provides reliable, scalable VMs perfect for running OpenClaw. This guide covers manual setup — Claw for All automates this entirely.
Prerequisites
- Google Cloud account with billing enabled
gcloudCLI installed- A project created in GCP Console
Step 1: Create the VM
gcloud compute instances create openclaw-vm \
--zone=us-central1-a \
--machine-type=e2-small \
--image-family=ubuntu-2404-lts \
--image-project=ubuntu-os-cloud \
--boot-disk-size=20GB
Step 2: SSH and Install
gcloud compute ssh openclaw-vm --zone=us-central1-a
On the VM:
# Install Node.js
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
# Install OpenClaw
npm install -g openclaw
# Run onboarding
openclaw onboard
Step 3: Configure as a Service
sudo tee /etc/systemd/system/openclaw.service > /dev/null <<EOF
[Unit]
Description=OpenClaw Gateway
After=network.target
[Service]
Type=simple
User=$USER
WorkingDirectory=$HOME/.openclaw
ExecStart=$(which openclaw) start
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable openclaw
sudo systemctl start openclaw
Step 4: Set Up Instance Metadata
Store configuration in GCE instance metadata for secure key management:
gcloud compute instances add-metadata openclaw-vm \
--zone=us-central1-a \
--metadata=OPENROUTER_API_KEY=sk-or-...,TELEGRAM_BOT_TOKEN=...
Read metadata in your startup script to configure environment variables automatically.
Monitoring
Health Checks
Set up an uptime check in GCP Console to monitor your instance.
Logging
View logs:
sudo journalctl -u openclaw -f
Alerts
Configure Cloud Monitoring alerts for CPU, memory, and instance status.
Cost Optimization
- e2-micro: Free tier eligible, good for light personal use
- e2-small: ~$15/month, recommended for most users
- Preemptible VMs: 60-91% cheaper but may restart periodically
- Committed use discounts: Save 57% with 3-year commitment
Ready for your AI assistant?
Get started with Claw for All today. No setup, no terminal, just sign up and go.
Get StartedRelated Guides
Deploying OpenClaw to the Cloud
Overview of cloud deployment options for OpenClaw — GCP, AWS, DigitalOcean, and managed services.
Claw for All Quick Start: OpenClaw Without the Terminal
Get started with Claw for All in minutes — sign up, subscribe, and deploy your AI assistant.
Docker Deployment for OpenClaw
Run OpenClaw in a Docker container for portable, reproducible deployments.