Connecting to postgres from PGAdmin


I’m a newbie and I’d like to host a small 3-tier app that utilises a postgres back-end. So far I’ve created the postgres DB using this documentation but I haven’t been able to connect to it from PGAdmin/DBeaver/HeidiSql to be able to start setting data up. I think this might be because my ISP doesn’t support ipv6, and I haven’t forked out for the public ipv4 address - I’ve been trying to connect using the details in the connection string from the fly postgres create command. So, my question is, is it possible to connect an external UI to a flyio postgres DB without a public IP, and if so, how?!



You can use fly proxy instead:

fly proxy 9432:5432 your-app-name-db.flycast --bind-addr &

(Note the ampersand (&) to run this in the background.)

This will open port 9432 on your local computer and then forward any connections to there on over to your-app-name-db.flycast:5432. Hence, localhost:9432 is the thing to use in connection strings—wherever the former would have turned up.

(Aside: more persistent integration, beyond ad hoc UI sessions, will generally want either the public IP or a complete Wireguard tunnel.)