Overview

Advantages

  • Managed infrastructure
  • Global edge locations
  • Automatic TLS
  • Easy scaling
  • No server management

Considerations

  • Higher cost
  • Vendor lock-in
  • Less control
  • Cold start latency

Requirements

  • Fly.io Account: Account on Fly.io (or similar PaaS)
  • flyctl CLI: Fly.io command-line tool
  • Persistent Volume: For state persistence

Setup Steps

  1. Install flyctl: Install the Fly.io CLI
    curl -L https://fly.io/install.sh | sh
  2. Login to Fly: Authenticate with Fly.io
    fly auth login
  3. Create App: Create a new Fly.io app
    fly apps create openclaw-gateway
  4. Create Volume: Create persistent volume for state
    fly volumes create openclaw_data --size 1
  5. Configure fly.toml: Set up the Fly.io configuration file
  6. Set Secrets: Configure environment variables
    fly secrets set ANTHROPIC_API_KEY=sk-ant-...
  7. Deploy: Deploy to Fly.io
    fly deploy

Configuration Example

# fly.toml
app = "openclaw-gateway"
primary_region = "iad"

[build]
  image = "node:22-slim"

[env]
  NODE_ENV = "production"
  OPENCLAW_STATE_DIR = "/data"

[mounts]
  source = "openclaw_data"
  destination = "/data"

[[services]]
  internal_port = 18789
  protocol = "tcp"

  [[services.ports]]
    port = 443
    handlers = ["tls", "http"]

Deploy with AI Providers

Choose your AI provider for cloud deployment deployment:

Frequently Asked Questions

What are the requirements for Cloud Deployment?
Cloud Deployment requires: Fly.io Account, flyctl CLI, Persistent Volume. The setup typically takes 15-30 minutes for first-time users.
Where is state stored with Cloud Deployment?
State is stored in /data (mounted volume). This includes configuration, credentials, session history, and workspace files. Always back up this directory.