$linuxjunkies
>

flyctl(1)

Command-line interface for Fly.io, managing applications, deployments, and infrastructure on the Fly platform.

UbuntuDebianFedoraArch

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

FlagWhat it does
-a, --app NAMESpecify the Fly app name to operate on
-c, --config PATHPath to the fly.toml configuration file
-t, --token TOKENFly API authentication token (or use FLY_API_TOKEN env var)
-o, --org NAMESpecify the Fly organization context
--debugPrint debugging output including HTTP requests
-h, --helpShow help information for the command
--jsonFormat output as JSON for scripting
-v, --verboseEnable verbose output with additional details

Examples

Authenticate with Fly.io using your browser or API token

flyctl auth login

Create a new Fly app and generate a fly.toml configuration file in the current directory

flyctl launch

Build and deploy the current application to Fly.io

flyctl deploy

Check the deployment status and machine health of the app named 'myapp'

flyctl status -a myapp

Set an encrypted environment secret for the app

flyctl secrets set DATABASE_URL='postgres://...' -a myapp

Stream application logs in real-time with tail-like behavior

flyctl logs -a myapp --follow

Open the app's URL in your default web browser

flyctl open -a myapp

Scale the app to 3 running machines

flyctl scale count=3 -a myapp

Related commands