Are you running metabase within your Fly.io account, or elsewhere? We run these on private networks (which is good) which makes connecting external services more difficult (which is bad).
From your local machine, you can connect in a couple of ways:
fly pg connect # connects you with psql
fly proxy 15432:5432 # makes your database server available on localhost:15432
You will need to grab the username
and password
from your DB connection URL (we generate these when you create the DB, or run fly pg attach
).
Connecting from an external service is more difficult. The best external DB providers give you an agent you can run on your private network to give them access.
If you really, really need to open your database up to the public internet, you can do that with a config change and fly ips allocate-v4
.