OpenClawSkills
GitHub
Platforms β€’ TutorialHeader.readTime

Fly.io

Run OpenClaw Gateway on Fly.io with persistent storage and automatic HTTPS

''Goal:'' OpenClaw Gateway running on a ''Fly.io'' machine with persistent storage, automatic HTTPS, and Discord/channel access.

Tutorial.step

What you need

- ''flyctl CLI'' installed

- Fly.io account (free tier works)

- Model auth: Anthropic API key (or other provider keys)

- Channel credentials: Discord bot token, Telegram token, etc.

Tutorial.step

Beginner quick path

1. Clone repo β†’ customize ''fly.toml''

2. Create app + volume β†’ set secrets

3. Deploy with ''fly deploy''

4. SSH in to create config or use Control UI

Tutorial.step

1) Create Fly app

Bash
git clone https://github.com/openclaw/openclaw.git
cd openclaw

fly apps create my-openclaw

fly volumes create openclaw_data --size 1 --region iad

''Tip:'' Choose a region close to you. Common options: ''lhr'' (London), ''iad'' (Virginia), ''sjc'' (San Jose).

Tutorial.step

2) Configure fly.toml

Edit ''fly.toml'' to match your app name and requirements.

''Security note:'' The default config exposes a public URL. For a hardened deployment with no public IP, see ''Private Deployment'' or use ''fly.private.toml''.

Toml
app = "my-openclaw"  # Your app name
primary_region = "iad"

[build]
  dockerfile = "Dockerfile"

[env]
  NODE_ENV = "production"
  OPENCLAW_PREFER_PNPM = "1"
  OPENCLAW_STATE_DIR = "/data"
  NODE_OPTIONS = "--max-old-space-size=1536"

[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
  auto_start_machines = true
  min_machines_running = 1
  processes = ["app"]

[[vm]]
  size = "shared-cpu-2x"
  memory = "2048mb"

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

Key settings:

| Setting | Why |

| | -- | | ---- |

| Internet scanners | Discoverable | Hidden |

| Direct attacks | Possible | Blocked |

| Control UI access | Browser | Proxy/VPN |

| Webhook delivery | Direct | Via tunnel |

Tutorial.step

Notes

- Fly.io uses x86 architecture (not ARM)

- The Dockerfile is compatible with both architectures

- For WhatsApp/Telegram onboarding, use ''fly ssh console''

- Persistent data lives on volume at ''/data''

- Signal requires Java + signal-cli; use a custom image and keep memory at 2GB+.

Tutorial.step

Cost

With recommended config (''shared-cpu-2x'', 2GB RAM):

- ~$10-15/month depending on usage

- Free tier includes some allowance

See ''Fly.io pricing'' for details.