> ## Documentation Index
> Fetch the complete documentation index at: https://elementary-devin-1782754750-bigquery-permissions-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect to Postgres

You will connect Elementary Cloud to Postgres for syncing the Elementary schema (created by the [Elementary dbt package](/data-tests/dbt/quickstart-package)).

### Create a user for Elementary cloud

On your dbt project, run:

```bash theme={null}
## Print the query you should run to generate a user
dbt run-operation create_elementary_user
```

This command will generate a query to create a user with the necessary permissions. Run this query on your data warehouse with **admin permissions** to create the user.

#### Permissions and security

Elementary Cloud doesn't require read permissions to your tables and schemas, but only the following:

* Read-only access to the Elementary schema.
* Access to read metadata in `INFORMATION_SCHEMA` (table metadata and query history), related to the tables in your dbt project.

It is recommended to create a user using the instructions specified above to avoid granting excess privileges.
For more details, refer to [security and privacy](/cloud/general/security-and-privacy).

This guide contains the necessary steps to connect a Postgres environment to your Elementary account.

### Create a user for Elementary cloud

On your dbt project, run:

```bash theme={null}
## Print the query you should run to generate a user
dbt run-operation create_elementary_user
```

This command will generate a query to create a user with the necessary permissions. Run this query on your data warehouse with **admin permissions** to create the user.

#### Permissions and security

Elementary Cloud doesn't require read permissions to your tables and schemas, but only the following:

* Read-only access to the Elementary schema.
* Access to read metadata in `INFORMATION_SCHEMA` (table metadata and query history), related to the tables in your dbt project.

It is recommended to create a user using the instructions specified above to avoid granting excess privileges.
For more details, refer to [security and privacy](/cloud/general/security-and-privacy).

### Fill the connection form

Provide the following fields:

* **Host**: The hostname of your Postgres account to connect to. This can either be a hostname or an IP address.
* **Port**: The port of your Postgres account to connect to. This is usually `5432`.
* **Database name**: The name of the database where your Elementary schema exist. e.g. `analytics`.
* **Elementary schema**: The name of your Elementary schema. Usually `[schema name]_elementary`.
* **User**: The name of the for Elementary user.
* **Password**: The password associated with the provided user.

### Add the Elementary IP to allowlist

Elementary IP for allowlist: `3.126.156.226`

### Connect via SSH tunnel

Elementary supports connecting via SSH or reverse SSH tunnel. Reach out to our team for details and support in this deployment.

### Need help with onboarding?

We can provide [support on Slack](https://elementary-data.com/community) or hop on an [onboarding call](https://savvycal.com/MaayanSa/df29881c).
