Configuring a Fly Application

Packaging your App

Fly can run apps that use our builders ([builder] in fly.toml), and almost any Docker image. For best results, try and keep Docker Images lightweight.

Network Setup

Your application runs in private virtual machines. It must listen for HTTP requests on port 8080.

Secrets

You can specify secrets for your application using the flyctl secrets command. These are encrypted, stored in vault, and made available to your application at runtime.

Set secrets

The flyctl secrets set command will set one or more application secrets then perform a release.

flyctl secrets set MY_SECRET=romance DATABASE_URL=postgres://example.com/mydb

These will be set as $MY_SECRET and $DATABASE_URL environment variables within your application processes.

Note: if a secret you set causes your app to crash within 30s, the release will fail and your app will continue to run with previous secrets.

Unset secrets

The flyctl secrets unset command will clear one or more secret values.

➜ flyctl secrets unset MY_SECRET DATABASE_URL

List secrets

flyctl secrets list
      NAME     |              DIGEST              |  DATE
+--------------+----------------------------------+---------+
  MY_SECRET    | b9e37b7b239ee4aefc75352fe3fa6dc6 | 17s ago
  DATABASE_URL | cdbe3268a82bfe993921b9cae2a526af | 17s ago

For security reasons, we allow read access to secrets.