DNS Resolution Failure for .internal Hostname Between Apps

I’m experiencing DNS resolution failures between my Fly.io applications, preventing NGINX from connecting to my backend service. Here are the key details:

Apps Involved

  1. NGINX Proxy
  • App: x-realestate
  • Region: ams
  • Configuration: [nginx.prod.cd1.conf](pastebin link if available)
  1. Express Backend
  • App: x-realestate-server
  • Region: ams
  • Port: 8000 (confirmed listening on 0.0.0.0)

Issue

  • x-realestate-server.internal fails to resolve from the NGINX app:
dig x-realestate-server.internal
;; status: NXDOMAIN  # No DNS record found
  • Fly.io’s DNS (fdaa::3) responds but returns no answer.
  • Symptoms:
    • NGINX cannot proxy requests to the backend.
    • Fly.io health checks fall back to port 8080 (undesired).

Debugging Steps Taken

  1. Verified both apps are in the same org:
fly status -a x-realestate-server
fly status -a x-realestate
  1. Confirmed backend is running:
fly logs -a x-realestate-server | grep "Listening on"
# Output: Listening on 0.0.0.0:8000
  1. Tested DNS from NGINX container:
nslookup x-realestate-server.internal
# Error: "Can't find x-realestate-server.internal: No answer"
  1. Checked Fly.io network:
fly ips list -a x-realestate-server
# IPv6: fdaa:0:ac95:a7b:3f8:ad38:f036:2

Request

  1. Is there a known issue with .internal DNS resolution in ams?
  2. How can I force Fly.io to register the DNS record for x-realestate-server.internal?
  3. Fallback options? (e.g., hardcoding IPs in NGINX).

Logs & Configs:

Hi @yaniv :waving_hand:

Your app x-realestate-server does not seem to have a running machine. Machines that are not currently running will not be returned as part of responses to .internal queries.

If what you are looking for is to have x-realestate-server automatically started when x-realestate requests it, please note that this is only possible if you send requests through our proxy, and .internal addresses are explicitly not routed through our proxy. To have internally-routable proxied addresses, see Flycast.

Also, your fly.toml contains depends_on with .internal addresses. That is not a supported configuration.