| name | flyio-cost-tuning |
| description | Optimize Fly.io costs with auto-stop/suspend, right-sizing VMs,
volume management, and monitoring spend across apps and regions.
Trigger: "fly.io costs", "fly.io pricing", "fly.io billing", "reduce fly.io spend".
|
| allowed-tools | Read, Write, Edit, Bash(fly:*) |
| version | 1.6.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","edge-compute","flyio"] |
| compatibility | Designed for Claude Code |
Fly.io Cost Tuning
Overview
Fly.io charges per-second for running machines plus storage. Key levers: auto-stop idle machines, suspend instead of stop, right-size VMs, and clean up unused volumes.
Pricing Quick Reference
| Resource | Free Tier | Cost |
|---|
| shared-cpu-1x (256mb) | 3 VMs free | ~$1.94/month each |
| shared-cpu-1x (512mb) | included | ~$3.88/month |
| shared-cpu-2x (1gb) | - | ~$11.62/month |
| Volumes | 3GB free | $0.15/GB/month |
| Bandwidth | 100GB free | $0.02/GB after |
| IPv4 | 1 free per org | $2/month each |
Instructions
Strategy 1: Auto-Stop Idle Machines
[http_service]
auto_stop_machines = "stop"
auto_start_machines = true
min_machines_running = 0
Strategy 2: Suspend for Faster Resume
[http_service]
auto_stop_machines = "suspend"
Strategy 3: Audit and Clean Up
fly apps list
fly machine list -a my-app --json | jq '.[] | select(.state != "started") | {id, state, region}'
fly apps destroy old-app --yes
fly volumes list -a my-app
fly volumes destroy vol_xxx
Strategy 4: Right-Size VMs
fly ssh console -a my-app -C "cat /proc/meminfo | head -3"
fly scale vm shared-cpu-1x --memory 256 -a my-app
Cost Monitoring
fly billing
fly scale show -a my-app
Resources
Next Steps
For architecture design, see flyio-reference-architecture.