Fly.io "fly deploy" Fails - Release & Health Check Errors in CI
fly deploy built and pushed your image but the release did not become healthy - a release_command failed, the new machines failed their health/smoke checks, or the image could not boot - so Fly rolled the deploy back.
What this error means
fly deploy builds, then fails while releasing: a release command non-zero, machines never passing checks, or a boot failure. A real app error reproduces every run; a flaky health check or transient build push may pass on retry.
==> Release command failed, deployment aborted
Error: smoke checks for ... failed: the app appears to be crashing
Health check on port 8080 has failed. Your app is not respondingCommon causes
Release command or health check failure
A release_command (e.g. migrations) exited non-zero, or the app does not pass its configured health checks on the expected port within the grace period, so Fly aborts and rolls back.
Image cannot boot or wrong port
The container crashes on start, or internal_port in fly.toml does not match what the app listens on, so checks never succeed.
How to fix it
Read the release logs and fix the failure
- Inspect the failing release:
fly logsand the deploy output show the crash or failed check. - Confirm
internal_portinfly.tomlmatches the port the app binds. - Fix the
release_command(e.g. a failing migration) so it exits zero.
Align health checks with the app
Point the health check at a real path/port and give the app enough grace to start.
# fly.toml
[http_service]
internal_port = 8080
[[http_service.checks]]
path = "/healthz"
grace_period = "10s"How to prevent it
- Match
internal_portto the port the app actually listens on. - Give a real health-check path and a sensible grace period.
- Test the release command and image boot locally before deploying.