skills-templates/flyio/SKILL.md
Deploy and scale full-stack applications globally on Fly.io platform
npx skillsauth add enuno/claude-command-and-control flyioInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Fly.io is a platform for deploying full-stack applications and databases globally. It runs your apps on Machines (fast-launching VMs) close to your users and scales compute resources automatically based on demand.
Use Fly.io when you need to:
An app on Fly.io can be anything from a simple frontend web app to a complex arrangement of processes and Machines all doing their own thing. Applications are defined using fly.toml configuration files.
Firecracker micro-VMs that run your application code. Machines can:
The primary deployment framework that manages the complete application lifecycle:
macOS/Linux:
curl -L https://fly.io/install.sh | sh
Windows:
pwsh -Command "iwr https://fly.io/install.ps1 -useb | iex"
fly auth signup # Create new account
fly auth login # Existing account
cd your-app
fly launch
This will:
fly.toml configuration filefly deploy
# Launch new app (interactive)
fly launch
# Launch with custom options
fly launch --name my-app --region ord --no-deploy
# Deploy app updates
fly deploy
# Deploy without rebuilding
fly deploy --image registry.fly.io/my-app:latest
# Check app status
fly status
# View app information
fly info
# Open app in browser
fly open
# View logs
fly logs
# SSH into Machine
fly ssh console
# List all apps
fly apps list
# Destroy app
fly apps destroy my-app
# List Machines
fly machines list
# Create Machine
fly machines run registry.fly.io/my-app:latest
# Stop Machine
fly machines stop <machine-id>
# Start Machine
fly machines start <machine-id>
# Destroy Machine
fly machines destroy <machine-id>
# Scale Machine count
fly scale count 3
# Scale to specific regions
fly scale count 2 --region ord --region iad
# Scale Machine resources
fly scale vm shared-cpu-2x --memory 2048
# Configure autoscaling
fly autoscale set min=1 max=10
# Set secret
fly secrets set DATABASE_URL=postgres://...
# List secrets (names only, not values)
fly secrets list
# Unset secret
fly secrets unset DATABASE_URL
# Import secrets from file
fly secrets import < .env.production
# Create volume
fly volumes create data --size 10
# List volumes
fly volumes list
# Delete volume
fly volumes delete vol_abc123
# Extend volume size
fly volumes extend vol_abc123 --size 20
# Create Postgres cluster
fly postgres create --name my-db
# Attach Postgres to app
fly postgres attach --app my-app my-db
# Create Redis instance
fly redis create --name my-redis
# Connect to Postgres
fly postgres connect --app my-db
# App name
app = "my-app"
# Primary region
primary_region = "ord"
# Build configuration
[build]
dockerfile = "Dockerfile"
# HTTP service
[[services]]
protocol = "tcp"
internal_port = 8080
[[services.ports]]
port = 80
handlers = ["http"]
[[services.ports]]
port = 443
handlers = ["tls", "http"]
# Machine VM size
[vm]
size = "shared-cpu-1x"
memory_mb = 256
# Auto stop/start
[auto_stop_machines]
enabled = true
min_machines_running = 0
[auto_start_machines]
enabled = true
Environment Variables:
[env]
PORT = "8080"
NODE_ENV = "production"
Process Groups:
[processes]
web = "node server.js"
worker = "node worker.js"
HTTP Service with Health Checks:
[[services]]
protocol = "tcp"
internal_port = 8080
[[services.http_checks]]
interval = "10s"
timeout = "2s"
grace_period = "5s"
method = "GET"
path = "/health"
[[services.tcp_checks]]
interval = "15s"
timeout = "2s"
grace_period = "5s"
Mounted Volumes:
[mounts]
source = "data"
destination = "/data"
Pattern: Build high-availability apps using multiple Machines across regions
Key Concepts:
Configuration Example:
[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = "stop"
auto_start_machines = true
min_machines_running = 0
[http_service.concurrency]
type = "requests"
soft_limit = 200
Scaling Commands:
# Add redundancy with multiple Machines
fly scale count 2
# Multi-region deployment for geographic redundancy
fly scale count 20 --region ams,ewr,gig
# Create standby Machine for workers
fly machine clone <id> --standby-for <id>
fly machine run <image> --standby-for <machine-id>
Cost Efficiency:
When to Use:
Available Patterns from Fly.io Blueprints:
Autoscaling Configuration:
[http_service.concurrency]
type = "requests"
soft_limit = 200
hard_limit = 250
[auto_stop_machines]
enabled = true
min_machines_running = 0
[auto_start_machines]
enabled = true
Machine Autoscaling:
# Set autoscaling bounds
fly autoscale set min=2 max=10
# Configure concurrency limits
fly scale concurrency soft=200 hard=250
# Private app autostart/autostop
# (automatically configured for internal services)
Volume Forking:
Distributed Work Queue:
# Deploy worker Machines
fly machines run <image> --env WORKER=true --region ord
# Use standby workers for redundancy
fly machine run <image> --env WORKER=true --standby-for <primary-id>
Cron-Based Task Scheduling:
# Using Supercronic for cron execution
FROM alpine:latest
RUN apk add --no-cache supercronic
COPY crontab /etc/crontab
CMD ["supercronic", "/etc/crontab"]
Infrastructure Automation:
Zero-Downtime Deployments:
# Default behavior with multiple Machines
fly deploy
# Rolling deployment with custom strategy
fly deploy --strategy rolling
Application Rollback:
# List recent releases
fly releases
# Rollback to previous version
fly releases rollback
GitHub Preview Environments:
# .github/workflows/preview.yml
name: Deploy Preview
on: pull_request
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: superfly/[email protected]
with:
args: "deploy --app my-app-pr-${{ github.event.pull_request.number }}"
Staging/Production Isolation:
# Create separate apps for environments
fly launch --name myapp-staging --org staging
fly launch --name myapp-production --org production
# Deploy to specific environment
fly deploy --app myapp-staging
fly deploy --app myapp-production
Per-User Development Environments:
# Create ephemeral dev environment
fly machines run <image> --name dev-$USERNAME --region ord
# Destroy when done
fly machines destroy dev-$USERNAME
FROM node:18-alpine as builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]
# Deploy to multiple regions
fly deploy --region ord,iad,lhr
# Or configure in fly.toml
[regions]
ord = 2 # 2 Machines in Chicago
iad = 2 # 2 Machines in Virginia
lhr = 1 # 1 Machine in London
fly.toml or Dockerfilefly dashboard for resource consumptionfly logs or integrate with logging servicesApp won't start:
# Check logs
fly logs
# Verify configuration
fly config validate
# SSH into Machine
fly ssh console
Port binding errors:
0.0.0.0 not localhostinternal_port in fly.toml with app's listening portPORT environment variableBuild failures:
# Build locally to test
fly deploy --local-only
# Use remote builder
fly deploy --remote-only
# Check Dockerfile syntax
docker build .
Slow performance:
Database connection issues:
DATABASE_URL secret is setfly status --app my-db.internal)# Community forum
fly open https://community.fly.io
# Documentation
fly docs
# Support
fly support
# Status page
fly open https://status.fly.io
See knowledge/ directory for:
Version: 1.1 Last Updated: 2026-01-21 Source: Fly.io Official Documentation + Blueprints Maintained By: Claude Command and Control
tools
MemPalace local-first AI memory system. Use when setting up persistent memory for Claude Code sessions, mining project files or conversation transcripts, querying past context, configuring MCP tools, managing the knowledge graph, or troubleshooting palace operations.
tools
LangSmith Python SDK — trace, evaluate, and monitor LLM applications. Covers @traceable decorator, trace context manager, Client API, evaluate() / aevaluate(), comparative evaluation, custom evaluators, dataset management, prompt caching, ASGI middleware, and pytest plugin.
development
LangGraph (Python) — build stateful, controllable agent graphs with checkpointing, streaming, persistence, interrupts, fault tolerance, and durable execution. Covers both Graph API (StateGraph) and Functional API (@entrypoint/@task).
development
LangGraph Graph API (Python) — build explicit DAG agent workflows with StateGraph, typed state, nodes, edges, Command routing, Send fan-out, checkpointers, interrupts, and streaming. Use when you need explicit control flow and graph topology.