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

# ETL: Connecting to PostgreSQL

> Connect PostgreSQL databases to Integrate.io ETL for reading and writing data. Configure permissions, firewall rules, and connection settings.

* Create a user and grant it minimum permissions required for Integrate.io ETL to read or write data from the database.
* Allow access from [Integrate.io ETL's IP addresses](/etl/integrateio-etls-ip-list/) to your PostgreSQL database port (Refer to [this](/etl/allowing-integrateio-etl-access-to-my-server-behind-a-firewall/) article if you'd prefer to create an SSH tunnel or reverse SSH tunnel.)

<Frame>
  <iframe className="w-full aspect-video rounded-xl" src="https://fast.wistia.com/embed/iframe/c8n6s787zq" title="Allowing Integrate.io ETL access to PostgreSQL Databases" allow="autoplay; fullscreen" allowFullScreen />
</Frame>

## To create a PostgreSQL database connection in Integrate.io ETL

<Steps>
  <Step>
    Click the Connections icon (lightning bolt) on the top left menu.
  </Step>

  <Step>
    To create a connection, click **New connection**.

    <Frame>
      <img src="https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-72.webp?fit=max&auto=format&n=K1OxIkBgHF64pvnH&q=85&s=45b7fc927e1f0592f2d32f63e6a093a7" alt="New connection button in the Connections page" width="1200" height="830" data-path="images/connectivity-and-security/image-72.webp" />
    </Frame>
  </Step>

  <Step>
    Select PostgreSQL and name the connection.

    <Frame>
      <img src="https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-73.webp?fit=max&auto=format&n=K1OxIkBgHF64pvnH&q=85&s=b166f7597bd6390934b7f743810a7278" alt="Selecting PostgreSQL as the connection type" width="1200" height="830" data-path="images/connectivity-and-security/image-73.webp" />
    </Frame>
  </Step>

  <Step>
    Select your access type (direct connection if you've whitelisted Integrate.io ETL's IP addresses.)
  </Step>

  <Step>
    Enter your PostgreSQL database host name or IP address.
  </Step>

  <Step>
    Enter the database name.
  </Step>

  <Step>
    Enter the username.
  </Step>

  <Step>
    Enter the user's password.
  </Step>

  <Step>
    If you need to connect to PostgreSQL through **custom SSL certificate**, check on custom SSL certificate. Then upload files of Certificate file, Private key, Ca Cert.
  </Step>

  <Step>
    Click **Test Connection** to make sure the connection details are correct.
  </Step>

  <Step>
    Click **Create connection** to create the connection.

    <Frame>
      <img src="https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-74.webp?fit=max&auto=format&n=K1OxIkBgHF64pvnH&q=85&s=0e54ebc7e7890e28784bcb5fbd62b583" alt="PostgreSQL connection configuration form with host, database, and credentials" width="1200" height="830" data-path="images/connectivity-and-security/image-74.webp" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/integrateio/K1OxIkBgHF64pvnH/images/connectivity-and-security/image-75.webp?fit=max&auto=format&n=K1OxIkBgHF64pvnH&q=85&s=c8eeb6aaf00c5b7213ab7a9405330661" alt="Successful PostgreSQL connection test confirmation" width="1200" height="830" data-path="images/connectivity-and-security/image-75.webp" />
    </Frame>
  </Step>
</Steps>
