This is how I’d set my database to be accessible on localhost.
On your terminal write the command:
$ fly proxy 6543:5432 -a app-name
Proxying local port 6543 to remote [app-name.internal]:5432
This command will expose the port 5432 from your app to your localhost:6543 (feel free to change this number)
On your Postico/Client app do this
The host should be localhost
and the port should be the one you choose (in my example 6543).
Read more: Fly Postgres · Fly Docs