Launch the app

Fly Launch helps you quickly deploy almost any kind of app using a Docker image. To learn more about the different ways to get your app ready to deploy, refer to Fly Launch.

For this example, you’ll use our pre-built Docker image, flyio/hellofly:latest, to create and deploy a demo app.

Every Fly Launch app uses a fly.toml config file to tell the system how to deploy it. Running fly launch to create a new app generates the fly.toml file, which will provide some useful defaults that you can tweak through a web interface before deploying the app.

To create the demo app, run:

fly launch --image flyio/hellofly:latest

You’ll get a summary of the defaults chosen for your app. For example:

Using image flyio/hellofly:latest
Creating app in /Users/username/my-app-name
We're about to launch your app on Fly.io. Here's what you're getting:

Organization: MyName                 (fly launch defaults to the personal org)
Name:         my-app-name            (derived from your directory name)
Region:       Secaucus, NJ (US)      (this is the fastest region for you)
App Machines: shared-cpu-1x, 1GB RAM (most apps need about 1GB of RAM)
Postgres:     <none>                 (not requested)
Redis:        <none>                 (not requested)

? Do you want to tweak these settings before proceeding? (y/N)

Type y at the prompt to open the Fly Launch page, where you can make changes to your app config.

For this example, you’ll probably want to change the app name and maybe the region to deploy in. App names need to be globally unique and can include only numbers, lowercase letters, and dashes.

Click Confirm Settings to confirm and deploy the demo app.

Then return to your terminal to view the progress of the app deployment. For example:

Waiting for launch data... Done
Created app 'my-app-name' in organization 'personal'
Admin URL: https://fly.io/apps/my-app-name
Hostname: my-app-name.fly.dev
Wrote config file fly.toml
Validating /Users/username/my-app-dir/fly.toml
Platform: machines
✓ Configuration is valid
==> Building image
Searching for image 'flyio/hellofly:latest' remotely...
image found: img_z1nr0lpjz9v5q98w

Watch your deployment at https://fly.io/apps/my-app-name/monitoring

Provisioning ips for my-app-name
  Dedicated ipv6: 2a09:8280:1::42:a8f4
  Shared ipv4: 66.241.124.213
  Add a dedicated ipv4 with: fly ips allocate-v4

This deployment will:
 * create 2 "app" machines

No machines in group app, launching a new machine
Creating a second machine to increase service availability
Finished launching new machines
-------
NOTE: The machines for [app] have services with 'auto_stop_machines = true' that will be stopped when idling

-------

Visit your newly deployed app at https://my-app-name.fly.dev/

Note: If you’ve just signed up, then you’ll also be prompted at some point for credit card payment information. Refer to Billing and Pricing for more details.

When you run a command, flyctl will look for a fly.toml file to find the name of the app to operate on, and for an app configuration to apply during deployment. For all the config options in fly.toml, see the Fly Launch configuration (fly.toml) reference.

Next: Check your app’s status