UDP packets not reaching my app on port 3478 (Machines, LHR region)

I’m running an app deployed on Fly (Machines, not Nomad) that’s supposed to receive UDP packets on port 3478 (for STUN-style inspection). Everything appears to be configured correctly:

  • fly.toml includes a [[services]] block for protocol = "udp", internal_port = 3478
  • Logs show: ✅ UDP server listening on port 3478
  • App is deployed to the lhr region
  • App binds using Node.js dgram.createSocket('udp4') and listens on 0.0.0.0
  • IPv4 A record resolves fine via dig
  • I’ve tested sending UDP packets using nc -u and ncat, both directly to the IPv4 address

However, the app never receives any messages — the udpSocket.on("message") handler is never triggered, and nothing logs during tests.

I’ve also verified:

  • WebSocket server on port 8080 is working and logs properly
  • No errors are thrown when binding to UDP
  • No use of processes = ["app"] (I removed that line to be safe)

Is there something I might be missing for Machines in lhr to receive UDP traffic on 3478?

Thanks — happy to provide a repro or minimal config privately if needed.

Hi… This actually needs to be the special fly-global-services address, due to the eBPF magic, :honeybee:.

Overall, UDP is idiosyncratic and a little limited on the Fly.io platform. Most of the gotchas are covered here:

https://fly.io/docs/networking/udp-and-tcp/

Hope this helps a bit!

Thanks - that’s perfect - you’re a star! :dizzy:

1 Like