flyctl(1)
Command-line interface for Fly.io, managing applications, deployments, and infrastructure on the Fly platform.
Synopsis
flyctl [COMMAND] [OPTIONS]Description
Flyctl is the official CLI tool for Fly.io, a platform for running full-stack applications globally. It handles application deployment, configuration management, secrets, volumes, monitoring, and machine lifecycle operations across Fly's distributed infrastructure.
Authentication is managed through API tokens stored in ~/.fly/credentials.yml. Most commands require an app context, either from a fly.toml file in the current directory or specified with the -a flag.
Common options
| Flag | What it does |
|---|---|
-a, --app NAME | Specify the Fly app name to operate on |
-c, --config PATH | Path to the fly.toml configuration file |
-t, --token TOKEN | Fly API authentication token (or use FLY_API_TOKEN env var) |
-o, --org NAME | Specify the Fly organization context |
--debug | Print debugging output including HTTP requests |
-h, --help | Show help information for the command |
--json | Format output as JSON for scripting |
-v, --verbose | Enable verbose output with additional details |
Examples
Authenticate with Fly.io using your browser or API token
flyctl auth loginCreate a new Fly app and generate a fly.toml configuration file in the current directory
flyctl launchBuild and deploy the current application to Fly.io
flyctl deployCheck the deployment status and machine health of the app named 'myapp'
flyctl status -a myappSet an encrypted environment secret for the app
flyctl secrets set DATABASE_URL='postgres://...' -a myappStream application logs in real-time with tail-like behavior
flyctl logs -a myapp --followOpen the app's URL in your default web browser
flyctl open -a myappScale the app to 3 running machines
flyctl scale count=3 -a myapp