Expose postgres to external application

I’m trying to expose my postgres application to an app external to fly.io. I went through all of the steps here: External Connections · Fly Docs

Everything is fine until the very last step. I am able to get the hostname from running:

 fly info --app <my-app-db>

But when I run the last command:

psql "sslmode=require host=<pg-app-name>.fly.dev dbname=<db name> user=<username>"

I get this error:

psql: error: could not translate host name "<myapp-db>-db.fly.dev" to address: Unknown host

Does it matter that I’ve been using the postgres db internally/privately for a while and am now adding the external access?

It sounds like a DNS issue, your local psql might be having trouble figuring out your app-db.fly.dev domain.

Do you happen to have an IPv4 allocated on that DB app?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.