Launch a New App on Fly.io
Fly Launch helps you configure and orchestrate your app.
To create a brand new app on Fly.io, run this command from the source directory of your project:
Here are the components of a successful launch, ready for the first deployment:
- A way to get a Docker image that we can use to get your app running on a Machine.
fly.tomlfile, created by
fly launchor provided by you, for your app’s Fly.io-specific configuration.
- Optional platform resources such as public IP addresses, Fly Volumes, app secrets, Fly Postgres clusters, and integrated resources like Upstash for Redis.
Depending on your project,
fly launch may be able to look at your app’s source code and get through that ingredient list, straight to a ready-to-deploy Fly App. This is most likely to work for frameworks on which Fly.io has people specializing full time. Right now that’s Elixir/Phoenix, Laravel, Rails, and Django, but we also have launch guides for other languages and frameworks.
Our best scanners furnish a Dockerfile from which your app’s image will be built. Some of our terrible older scanners may invoke buildpacks, which tend to be slow and brittle.
fly launch in a directory containing a working Django app (it happens to be the one from our Django getting-started example):
Scanning source code Detected a Django app Creating app in /flyio/hello-django We're about to launch your Django app on Fly.io. Here's what you're getting: Organization: MyName (fly launch defaults to the personal org) Name: hello-django (derived from your directory name) Region: Amsterdam, Netherlands (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? Yes ...
The flyctl Django scanner has taken ownership of the launch. You can tweak the basic settings on the Fly Launch web page and then run ‘fly deploy’ to deploy the new app. Visit our Django guide to see how that story will end. (Spoiler: it has a happy ending.)
You can nudge
fly launch to better suit your project.
fly launch how you want to get the Docker image for your app, using either the
--dockerfile option, or by catching the Dockerfile launch scanner’s attention with the presence of a Dockerfile in your project source directory. The Dockerfile scanner doesn’t do a lot of configuration, but it prevents other scanners from taking over.
The actual Docker image build (or image pull) for a Fly App takes place during deployment.
fly launch sets the stage by recording how to build, or get, the image, and both the first and all later deploys use that information.
You can provide your own
fly launch will offer to copy that configuration to a new app.
fly.toml sets a starting point for the app configuration, and in some cases a framework launch scanner might overwrite parts of it.
There are also a number of other options you can use to exert control over
fly launch doesn’t have a scanner that can set up your app automatically, it will still initialize a new Fly App in your Fly.io organization and provide you with a default app configuration that’s a reasonable starting point for a simple web app.
You can also perform an entirely manual “launch”, skipping all the launch scanners and full-service resource provisioning, using
fly apps create, a hand-crafted (or copied)
fly.toml, and step-by-step resource provisioning, followed by
If you’ve run
fly launch but haven’t deploy yet (hint: you can do this with
fly launch --no-deploy), or you deployed but want to make changes, then you can:
- change your configuration
- update your app source
- change or provision platform resources such as public IP addresses, Fly Volumes, app secrets, Fly Postgres clusters, or integrated resources like Upstash for Redis
And then deploy (or redeploy) with
After you deploy your app:
- Check up on it using one or more of the techniques in Get Information About an App.
- Get ready to go to production, read up on app availability and resiliency features, and learn how to scale the number of Machines or scale Machine CPU and RAM.
- Go deeper and do even more, at a lower level, with Machines.