App overview screenshotSQL and Database Guides
PostgresMySQL
Try our free SQL Client
Tools
Connecting to Postgres
Connecting to drivers
Installing Postgres
Setting up Postgres
Postgres   >   
Setting up Postgres   >   
Postgres on Heroku

How To Connect to a PostgreSQL Database on Heroku

Sign In to Heroku

Log in to the Heroku dashboard. You should see a list of your apps.

heroku-dashboard.png

In this example the app we want to connect to the database for is called arctype-db-test.

Find the Add on or Resource

Click into the app. In Heroku, database are attached to instances as Add-Ons but can also be accessed in the Resources page.

click-to-app.png

Open the Datastore Settings

You will open the datastore settings in a new tab and be greeted by an Overview screen. Click over to the Settings tab for the Datastore to see a link to Database Credentials.

addon-settings.png

Expand the Database Credentials Tab

To view the credentials for accessing Postgres, click the link to expand them.

database-credentials.png

Important: Heroku has encryption turned on by default so you will need to select SSL when using a SQL client like Arctype to connect to your Heroku Postgres database.

Want to ask for help on databases or SQL? Join our Discord community.