Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:Openclaw Openclaw Cloud Deployment Configuration

From Leeroopedia


Knowledge Sources
Domains Deployment, Docker
Last Updated 2026-02-06 12:00 GMT

Overview

Cloud deployment configuration is the concept of infrastructure-as-code deployment: declaring cloud provider configuration (regions, volumes, health checks, scaling) in version-controlled files that fully describe the desired deployment state.

Description

Modern cloud platforms allow applications to declare their infrastructure requirements in configuration files that are checked into version control alongside the application source. This approach, known as infrastructure-as-code, ensures deployments are reproducible, auditable, and consistent across environments.

OpenClaw provides configuration templates for two cloud platforms: Fly.io (via fly.toml and fly.private.toml) and Render (via render.yaml). Each file declares the complete deployment specification: the Docker build configuration, environment variables, process commands, networking (ports, HTTPS, public/private exposure), compute resources (CPU, memory), persistent storage (volumes/disks), health checks, and scaling parameters.

The two Fly.io configurations illustrate a key design choice in cloud deployment: public versus private exposure. The standard fly.toml includes an [http_service] block that allocates a public URL with HTTPS termination, suitable for webhook-based messaging channels. The private fly.private.toml omits this block entirely, making the gateway accessible only via fly proxy, WireGuard, or SSH, suitable for outbound-only deployments or those using tunnel-based webhook forwarding.

Usage

Apply this concept when deploying OpenClaw to Fly.io or Render, or as a reference pattern when creating configuration for other cloud platforms (Railway, DigitalOcean App Platform, Google Cloud Run). The configuration files serve as both deployment templates and documentation of the infrastructure requirements.

Theoretical Basis

Infrastructure-as-code for containerized applications typically declares:

  1. Build specification: How to build the Docker image (Dockerfile path, build args).
  2. Process definition: What command to run, with what arguments. OpenClaw uses node dist/index.js gateway --allow-unconfigured --port PORT --bind lan.
  3. Environment variables: Runtime configuration including NODE_ENV, OPENCLAW_STATE_DIR, memory limits, and authentication tokens.
  4. Networking: Internal port, HTTPS enforcement, health check paths.
  5. Compute resources: VM size, memory allocation. OpenClaw recommends shared-cpu-2x with 2048MB on Fly.io and starter plan on Render.
  6. Persistent storage: Volume mounts for state data. Both platforms mount a persistent disk at /data.
  7. Scaling policy: Whether machines auto-stop, minimum running instances. OpenClaw disables auto-stop because the gateway maintains persistent WebSocket connections.

The private deployment variant demonstrates the principle of least privilege applied to networking: if the gateway does not need inbound webhooks (using polling or tunnel-based delivery instead), removing the public endpoint eliminates an entire attack surface.

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment