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.
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
- Aiven Postgres
- AWS RDS Aurora
- AWS RDS Postgres
- Azure Postgres
- DigitalOcean Postgres
- EnterpriseDB BigAnimal Postgres
- Google Cloud SQL Postgres
- TimescaleDB
- YugabyteDB
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?
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?
How do I add an existing paid database to my Hasura Project?
Will upgrading my Heroku database cause downtime?
What plan should I upgrade to?
For more information on which Postgres features we support, check out this page.