> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superblocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PostgreSQL

> Build apps with read and write access to a PostgreSQL database

export const IntegrationSuccess = ({integrationName}) => {
  return <p>
      <b>{integrationName} connected!</b><br />You can now use{" "}
      <a href="/building-with-clark">Clark to build</a> with {integrationName}.
    </p>;
};

export const Alert = ({type, title, children}) => {
  const variant = ["info", "success", "warning", "danger", "note"].includes(type) ? type : "note";
  return <div className={`alert alert--${variant}`}>
      <div className="alert-icon" />
      <div className="alert-content">
        {title && <div className="alert-title">{title}</div>}
        <div className="alert-body">{children}</div>
      </div>
    </div>;
};

## Setting up PostgreSQL

### 1. Add integration

Select **PostgreSQL** from the [integrations page](https://app.superblocks.com/integrations/postgres).

### 2. Configure settings

Fill out the form with the following settings:

| Setting | Required | Description |
| - | - | - |
| Name | <span className="table-checkmark">✓</span> | Name that will be displayed to users when selecting this integration in Superblocks |
| Host | <span className="table-checkmark">✓</span> | Hostname or IP address to connect to |
| Port | <span className="table-checkmark">✓</span> | Port to use when connecting to PostgreSQL |
| Database Name | <span className="table-checkmark">✓</span> | Name of database to connect to |
| Database Username | <span className="table-checkmark">✓</span> | Username to use to connect |
| Database Password | <span className="table-checkmark">✓</span> | Password for database username |
| Enable SSL | <span className="table-x">✗</span> | Connect using SSL |
| Use a self-signed SSL certificate | <span className="table-x">✗</span> | Provide <strong>Server CA</strong>, <strong>Client Key</strong>, and <strong>Client Cert</strong> |
| Use SSH Tunnel | <span className="table-x">✗</span> | Connect via an SSH tunnel. See configuration details <a href="/integrations/auth/database-connections#ssh-configuration">here</a>. |

### 3. Test and save

Click **Test Connection** to check that Superblocks can connect to the data source.

<Alert type="info">
  If using Superblocks Cloud, add these <a href="/enterprise/security/overview#ip-addresses">Superblocks IPs</a> to your allowlist (not necessary for Hybrid or Cloud-Prem deployments).
</Alert>

After connecting successfully, click **Create** to save the integration.

### 4. Set data tags

Optionally, configure different data tags for [separate development environments](/development-lifecycle/build/data-tags).

<Alert type="success">
  <IntegrationSuccess integrationName="PostgreSQL" />
</Alert>

## Troubleshooting

Check out our guide on [common errors across database integrations](/integrations/troubleshooting/troubleshooting-databases), in addition to [common Postgres connection issues](https://www.pgsclusters.com/docs/postgresql/Troubleshooting%20Connection%20Issues%20for%20PostgreSQL1605777396.html). If you are encountering an error that you don't see in the guide, or the provided steps are insufficient to resolve the error, please contact us at [help@superblocks.com](mailto:help@superblocks.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.