Flycast - Private server 502 Bad Gateway

I got this to work. I had to update the flycast app .toml to the following

[http_service]
  internal_port = 3000
  auto_start_machines = true
  auto_stop_machines = true
  min_machines_running = 0
  processes = ["app"]

[[services]]
  internal_port = 3000
  protocol = "tcp"

  [[services.ports]]
    port = 3000
  	handlers = ["http"]

Thanks to Private networking on IPv6 - #3 by gajuro