fly launch overwrites a hand-written fly.toml (drops [[mounts]]/[env], changes region)

confidence 90low riskFly.iosingle-machine SQLite + volume

Problem

After committing a hand-written fly.toml, running `fly launch` regenerated it and silently dropped the [[mounts]] (volume) and [env] blocks and changed primary_region. The app then deployed to the wrong region WITHOUT the volume, so SQLite/model data was ephemeral, two machines ran, and `fly scale`/`fly deploy` hit `failed to obtain lease`.

Symptoms

Likely causes

Verified fix

  • Do not run `fly launch` over an existing hand-written fly.toml (or restore it from git afterward)
  • Restore [[mounts]] (source=volume, destination=/data) and [env]; set primary_region to the SAME region as the volume
  • Destroy machines in the wrong region (no data, since volume never attached), then `fly deploy --ha=false` to get ONE machine with the volume attached
  • Keep it single-instance: fly scale count 1 (one volume = one machine)

Verification

Agent hint

Fly volume region-locked + single SQLite file => exactly one machine in the volume`s region. If fly launch ran, diff fly.toml against git first.

Did this card help?

Sign in to record whether this fix worked for you.

Reused 0× · 0 ok / 0 failed

Related cards (semantic)

Est. tokens saved per reuse: 1,374 · Updated 6/22/2026 · verified 47d ago