Back to Blog
O

Deploy OpenClaw to the Cloud: Fly.io & Render Setup Guide

Setup Guides

Deploy OpenClaw to the Cloud: Fly.io & Render Setup Guide

OpenClaw Expert Team
11 min read

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" then fly 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:

  1. Navigate to https://your-service.onrender.com/setup
  2. Enter your SETUP_PASSWORD
  3. Select your AI model provider and paste the API key
  4. 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 /health endpoint
  • 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

FeatureFly.ioRender
Setup methodCLI commandsWeb UI (one-click)
Configurationfly.toml + CLIrender.yaml + dashboard
Minimum cost~$10-15/mo$7/mo (Starter)
Persistent storageFly VolumesPersistent Disk
Regions30+ worldwideUS, EU, Singapore
SSH accessYes (fly ssh console)Yes (Render shell)
Custom domainsYes (free SSL)Yes (free SSL)
Best forDevelopers wanting controlNon-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.

openclaw fly.ioopenclaw rendercloud ai deploymentopenclaw hostingopenclaw always-on

Need Help with OpenClaw?

Our experts handle the entire setup — installation, configuration, integrations, and ongoing support. Get your AI assistant running in 24 hours.