Creating Connection to Heroku Cloud

Last modified: March 28, 2025

Heroku is a cloud platform as a service based on a managed container system. It supports multiple programming languages, has powerful integrated data services and mighty ecosystem that allows developers deploy and run modern apps. The dbForge Studio for PostgreSQL client has implemented support for Heroku.

Heroku app

Each Heroku Postgres database has a corresponding Heroku application. The database is attached to the Heroku app and can be accessed through an app config var that contains the database URL.

Create a database connection

  1. Open the Database Connection Properties dialog box by any of the following ways:
    • On the Database menu, select New Connection.
    • Click the New Connection button on the Database Explorer toolbar.
    • Right-click in the Database Explorer window and select New Connection on the menu.

    New Connection

  2. On the General tab, specify your database connection properties.
    • Host - the name or ip address of the PostgreSQL Server host.
    • Port - the TCP/IP port to connect to the PostgreSQL Server.
    • User - the name of the user account on the PostgreSQL Server.
    • Password - the password of the user account on the PostgreSQL Server.

To get all database connection properties from Heroku CLI, invoke your process as follows:

 DATABASE_URL=$(heroku config:get DATABASE_URL -a test-app)

To get all database connection properties from Heroku Console, go to the Settings tab and click the Reveal Config Vars button.

Reveal Config Vars

  1. Switch to the Security tab, check Use security protocol, and select Use SSL.

    Security tab - Use SSL

    Note

    You can specify the location of the certificates in the corresponding fields, but this is optional.

  2. (Optional) To test the created connection, click the Test Connection.

  3. Click OK to establish the database connection.