Skip to content
Latchkey

flyctl scale, status and ssh: Operate Fly Apps

flyctl scale changes how many machines and what size an app runs, flyctl status shows the app's machines, and flyctl ssh console runs commands inside one.

After a deploy you often scale, check status, or run a one-off command. These read cleanly in CI when you pass --app and parse JSON.

What it does

flyctl scale count sets the number of machines, flyctl scale vm sets the machine size/memory, flyctl status reports the running machines and their health, and flyctl ssh console opens a shell (or runs one command with -C) inside a running machine, for example to run database migrations.

Common usage

Terminal
flyctl scale count 3 --app my-app
flyctl scale vm shared-cpu-1x --memory 512 --app my-app
flyctl status --app my-app --json
# run a one-off command inside a machine
flyctl ssh console --app my-app -C "/app/bin/migrate"

Options

Command / flagWhat it does
scale count <n>Set the number of running machines
scale vm <preset>Set machine size (with --memory for RAM)
status --jsonMachine health and versions as JSON
ssh console -C <cmd>Run a single command in a machine and exit
--app <name>Target app

In CI

Use flyctl ssh console -C "..." for migrations or one-off tasks; it runs the command and exits instead of opening an interactive shell that would hang the job. Add --json to status when a later step needs to parse the result. FLY_API_TOKEN provides auth.

Common errors in CI

"Error: No access token available" means FLY_API_TOKEN is unset. "Error: app ... has no started VMs" from ssh console means nothing is running to connect to; deploy or scale up first. A hanging ssh step means you opened a shell without -C.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →