Connecting DBeaver to a Heroku Postgres Database

The process of linking DBeaver to a Heroku Postgres database was fairly straightforward, with the exception of an SSL setting that is not very intuitive. I wanted to document these steps here for my future self and others.

Find your Heroku Database Credentials

The exact steps are slightly different based on whether you are using a hobby or pro Postgres Addon, but the idea is the same.

  1. Go to your Heroku App
  2. Click on the Heroku Postgres Addon
  3. Go To Settings + Credentials

Heroku Postgres Addon










Create New Connection in DBeaver

  1. Open the New Connection Wizard
  2. Select PostgresSQL as your Connection Type and click Next
  3. Fill out the Host, Database, Port, User, and Password fields to match the Heroku Credentials
    Note: At this point, if you click Test Connection, you will see the connection fails with this message: “FATAL: no pg_hba.conf entry for host “X”, user “Y”, database “Z”, SSL off”  – we will need to go through one more step to setup SSL.
  4. Click Next on the Connection Wizard Prompt
  5. Go to the SSL Tab
  6. Check Enable SSL
  7. Set the SSL Factory to org.postgresql.ssl.NonValidatingFactory
  8. Test Connection again – it should now return “Success”
  9. Click Finish, and your DBeaver Connection to your Heroku Postgres Database should be all set

Thanks to cjunge-work for providing the answer in this issue

New DBeaver Connection

















Enter Heroku Credentials













DBeaver SSL Failure












SSL Config


















DBeaver Connection Success











Finish Connection














Connection Working

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.