---
url: https://kit.kambium.net/docs/cloud-fly.md
---
# Fly.io

Host your backend and dashboard together on Fly.io and give each environment
its own runtime secrets.

Set the top-level `app` in your [Fly environment file](https://kit.kambium.net/docs/setup.md) to a globally
unique name. In **Cloud → Fly**, select that environment and connect
your Fly account. If the app does not exist, select a Fly organization and
create it from Desktop. You can also choose **Select existing Fly app** to update
the app name in the selected environment's TOML file. Review the backend and
dashboard URLs before deploying. If you use Doppler, update its Fly sync to
point at the selected app.

## Connect Redis

Use **Cloud → Redis** to connect an
existing Upstash database in the Fly app's organization or create a new one.

New databases are billed through your Fly account. Review the price and primary
region before creating one. The primary region is fixed after creation.

![Desktop reviewing the environment, region and plan before creating a Redis database](https://kit.kambium.net/docs/assets/fly-redis-2026-11-28-1376x953.Cvru92iR.webp)

Desktop saves the Redis URL to the environment's secrets provider. It generates a
cache encryption key during setup if one is missing. Existing keys are kept.
If you use Doppler, let its sync reach Fly before [deploying](https://kit.kambium.net/docs/deployment.md).
For another Redis host, enter its connection URL in
[Configuration](https://kit.kambium.net/docs/environment-variables.md#redis).

::: details Redis creation was interrupted

Check whether the database was created before retrying. If it exists, connect
that database instead of creating another. Dismissing an interrupted attempt
leaves any created database in Fly; setup does not delete it.

:::

::: details Set up without Desktop

With Fly CLI installed, run:

```sh
fly auth login
fly apps create YOUR_FLY_APP
```

Use the name from your Fly TOML file. For an existing Fly app, use its name in
that file. Continue with [Deploy to Fly](https://kit.kambium.net/docs/deployment.md).

Desktop and the terminal have separate Fly logins, so terminal commands still
require terminal authentication.

:::

<span id="connect-and-select-an-application"></span>
<span id="align-the-deployment-target"></span>
<span id="read-status-and-deploy"></span>

::: details Redis networking for hosted development

Fly's private Redis address is reachable within your Fly organization. For
hosted development outside Fly, use Redis reachable from that environment.
[Fly's Redis guide](https://docs.fly.io/upstash/redis)

:::

::: details Application creation was interrupted

Check whether the app was created before retrying. If it exists, associate it
with your environment instead of creating another. Choosing a different app does
not delete the first one.

:::
