Deployment
Creating Fly App
Deploy your application on Fly.io
When to use this page
- You are deploying a backend application on Fly.io.
- You need to initialize
fly.tomland create the base app resource.
Prerequisites
flyctlinstalled and authenticated.- Dockerfile available for the app (or buildpack-ready project).
- Target Fly organization selected.
Fly Apps are the core deployment unit on Fly.io. Each app runs as a micro-VM (Machine) in your chosen region.
Documentation: https://fly.io/docs/launch/create/

Key features
- Deploy Docker containers or buildpack-based apps
- Multi-region deployment support
- Built-in load balancing and TLS termination
- Auto-scaling based on demand
Step 1: Create app
Create a new Fly app using the CLI:
fly apps create <app-name> --org <org-name>- Make sure to select the correct organization
- Pick a primary region closest to your users
Step 2: Generate configuration
After creating the app, initialize the fly.toml configuration file:
fly launchThis will generate a fly.toml file where you can configure:
- App name and primary region
- Build settings (Dockerfile or buildpacks)
- HTTP service configuration and health checks
- VM size and scaling rules
Monorepo / Non-root Dockerfile
If your Dockerfile is not in the root of the repository (e.g. apps/api/Dockerfile in a monorepo), pass the --dockerfile flag:
fly launch --dockerfile apps/api/Dockerfile
fly deploy --dockerfile apps/api/DockerfileStep 3: Deploy
Once configured, deploy your application:
fly deployVerify
- Set any required secrets:
fly secrets set KEY=value - Verify the app is running:
fly status - Check logs:
fly logs
Troubleshooting
- Deploy fails with build errors: Confirm Dockerfile path and local build success.
- App starts but health checks fail:
Verify exposed port and health check settings in
fly.toml. - Wrong region selected: Update primary region and redeploy.