You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fly auth login # Log in
fly auth logout# Log out
fly auth whoami # Check identity
fly auth token # Print current token
App Management
fly apps list # List all apps
fly apps create <name># Create app (no deploy)
fly apps destroy <name># Destroy app permanently
fly status # App status + machines
fly open # Open in browser
fly releases # List deploy history
Deploying
fly launch # Interactive: create + first deploy
fly deploy # Deploy current directory
fly deploy --remote-only # Build on Fly (no local Docker)
fly deploy --image <image># Deploy specific image
fly deploy --strategy bluegreen # Bluegreen deploy
fly deploy --wait-timeout 120 # Wait up to 120s
Machines
fly machine list # List machines
fly machine status <id># Machine details
fly machine start <id># Start stopped machine
fly machine stop <id># Stop machine
fly machine restart <id># Restart machine
fly machine destroy <id># Delete machine
fly machine clone <id># Clone a machine
fly machine run <image># Run a one-off machine
Logs
fly logs # Live logs
fly logs -r ams # Filter by region
fly logs --instance <id># Specific machine
SSH
fly ssh console # SSH into a machine
fly ssh console -C "command"# Run command
fly ssh console -s # Select machine interactively
Secrets
fly secrets set KEY=val # Set a secret
fly secrets set K1=v1 K2=v2 # Set multiple
fly secrets unset KEY # Remove a secret
fly secrets list # List secret names
fly secrets import < .env # Import from file
Scaling
fly scale count 3 # 3 machines globally
fly scale count 2 --region lhr # 2 in London
fly scale vm shared-cpu-1x # Change VM size
fly scale memory 512 # Set memory (MB)
fly scale show # Show current scale
fly postgres create # Create DB cluster
fly postgres attach <db-app># Attach to current app
fly postgres connect -a <db-app># Open psql
fly postgres config -a <db-app># Show connection string
Networking
fly ips list # List IPs
fly ips allocate-v4 # Add dedicated IPv4
fly ips allocate-v6 # Add IPv6
fly ips release <ip># Release IP
fly certs list # List certs
fly certs add <domain># Add custom domain cert
fly proxy <port> -a <app># Tunnel to private app
WireGuard
fly wireguard create # Create WireGuard peer
fly wireguard list # List peers
fly wireguard remove <peer># Remove peer
Tokens
fly tokens create deploy -a <app># Deploy token
fly tokens create readonly -a <app># Read-only token
fly tokens list # List tokens
fly tokens revoke <id># Revoke token
Info
fly platform regions # List regions
fly platform vm-sizes # List VM sizes
fly config show # Show app config
fly config validate # Validate fly.toml
fly checks list # Health check status
fly dashboard # Open web dashboard
PRIMARY_REGION="ams"defhandle_write(request):
ifos.getenv("FLY_REGION") !=PRIMARY_REGION:
response=make_response("", 307)
response.headers["fly-replay"] =f"region={PRIMARY_REGION}"returnresponse# do the actual write