Skip to main content
Version: v2.x

Connecting Hasura to a Heroku Postgres Database

Introduction

This guide explains how to connect a new or existing Postgres database hosted on Heroku to a Hasura instance, either on Hasura Cloud or self-hosted.

danger

In August of 2022, Heroku announced the deprecation of their free resources. Starting November 28th, 2022, if you have a Hasura Project connected to a free tier Heroku database, you'll need to either upgrade your Heroku account or migrate your database to a new database provider.

Connecting to Heroku

If you are interested in connecting to a Heroku database, our Heroku database integration guide walks you through each step.

Alternatives to Heroku

Hasura works well with popular database providers. Most of these providers offer generous free tiers. We have guides you can use to provision and connect a new database in a matter of minutes. You can check them out here.

If you're interested in migrating away from Heroku, our different cloud database providers have guides and documentation to help you:

Heroku-specific migration guides

General migration guides

FAQs regarding the deprecation of Heroku free resources

What should I do if I have a free Heroku Postgres database connected to my Hasura Project?
Following Heroku’s announcement of deprecation of free resources, you will have to either upgrade your Heroku database plan or move to a different database provider. Heroku also appears to not be responding to questions from free-tier users.

If you have URL sync enabled via our Heroku integration, you can follow these steps - after verifying your Heroku account with a credit card - to migrate your hobby-tier database to a paid tier.
What should I do if I have a paid Heroku Postgres database connected to my Hasura Project?
No other action is required from your end. Your Heroku database will continue to function as before with your Hasura Project.
How do I add an existing paid database to my Hasura Project?
Please follow the integration guide here.
Will upgrading my Heroku database cause downtime?
These docs on the Heroku site list the ways a user can upgrade their free Heroku database. As per Heroku’s documentation, it does seem to involve some application downtime for successful upgrade and migration.
What plan should I upgrade to?
Heroku Postgres plans and their specifications can be found here. Please choose a plan that would work best for your application.
Note

For more information on which Postgres features we support, check out this page!