Introduction
Platform-as-a-Service (PaaS) providers offer simpler deployment compared to Kubernetes. Fly.io, Railway, and Render each support Docker containers with persistent volumes, making them viable options for OpenClaw. The key requirement is WebSocket support for real-time streaming.
Key Concepts
- PaaS Deployment: Push a Docker image and let the platform handle infrastructure, networking, and TLS.
- WebSocket Support: Required for OpenClaw's real-time streaming. Not all PaaS providers support WebSockets by default.
- Persistent Volumes: PaaS-provided storage that persists across deployments, essential for agent data.
- Always-On: OpenClaw needs to run continuously (not on-demand), which affects pricing on some platforms.
Real World Context
An indie developer wants to run OpenClaw for their personal AI assistant. They don't want to manage Kubernetes or a VPS. Fly.io provides a single-command deployment with automatic TLS, a persistent volume for agent data, and WebSocket support — all on the free tier.
Deep Dive
Deploying to Fly.io:
bash# Install Fly CLI and authenticate fly auth login # Launch the app fly launch --image openclaw/gateway:2026.2.19 --name my-openclaw # Create a persistent volume fly volumes create openclaw_data --size 5 --region iad # Set secrets fly secrets set ANTHROPIC_API_KEY="sk-ant-..." fly secrets set TELEGRAM_BOT_TOKEN="123456:ABC..." # Deploy fly deploy
Fly.io handles TLS termination, provides a public URL, and supports WebSockets natively. The persistent volume mounts to /root/.openclaw in the fly.toml configuration.
The fly.toml configuration:
toml[build] image = "openclaw/gateway:2026.2.19" [[services]] internal_port = 18789 protocol = "tcp" [services.concurrency] type = "connections" hard_limit = 50 [[mounts]] source = "openclaw_data" destination = "/root/.openclaw"
This configuration maps the internal port, sets connection limits, and mounts the persistent volume.
Railway and Render follow similar patterns but with their own CLI tools and configuration formats. The critical check for any PaaS is WebSocket support — without it, real-time streaming and channel connections will fail.
Common Pitfalls
- Choosing a PaaS without WebSocket support — Some platforms terminate WebSocket connections or require explicit configuration. Verify before deploying.
- Using on-demand scaling — OpenClaw needs to run 24/7 for channel connections and heartbeats. Scale-to-zero platforms will disconnect channels when the container sleeps.
Best Practices
- Verify WebSocket support first — Before committing to a platform, confirm WebSockets work with a test deployment.
- Use the platform's secrets manager — Never hardcode API keys in fly.toml or railway.json.
Summary
- Fly.io, Railway, and Render provide simple PaaS deployment for OpenClaw
- WebSocket support is a hard requirement for real-time streaming
- Persistent volumes are essential for agent data
- OpenClaw needs always-on instances, not scale-to-zero
- Use platform-native secrets management for credentials