Automated summary
Assists with deploying applications globally on Fly.io edge infrastructure, including multi-region machines, persistent storage, and global databases.
Strengths
- Global deployment with sub-50ms latency across 30+ regions
- Scale-to-zero for cost-effective staging environments
- Multi-region SQLite replication via LiteFS
- Integrated WireGuard private networking for inter-service communication
Limitations
- Requires flyctl CLI and a Fly.io account
- Configuration complexity for advanced multi-region setups
- Potential vendor lock-in to the Fly.io platform
Use this skill to deploy containerized applications that need global low-latency edge computing or cost-efficient staging with scale-to-zero.
Avoid if you need traditional server management or have a monolithic non-containerized architecture.
Security analysis
SafeThe skill provides instructions for using Fly.io CLI and includes a canary deployment script. No destructive, exfiltrating, or obfuscated actions. The script uses standard tools (curl) with proper quoting and error handling.
No concerns found
How this analysis is madeExamples
Deploy my app globally with Fly.io in US, Europe, and AsiaSet up a Fly.io staging environment that scales to zero when not in useDeploy my app to Fly.io but test on one machine first. If the health check fails, roll back.name: fly-io description: >- Assists with deploying applications globally on Fly.io edge infrastructure. Use when deploying Docker-based apps, configuring multi-region machines, setting up persistent storage, or managing global databases. Trigger words: fly.io, fly deploy, fly machines, fly launch, multi-region, edge deployment, flyctl. license: Apache-2.0 compatibility: "Requires flyctl CLI and a Fly.io account" metadata: author: terminal-skills version: "1.0.0" category: devops tags: ["fly-io", "deployment", "edge", "multi-region", "infrastructure"]
Fly.io
Overview
Fly.io deploys applications to Firecracker microVMs across 30+ edge regions worldwide, providing sub-50ms latency to users. It supports scale-to-zero machines, persistent NVMe volumes, LiteFS for multi-region SQLite replication, and private WireGuard networking between services.
Instructions
- When deploying applications, use
fly launchto auto-detect the framework and generate a Dockerfile, thenfly deployfor zero-downtime rolling updates with health checks. - When configuring scaling, use
auto_stop_machinesandauto_start_machinesinfly.tomlto scale to zero when idle and wake on incoming requests, and set machine sizing appropriate to the workload. - When managing multi-region deployments, use
fly scale count --regionto distribute machines,fly-replayheader to route writes to the primary region, and LiteFS for SQLite read replicas. - When handling persistent data, attach volumes for durable storage (machines are ephemeral), use LiteFS for multi-region SQLite, or Tigris for S3-compatible object storage.
- When connecting services, use
.internalDNS for private service-to-service communication over the WireGuard mesh and never expose internal services to the public internet. - When managing secrets, use
fly secrets set KEY=valuefor encrypted secret storage accessible as environment variables. - When troubleshooting, use
fly logsfor real-time streaming,fly ssh consoleto access running machines, andfly proxyto tunnel to internal services.
Examples
Example 1: Deploy a multi-region web application
User request: "Deploy my app globally with Fly.io in US, Europe, and Asia"
Actions:
- Initialize with
fly launchand configure Dockerfile - Deploy machines to three regions:
fly scale count 2 --region iad,cdg,nrt - Set up LiteFS for SQLite replication across regions
- Configure
fly-replayheader for write routing to the primary region
Output: A globally distributed app with read replicas in three regions and automatic write routing.
Example 2: Configure a cost-efficient staging environment
User request: "Set up a Fly.io staging environment that scales to zero when not in use"
Actions:
- Create a staging app with
fly launch - Configure
auto_stop_machines = "stop"andauto_start_machines = trueinfly.toml - Attach a volume for persistent database storage
- Set health checks with appropriate timeouts for routing
Output: A staging environment that stops idle machines and wakes in sub-second on the next request.
Example 3: Canary deployment with auto-rollback
User request: "Deploy my app to Fly.io but test on one machine first. If the health check fails, roll back."
Actions:
- Deploy with
--strategy canaryto spin up a single new machine - Health check the canary machine at the app's health endpoint
- If healthy, promote with
fly deploy --strategy rollingto replace all machines - If unhealthy, rollback with
fly releases rollback
#!/bin/bash
# deploy-canary.sh — Fly.io canary deployment with auto-rollback
set -euo pipefail
APP="${1:?Usage: deploy-canary.sh <app-name>}"
HEALTH_PATH="${2:-/api/health}"
echo "🐤 Deploying canary..."
fly deploy --app "$APP" --strategy canary --wait-timeout 120
HEALTH_URL="https://${APP}.fly.dev${HEALTH_PATH}"
HEALTHY=false
DEADLINE=$((SECONDS + 60))
while [ $SECONDS -lt $DEADLINE ]; do
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$HEALTH_URL" || true)
[ "$STATUS" = "200" ] && HEALTHY=true && break
sleep 3
done
if [ "$HEALTHY" = true ]; then
echo "✅ Canary healthy! Promoting..."
fly deploy --app "$APP" --strategy rolling
echo "🎉 Production deploy complete"
else
echo "❌ Canary failed! Rolling back..."
fly releases rollback --app "$APP"
echo "⏪ Rolled back"
exit 1
fi
Guidelines
- Use
auto_stop_machines = "stop"for dev/staging to save costs; machines stop after idle timeout. - Keep
auto_start_machines = trueso machines wake on incoming requests with sub-second cold start. - Use
.internalDNS for service-to-service calls; never expose internal services publicly. - Store persistent data on volumes, not the machine filesystem, since machines are ephemeral.
- Use LiteFS for SQLite apps needing multi-region reads; it is simpler than PostgreSQL replication.
- Set health checks with realistic timeouts; Fly Proxy uses them for routing, not just monitoring.
- Use
fly-replayheader for write operations in multi-region setups to route to the primary region.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/global-deployment-on-fly-io-mmh8qruj/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/global-deployment-on-fly-io-mmh8qruj' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/global-deployment-on-fly-io-mmh8qruj/download' --output '.skill-downloads/global-deployment-on-fly-io-mmh8qruj/SKILL.md.part' && mv '.skill-downloads/global-deployment-on-fly-io-mmh8qruj/SKILL.md.part' '.skill-downloads/global-deployment-on-fly-io-mmh8qruj/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Environment declared by the author: Requires flyctl CLI and a Fly.io account
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/global-deployment-on-fly-io-mmh8qruj/SKILL.md' && test -s '.skill-downloads/global-deployment-on-fly-io-mmh8qruj/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/fly-io' && cp -R '.skill-downloads/global-deployment-on-fly-io-mmh8qruj' '.claude/skills/fly-io'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/global-deployment-on-fly-io-mmh8qruj'openskills read 'global-deployment-on-fly-io-mmh8qruj'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/global-deployment-on-fly-io-mmh8qruj/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Configure a Chat Channel with SecretRefs
DevOps
Set up chat channels using non-interactive commands, with secrets only as SecretRefs. Covers gather, mutate, repair, and prove steps for reliable delivery.
Investigate ClickHouse CI Failures
DevOps
Investigate a ClickHouse CI failure end-to-end from a PR or S3 report URL. Fetches failed tests, classifies flaky vs real regression, and checks for existing issues/fixes.
Ansible PR Review
DevOps
Reviews an Ansible PR following the project's standardized process, including changelog checks, test coverage validation, and feedback tracking.