Deploy OpenClaw on Cloud Providers
Official support for Fly.io & Render • Deploy to AWS, GCP, Azure & more
Officially Supported Platforms
OpenClaw provides official configuration files and tested deployment workflows for these platforms
Fly.io
✓ OFFICIAL SUPPORTGlobal edge deployment with persistent volumes. Official docs provide a recommended fly.toml template. Ideal for low-latency worldwide access.
Render
✓ OFFICIAL SUPPORTSimple deployment with automatic SSL. Official render.yaml configuration included. Note: persistent disk requires a paid plan (Starter+).
Other Cloud Platforms
Google Cloud Platform
Deploy on Compute Engine, Cloud Run, or App Engine. $300 free credit for new users.
View GCP Guide →Microsoft Azure
Deploy on Azure VMs, Container Instances, or App Service. $200 free credit.
View Azure Guide →Deploy on Fly.io
✓ OFFICIAL SUPPORT Official Guide: OpenClaw provides an official Fly.io deployment guide with
a recommended fly.toml template (you create/maintain it
in your repo root).
Prerequisites
- • Fly.io account (sign up free)
-
• Fly CLI installed:
brew install flyctl(macOS) orcurl -L https://fly.io/install.sh | sh - • OpenClaw repository cloned locally
Deployment Steps
1. Login to Fly.io:
flyctl auth login 2. Create and deploy the app:
# Create app (uses fly.toml configuration)
flyctl launch --no-deploy
# Create persistent volume for state
flyctl volumes create openclaw_data --size 1 --region iad
# Deploy the application
flyctl deploy 3. Configure environment variables:
# Required for non-loopback binds (Fly public URL):
flyctl secrets set OPENCLAW_GATEWAY_TOKEN=your_gateway_token
# Model provider keys (example):
flyctl secrets set ANTHROPIC_API_KEY=sk-ant-... Configuration Details
Recommended fly.toml settings include:
- • VM Size: shared-cpu-2x with 2GB RAM
- • Region: iad (Northern Virginia) - customize as needed
- • Storage: Persistent volume mounted at /data
- • Port: Internal port 3000 with HTTPS enforced
- • Auto-scaling: Minimum 1 machine always running
Deploy on Render
✓ OFFICIAL SUPPORT Official Configuration: OpenClaw includes a pre-configured render.yaml file for one-click deployment to Render with automatic SSL and health checks.
Quick Deploy (Recommended)
1. Fork the OpenClaw repository to your GitHub account
2. Visit render.com and sign in with GitHub
3. Click "New" → "Blueprint" and select your forked repository
4. Render will automatically detect render.yaml and configure:
- • Docker-based web service on port 8080
- • 1GB persistent disk at /data
- • Health check endpoint at /health
- • Auto-generated gateway token
Manual Deployment
Create a new Web Service:
# Connect your GitHub repository
# Select: Docker runtime
# Plan: Starter ($7/month) or Free tier
# Environment Variables (set in Render dashboard):
PORT=8080
SETUP_PASSWORD=your_secure_password
OPENCLAW_STATE_DIR=/data/.openclaw
OPENCLAW_WORKSPACE_DIR=/data/workspace Add persistent disk:
- • Name: openclaw-data
- • Mount Path: /data
- • Size: 1GB (expandable)
Features
- • Automatic SSL: Free SSL certificates with auto-renewal
- • Health Checks: Built-in monitoring at /health endpoint
- • Auto-Deploy: Automatic deployments on git push
- • Free Tier: Available with 750 hours/month
Remote Access with Tailscale
Recommended: Use Tailscale for secure remote access to your OpenClaw Gateway, regardless of which cloud platform you choose.
Tailscale Serve (Private Access)
Access your Gateway only from devices on your Tailscale network:
# Install Tailscale on your server
curl -fsSL https://tailscale.com/install.sh | sh
# Enable Tailscale Serve
tailscale serve https / http://localhost:18789
# Gateway must bind to loopback
openclaw gateway run --bind loopback --port 18789 Tailscale Funnel (Public Access)
Expose your Gateway to the public internet with HTTPS (requires password auth):
# Enable Tailscale Funnel
tailscale funnel 18789
# Configure password authentication in openclaw.json
# Gateway automatically requires auth for public access Deploy on Google Cloud Platform
Option 1: Compute Engine (VM)
Create a VM instance:
gcloud compute instances create openclaw-vm \
--image-family=ubuntu-2204-lts \
--image-project=ubuntu-os-cloud \
--machine-type=e2-micro \
--zone=us-central1-a
# SSH into the instance
gcloud compute ssh openclaw-vm --zone=us-central1-a
# Install Node.js and OpenClaw
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
npm install -g openclaw@latest
openclaw onboard --install-daemon Option 2: Cloud Run (Serverless)
Note: OpenClaw is stateful (credentials/sessions). Serverless platforms are often a poor fit unless you persist the full state directory and keep the service warm.
Deploy using Docker:
# Create Dockerfile
FROM node:22-alpine
RUN npm install -g openclaw@latest
# Cloud Run requires a non-loopback bind + $PORT and persistent state. Also set OPENCLAW_GATEWAY_TOKEN.
CMD ["sh", "-lc", "openclaw gateway run --bind lan --port $PORT --auth token --allow-unconfigured"]
# Build and deploy
gcloud builds submit --tag gcr.io/PROJECT_ID/openclaw
gcloud run deploy openclaw \
--image gcr.io/PROJECT_ID/openclaw \
--platform managed \
--region us-central1 Deploy on Microsoft Azure
Option 1: Azure Virtual Machines
Create a VM using Azure CLI:
az vm create \
--resource-group openclaw-rg \
--name openclaw-vm \
--image Ubuntu2204 \
--size Standard_B1s \
--admin-username azureuser \
--generate-ssh-keys
# SSH and install
ssh azureuser@VM_PUBLIC_IP
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
npm install -g openclaw@latest
openclaw onboard --install-daemon Option 2: Azure Container Instances
Deploy containerized application:
az container create \
--resource-group openclaw-rg \
--name openclaw-container \
--image YOUR_REGISTRY/openclaw:latest \
--cpu 1 \
--memory 1 \
--restart-policy Always Deploy on Heroku
Create a new Heroku app:
# Install Heroku CLI
curl https://cli-assets.heroku.com/install.sh | sh
# Login and create app
heroku login
heroku create openclaw-bot
# Create package.json
cat > package.json << 'EOF'
{
"name": "openclaw-gateway",
"version": "1.0.0",
"scripts": {
"start": "openclaw gateway run --bind lan --port $PORT --auth token --allow-unconfigured"
},
"dependencies": {
"openclaw": "latest"
}
}
EOF
# Create Procfile
echo "web: npm start" > Procfile
# Deploy
git init
git add .
git commit -m "Initial commit"
git push heroku main
# Scale worker
heroku ps:scale web=1 Set environment variables:
heroku config:set SETUP_PASSWORD=your_secure_password
heroku config:set OPENCLAW_GATEWAY_TOKEN=your_gateway_token Deploy on Railway
Railway offers the simplest deployment experience with automatic builds from GitHub.
Steps to deploy:
- Create a GitHub repository with your OpenClaw configuration
- Visit railway.app and sign in with GitHub
- Click "New Project" → "Deploy from GitHub repo"
- Select your repository
- Add environment variables in the Railway dashboard
- Railway will automatically build and deploy
Create railway.json for configuration:
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS"
},
"deploy": {
"startCommand": "openclaw gateway run --bind lan --port $PORT --auth token --allow-unconfigured",
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
} Other Cloud Platforms
Render
Free tier available. Automatic deploys from Git. Similar to Heroku but more modern.
Visit Render →Fly.io
Global edge deployment. Free tier includes 3 shared VMs. Great for low-latency.
Visit Fly.io →Netlify
Serverless functions and edge handlers. Free tier with 125k function invocations.
Visit Netlify →Choosing the Right Platform
| Platform | Official Support | Best For | Free Tier | Pricing |
|---|---|---|---|---|
| Fly.io | ✓ Yes | Global edge | Limited free | ~$5-10/month |
| Render | ✓ Yes | Simplicity | 750 hrs/month | $7/month |
| Railway | No | Developer UX | $5/month credit | Pay-as-you-go |
| Heroku | No | Quick start | Eco dynos | $5-7/month |
| AWS EC2 | No | Full control | 12 months | $3-10/month |
| Google Cloud | No | Scalability | $300 credit | $5-15/month |
| Azure | No | Enterprise | $200 credit | $5-15/month |
| VPS | No | Cost-effective | Varies | $5-10/month |
Next Steps
Choose your preferred cloud platform and start deploying OpenClaw