Deploy OpenClaw to the Cloud: Fly.io & Render Setup Guide
Deploy OpenClaw to the Cloud: Fly.io & Render Setup Guide
Cloud Deployment: Always-On AI
Local installations work great for testing, but for production 24/7 availability, cloud deployment is the way to go. OpenClaw has first-class support for two cloud platforms: Fly.io (more control, CLI-driven) and Render (simpler, web UI-driven).
Option 1: Fly.io Deployment
Fly.io runs Docker containers on edge servers worldwide. OpenClaw includes a ready-made fly.toml configuration.
Step 1: Install Fly CLI and Clone
curl -L https://fly.io/install.sh | sh
fly auth login
git clone https://github.com/openclaw/openclaw.git
cd openclaw
Step 2: Create App and Storage
# Create a Fly app
fly apps create my-openclaw
# Create persistent volume (1GB minimum, same region as app)
fly volumes create openclaw_data --size 1 --region iad
Step 3: Set Secrets
# Required: gateway authentication token
fly secrets set OPENCLAW_GATEWAY_TOKEN=$(openssl rand -hex 32)
# Your AI provider key
fly secrets set ANTHROPIC_API_KEY=sk-ant-your-key-here
# Channel tokens (add as needed)
fly secrets set TELEGRAM_BOT_TOKEN=your-telegram-token
fly secrets set DISCORD_BOT_TOKEN=your-discord-token
Step 4: Deploy
fly deploy
That's it. Fly builds the Docker image, pushes it, and starts the gateway.
Key fly.toml Settings Explained
[env]
NODE_ENV = "production"
OPENCLAW_STATE_DIR = "/data" # Persistent volume mount point
NODE_OPTIONS = "--max-old-space-size=1536" # Prevent OOM on 2GB machines
[processes]
app = "node dist/index.js gateway --allow-unconfigured --port 3000 --bind lan"
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = false # Keep running 24/7
min_machines_running = 1 # At least one instance always on
[[vm]]
size = "shared-cpu-2x"
memory = "2048mb" # 2GB recommended (512MB too small)
[mounts]
source = "openclaw_data"
destination = "/data" # Where config and state persist
Fly.io Tips
- Memory matters: 512MB causes silent OOM restarts. Use 2GB minimum
- Gateway lock stuck after crash:
fly ssh console --command "rm -f /data/gateway.*.lock"thenfly machine restart - Private deployment (no public IP): Use
fly deploy -c fly.private.toml— access via Fly's WireGuard VPN only - Cost: ~$10-15/month on shared-cpu-2x with 2GB RAM
Option 2: Render Deployment
Render offers a one-click Blueprint deployment — the simplest path to cloud OpenClaw.
Step 1: One-Click Deploy
Go to Render's deploy page for the OpenClaw Blueprint. Click "Deploy to Render." Set the SETUP_PASSWORD when prompted. The OPENCLAW_GATEWAY_TOKEN is auto-generated.
Step 2: Web-Based Setup
After deployment completes:
- Navigate to
https://your-service.onrender.com/setup - Enter your
SETUP_PASSWORD - Select your AI model provider and paste the API key
- Configure channels (Telegram, Discord, Slack) through the web UI
Render Configuration
The render.yaml Blueprint configures:
- Docker runtime — builds from the included Dockerfile
- Port 8080 — Render's default internal port
- 1GB persistent disk at
/data— survives deployments - Health check on
/healthendpoint - Auto-deploy on push — connect your GitHub repo for CI/CD
Render Tips
- Free tier limitation: Services spin down after 15 min of inactivity. Config resets without persistent disk. Use Starter plan ($7/mo) for always-on with persistence
- Logs: Available in the Render dashboard under your service's "Logs" tab
- Environment variables: Managed in the Render dashboard under "Environment"
Platform Comparison
| Feature | Fly.io | Render |
|---|---|---|
| Setup method | CLI commands | Web UI (one-click) |
| Configuration | fly.toml + CLI | render.yaml + dashboard |
| Minimum cost | ~$10-15/mo | $7/mo (Starter) |
| Persistent storage | Fly Volumes | Persistent Disk |
| Regions | 30+ worldwide | US, EU, Singapore |
| SSH access | Yes (fly ssh console) | Yes (Render shell) |
| Custom domains | Yes (free SSL) | Yes (free SSL) |
| Best for | Developers wanting control | Non-technical users wanting simplicity |
After Deployment: Essential Commands
# Fly.io
fly status # App status
fly logs # Live logs
fly ssh console # SSH into container
fly secrets list # View secret names
# Render
# All managed via web dashboard
Want cloud deployment without the hassle? We deploy OpenClaw to your preferred cloud platform, configure all channels, set up monitoring, and provide ongoing support.
Book your cloud deployment or learn about our VPS deployment service.
Need Help with OpenClaw?
Our experts handle the entire setup — installation, configuration, integrations, and ongoing support. Get your AI assistant running in 24 hours.
Related Articles
OpenClaw Dashboard V2: What's New in the Control UI (2026)
OpenClaw Dashboard V2: What's New in the Control UI (2026)
8 min read
How to Back Up and Restore Your OpenClaw Setup (v2026.3.8+)
How to Back Up and Restore Your OpenClaw Setup (v2026.3.8+)
9 min read
How to Install OpenClaw Skills: The Complete Guide
How to Install OpenClaw Skills: The Complete Guide
10 min read