> For the complete documentation index, see [llms.txt](https://docs.stacksync.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stacksync.com/two-way-sync/connectors/postgres/authorize-postgres/heroku.md).

# Heroku

Find your Postgres Heroku connection string

For Heroku, use the "Postgres Heroku" connector.

#### 1. Go to <https://dashboard.heroku.com/apps>

#### 2. Open one of your apps

<figure><img src="https://2867423571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfJjIdV9cuW6K8asJjTPJ%2Fuploads%2FM3ONFbJENG0EnbIPHa1N%2Fimage.png?alt=media&amp;token=f420b033-4693-4465-9351-1c12b9dddc20" alt=""><figcaption></figcaption></figure>

#### 3. Open your database add-on

<figure><img src="https://2867423571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfJjIdV9cuW6K8asJjTPJ%2Fuploads%2FlnxP10jVaNUVmtc2erLb%2Fimage.png?alt=media&amp;token=9d46ecde-ba51-4e1c-a2a3-88e6430acb26" alt=""><figcaption></figcaption></figure>

#### 4. Go to settings and view Database credentials

<figure><img src="https://2867423571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfJjIdV9cuW6K8asJjTPJ%2Fuploads%2Fmr5lKJSEiCm1275dTPME%2Fimage.png?alt=media&amp;token=09f915d4-3fb7-4996-b1c8-4b166b43502a" alt=""><figcaption></figcaption></figure>

#### 5. Copy Connection URI

<figure><img src="https://2867423571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfJjIdV9cuW6K8asJjTPJ%2Fuploads%2F1cKk8F7s06WToOJ3KW5I%2Fimage.png?alt=media&amp;token=ddc95d7f-c014-4796-ad0b-78125ece30e7" alt=""><figcaption></figcaption></figure>

#### 6. Paste the connection URI into Stacksync to connect your database

<figure><img src="https://2867423571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfJjIdV9cuW6K8asJjTPJ%2Fuploads%2F9O1VnYURWS8tyTJ8LecH%2Fimage.png?alt=media&amp;token=8e835e01-345a-44ad-aeef-98f88682f0d8" alt=""><figcaption><p>Paste your connection URL to connect your database</p></figcaption></figure>

{% hint style="info" %}
For the Heroku connector, the user is required to have the **Create** privilege on the database.

This privilege can be enabled for the user using the following SQL query:

```sql
GRANT CREATE ON DATABASE database_name TO user_name;
```

{% endhint %}

Finally, click "Authorize App" to connect!

That's it, your Postgres Heroku instance is connected! 🎉
