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
- Install flyctl: Install the Fly.io CLI
curl -L https://fly.io/install.sh | sh - Login to Fly: Authenticate with Fly.io
fly auth login - Create App: Create a new Fly.io app
fly apps create openclaw-gateway - Create Volume: Create persistent volume for state
fly volumes create openclaw_data --size 1 - Configure fly.toml: Set up the Fly.io configuration file
- Set Secrets: Configure environment variables
fly secrets set ANTHROPIC_API_KEY=sk-ant-... - 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:
Anthropic
Creator of Claude AI models with advanced reasoning capabilities
OpenAI Codex
GPT models with broad capabilities and wide ecosystem support
Google Gemini
Multimodal AI with competitive pricing and speed
OpenRouter
Unified API gateway to multiple AI providers
Ollama
Run open-source LLMs locally with no API costs
AWS Bedrock
Enterprise AI through AWS with compliance and security
OpenAI (Standard)
Standard OpenAI API for GPT models
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.