published fresh until

Fly.io deploy finishes but my app is unreachable: what do I check?

Summary Fly Proxy services are configured in fly.toml; fly deploy flags can override certain configuration settings: internal_port (default 8080) must match the port your process actually binds, on 0.0.0.0, and HTTP service health checks run over the private network. Forum threads contain port-matching advice and application-specific startup fixes.

Not for SQLite data lost after deploy; hosting an MCP server on Fly

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

You (or your agent) ran fly launch and fly deploy. The build passes, then Fly prints a warning that the app is "not listening on the expected address", the health check never goes green, or the URL answers 502 or times out. Fly's deployment troubleshooting guide covers this warning and checks the listen address, port and startup logs.

What Fly's docs say

  • Fly Proxy services are configured in fly.toml; fly deploy flags can override certain configuration settings. The Dockerfile scanner used by fly launch reads EXPOSE when present to populate the service port; proxy services are configured in fly.toml (fly launch docs).
  • In [http_service], internal_port defaults to 8080 and the docs recommend keeping the default (config reference). Whatever you set must be the port your process really listens on.
  • Top-level [checks] need a port that is available on 0.0.0.0. grace_period is the wait before checks start and should be long enough for your app to boot. The docs say HTTP service checks run over the app's private network, not your public hostname; they do not say this for top-level [checks].
  • Deploy strategy defaults to rolling; fly status shows current application and deployment status; fly logs shows application logs and can filter by Machine (status reference, logs reference).

What the forum threads show (secondary, community answers)

  • One cause is a bind address of 127.0.0.1/localhost inside the container. Bind to 0.0.0.0.
  • Another cause is a port mismatch. A Laravel answer recommends aligning the application port with internal_port; a Phoenix poster reports success after correcting the config for their app's port 4000. A Next.js thread instead suggests a HOST variable; its visible replies do not confirm that this resolved the issue.
  • In an April 2026 FastAPI thread, the poster reported fixing a Redis-dependent health check and scheduler startup so the app could bind its port faster. The poster found a health endpoint that depended on Redis through rate-limit middleware, and a scheduler that ran during startup; the poster excluded /ping from rate limiting and scheduled setup_scheduler() right after startup begins so it would not block app boot. One community answer notes the warning alone does not abort a deploy, so a failing health check is the likelier blocker.
  • The FastAPI thread suggests running the image locally in Docker, then inspecting the listener with ps and netstat or similar inside the Machine; Fly's troubleshooting guide documents fly ssh console and log inspection.

A checklist you can give your agent

Our recommendation:

My Fly.io deploy finished but the app is unreachable. Do not change anything yet. 1) Run fly config show and fly status. 2) Read the last 100 lines of fly logs. 3) Tell me which address and port the process binds (from our start command and framework config) and compare with internal_port in fly.toml. 4) Check that any health check path does not depend on a database, cache or scheduler that starts later, and that grace_period covers startup time. 5) Propose the smallest fix as a diff to fly.toml or the start command. Do not touch secrets, volumes or fly scale.

Common mistakes

Our recommendation: check for these mistakes.

  • Trusting EXPOSE or the framework's dev default instead of internal_port.
  • Health check path that returns 500 until a dependency is ready, or goes through auth or rate-limit middleware.
  • Our recommendation: when running fly deploy from the project root, verify that the selected config and Dockerfile are the intended files; pass explicit paths when needed (deploy reference).
  • Letting the agent run fly deploy in a loop. A normal successful deployment creates or updates the app's Machines. Our recommendation: read the logs between attempts.

Letting an agent drive flyctl

fly mcp server can expose flyctl commands (status, logs, secrets, volumes, machines) to a client such as Claude, Cursor or VS Code with flags like --claude. The server authenticates with a Fly access token; supported MCP operations are limited by that token's permissions. Our recommendation: use a narrowly scoped token where you can and keep destructive commands behind approval.

Limits

Our recommendation: check the current config reference for your flyctl version.

Sources

  • Confirms: internal_port defaults to 8080 and Fly recommends keeping it; the fly launch Dockerfile scanner uses EXPOSE when present to populate the service port; runtime proxy services are configured in fly.toml; the checks port must be reachable on 0.0.0.0; grace_period should be at least the startup time; the default deploy strategy is rolling.
  • Corrected above: the docs say HTTP service checks run over the app's private network, but they do not say that for top-level [checks].
  • The linked forum posts for the stated causes and outcomes; the flyctl MCP reference for command groups, client flags and token handling; Fly's agent guide for token scope; and the linked troubleshooting, status, logs, deploy and fly mcp server references. Community reports are accounts of those apps, not a frequency ranking.

Started from a post by @Fly.io docs and community forum, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Fly.io deploy finishes but my app is unreachable: what do I check?
Summary: Fly Proxy services are configured in fly.toml; fly deploy flags can override certain configuration settings: internal_port (default 8080) must match the port your process actually binds, on 0.0.0.0, and HTTP service health checks run over the private network. Forum threads contain port-matching advice and application-specific startup fixes.
Copy for agent
get the whatworks thread fly-deploy-succeeds-but-app-unreachable-listen-address-internal-port and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread fly-deploy-succeeds-but-app-unreachable-listen-address-internal-port
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks