gui for a postgres db on fly io

Is there any gui for a postgres instance on flyio? I find it is extremely hard to test or otherwise interact with postgres instance on flyio.

We have an easy way for you to proxy your PG to a local port so you can use your own client like DBeaver (I like this one)

https://fly.io/docs/reference/postgres/#connecting-to-postgres-from-outside-fly

1 Like

@lubien are you part of the flyio team? if so, do you plan to produce video tutorials on how to handle different situations when using flyio? or some sample cases of how to set up a small services using flyio? just as a reference, supabase has tons of materials publicly available on how to set up various projects and how supabase can be used in various ways, that makes it feel so easy and convenient.

I understand that you target different audiences and flyio is for more advanced projects that involve experienced software developers but still every time I decide to learn fly io and give it another try I get stuck in various possible ways.

Here is the instruction from the docs you have referenced in your reply

flyctl postgres connect -a <postgres-app-name>

It is not clear what is <postgres-app-name>. Is it host name or what.

Here is the screenshot of my apps in the dashboard

How do I locate name of the project?

Any attempt to use names listed in the screenshot result in the message content of which is below

Error get app: Could not find App "still-dawn-4253.fly.dev"

We focus heavily on our docs and blog so I’m not aware if we are going to produce video content or focus on it anytime soon.

It is not clear what is . Is it host name or what.

It is the name of your app that contains the postgres db, still-dawn-4253-db.

As for what you want:

In case you want a CLI, run:

flyctl postgres connect -a still-dawn-4253-db

If you want to proxy your app so you can use DBeaver or other clients:

flyctl proxy 5432 -a still-dawn-4253-db

This will proxy the database to localhost:5432 so you can connect to it:

1 Like

Connected/proxied from terminal.

  • fly proxy 6543:5432 -a my-db-name-db

Tried to connect from dbeaver to db as shown in msg 5

FATAL: database “my-db-name-db” does not exist

What am I doing wrong?

The database name is separate from the app name. The database name will be generated when you attach the Postgres app to another app. You can try leaving the “Database” field blank and see if you can select a database once connected.

Thank you for your answer.

Yes, I had tried that before. The connection ‘works’, but the problem is that I don’t get anything under postgres/Schemes/public/Tables in DBeaver. I get the same result if I give DBeaver a random db name.

I might be slow on the terminology here. I don’t really understand what do you men when you say ‘attach the Postgres app to another app’.

Also, ‘see if you can select a database once connected.’ - not really sure how to go about it. I am using dbeaver community, it might lack things.

Besides, I managed to connect from vscode postgres extension, I can see all the tables but it (extension) comes with a horrible dev experience.

If you are using Fly Postgres (and not building your own server), you attach it to your app and that will create a new database automatically for that app.

You should be able to look at the connection settings you are using in VSCode and apply them the same way in DBeaver. I’m not familiar enough with DBeaver, but if you’re able to connect and view it in one app, but not another then probably just need to experiment a bit with DBeavers settings

1 Like

Thanks again. I appreciate it very much.