Machine state vs. machine version state
Each Machine has a single Machine ID, but every change (like updating the image or resources) creates a new Machine version. It’s important to distinguish between:- Overall Machine state – represents the active version of the Machine.
- Machine version state – represents the state of a specific version of a Machine.
replaced.
Machine state types
Persistent states
These states remain until you take action (or something fails).Transient states
These are short-lived. The Machine will move to a new state automatically.Terminal states
These are final states that a Machine or its version won’t exit from.Machine state lifecycle diagrams
Overall Machine state lifecycle

Machine version state transitions

Update and versioning behavior
When you update a Machine:- A new Machine version is created with the updated configuration.
- The previous version is marked as
replaced. - The new version becomes the active version and:
- May stay in
createdifskip_launchis set to true. - May transition to
startedby default. - May transition to
stopped, depending on how the update was triggered and the config used.
- May stay in
skip_launch is explicitly set. This flag allows you to create or update a Machine without starting it immediately.
If you query an old version by version ID, you may see replaced. To always get the current state, query the Machine without specifying a version.
Diagnosing stuck Machines
If a Machine stays in a transient state for an extended time, it might be stuck (“wedged”). The following thresholds can help you decide:starting,stopping,restarting, ordestroying> 5 minutes (this can depend on the configuredkill_timeout)updating> 10 minutes
- Check machine events via the Machines API.
- Try stopping and starting the Machine.
- If needed, contact Fly.io support with the Machine ID.
Important Machine state considerations
replacedapplies only to old versions and is terminal for that version. If you query an older version by ID, the API will always returnreplacedfor that version, even if the Machine is currently running.migratedindicates the Machine was moved to a new host and is no longer active.- Machines in
suspendedpreserve memory and disk state, and resume faster thanstopped. - The
launch_failedstate is usually unrecoverable and transitions todestroyed. - Machines in
failedmay be recoverable. You can try restarting, stopping, or destroying them.