How to access retool hosted postgres db on a 3rd party?

Hey All,

I'm using Retool's self hosted postgres db for an app I'm building. Is there a way to connect to that DB from another app? E.g pgAdmin 4 for example?

When I go view the db connection details I can't view the pass

Thanks,
Dimitri

Hey @Dimitri_Lianoudakis, yes there is a way! Here is one of our docs that explains how to set it up.

Thanks for the link @Blake_Reed . However, I don;t see that option when I follow the instructions. I was speaking with a dev I hired for this project and they're telling me that the db they setup in retool is a managed db and not a retool database.

Hey! Would you mind sharing more about how you're self-hosting Retool?

If you're referring storage database that stores app and user information for your instance, then the way to connect to that depends on whether you've externalized it. If not, you should be able to enter the container running the Postgres database to access it, though how you do so depends on your particular deployment.

If you're not referring to the storage database at all and it's something else let us know!

Hi @Dimitri_Lianoudakis,

If you're selfhosting using Docker of K8's and you're using the postgres container that shipped with Retool On-prem, you would need to expose the Postgres container to public to be able to access it or add a pgadmin container within the same environment where Retool is running.

As you dev said it is using a managed db, I suspect it is an external database in eg. Azure, AWS or Supabase. You should be able to connect to that db using the credentials your dev probably setup.

The documentation links to a page (Retool Database quickstart | Retool Docs) that contains this paragraph:

Retool Database for cloud-hosted organizations are are connected to the internet and can be accessed using the provided connection string.

The "connection string" link points to the same page, but there is no information about where to find the string. I have checked the settings of the Retool Hosted database but found nothing. Can you help?

1 Like

Hi @Edoardo_Polito, welcome back! :wave:

What you are reading on that doc is about Retool Database on Retool Cloud. It's showing how to connect to your Retool Database outside of Retool.

To do this, just go to your Retool Database by clicking 'Database' on the nav bar:

Then, click where it says Retool Database and this dropdown will show up:

The Postgres Connection URL is the connection string the doc is referring to. To see it, click the eye button on the far right.

The link on the doc seems to be redirecting to the right page when we click 'connection string': Access Retool Database tables externally | Retool Docs. Where you should see the following: