> 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/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://3057949906-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDSqHwwR8lD3JUWz3E9NH%2Fuploads%2Fgit-blob-d17c75e784d5198ee037ad5e26f358ca73a8f950%2Fimage%20(208).png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3057949906-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDSqHwwR8lD3JUWz3E9NH%2Fuploads%2Fgit-blob-d97a08b0429e04df0a06dcf6935e352b41cb68c8%2Fimage%20(242).png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3057949906-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDSqHwwR8lD3JUWz3E9NH%2Fuploads%2Fgit-blob-94ba2a100eb998270d94b63e2552189bb98f5e01%2Fimage%20(216).png?alt=media" alt=""><figcaption></figcaption></figure>

#### 5. Copy Connection URI

<figure><img src="https://3057949906-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDSqHwwR8lD3JUWz3E9NH%2Fuploads%2Fgit-blob-a803a4c69066897d0e3098405bb61b2ab3b3ba3c%2Fimage%20(222).png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3057949906-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDSqHwwR8lD3JUWz3E9NH%2Fuploads%2Fgit-blob-5b6fe2fc17732d648fb82d2daccd93abe288b58d%2Fimage%20(110).png?alt=media" 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! 🎉
