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

# DigitalOcean

> Connect your DigitalOcean Managed PostgreSQL database to VexiData.

## Prerequisites

* A [DigitalOcean](https://www.digitalocean.com) account with a managed PostgreSQL database cluster
* A [VexiData](https://vexidata.com) account

## Understanding DigitalOcean connection modes

DigitalOcean managed databases provide two connection modes:

|              | Connection Pool                    | Direct Connection                    |
| ------------ | ---------------------------------- | ------------------------------------ |
| **Port**     | `25061`                            | `25060`                              |
| **Best for** | Short-lived, on-demand connections | Persistent, long-running connections |
| **Host**     | Same host, different port          | Same host, different port            |
| **SSL**      | Required                           | Required                             |

<Tip>
  For VexiData, we recommend using a **Connection Pool**. VexiData connects on-demand when running queries, so a pool provides better performance and avoids hitting connection limits on your database.
</Tip>

## Connect DigitalOcean to VexiData

<Steps>
  <Step title="Get your DigitalOcean connection details">
    1. Log in to your [DigitalOcean Cloud Console](https://cloud.digitalocean.com)
    2. Go to **Databases** from the left sidebar
    3. Select the database cluster you want to connect
    4. On the cluster's **Overview** tab, find the **Connection Details** panel

    If using a **Connection Pool** (recommended):

    1. Go to the **Connection Pools** tab
    2. If you don't have a pool yet, click **Create Connection Pool** — choose a name, select the database, set the mode to **Transaction**, and pick a pool size
    3. Once created, click the pool name to view its connection details

    Copy the following values:

    | Parameter    | Direct Connection Example                                           | Connection Pool Example |
    | ------------ | ------------------------------------------------------------------- | ----------------------- |
    | **Host**     | `db-postgresql-nyc1-12345-do-user-123456-0.g.db.ondigitalocean.com` | Same as direct          |
    | **Port**     | `25060`                                                             | `25061`                 |
    | **Database** | `defaultdb`                                                         | Your pool name          |
    | **Username** | `doadmin`                                                           | `doadmin`               |
    | **Password** | Your database password                                              | Same as direct          |

    <Info>
      You can toggle between **Connection parameters** and **Connection string** views in the Connection Details panel. Use **Connection parameters** for easier copying.
    </Info>
  </Step>

  <Step title="Add VexiData to Trusted Sources">
    DigitalOcean managed databases restrict access by default using **Trusted Sources**. You must add VexiData's IP addresses to allow connections:

    * `46.101.71.122`

    To add it:

    1. Go to your database cluster's **Settings** tab
    2. Under **Trusted Sources**, click **Edit**
    3. Add the IP address
    4. Click **Save**

    <Note>
      Unlike Supabase and Neon, DigitalOcean enables Trusted Sources by default. Your connection **will fail** if you skip this step.
    </Note>
  </Step>

  <Step title="Add the connection in VexiData">
    1. Go to [Data Sources](https://vexidata.com/data-sources) in VexiData
    2. Click **PostgreSQL** to open the connection form
    3. Fill in the details:

    | Field            | Value                                                                                               |
    | ---------------- | --------------------------------------------------------------------------------------------------- |
    | **Display Name** | A name to identify this connection (e.g., "DO Production")                                          |
    | **Host**         | Your cluster's hostname (e.g., `db-postgresql-nyc1-12345-do-user-123456-0.g.db.ondigitalocean.com`) |
    | **Port**         | `25061` (pool) or `25060` (direct)                                                                  |
    | **Database**     | `defaultdb` or your connection pool name                                                            |
    | **Schema**       | `public` (default — change if your tables are in a different schema)                                |
    | **Username**     | `doadmin` (or your database user)                                                                   |
    | **Password**     | Your database password                                                                              |
  </Step>

  <Step title="Test and save">
    Click **Test & Save Connection**. VexiData will verify it can reach your database. Once connected, your schema will be analyzed automatically.
  </Step>
</Steps>

## Using a dedicated database user

DigitalOcean creates a default `doadmin` user with full admin privileges. For better security, consider creating a read-only user for VexiData:

1. Go to your database cluster's **Users & Databases** tab
2. Click **Add User** to create a new user
3. Grant `SELECT` permissions on the tables you want to query
4. Use this user's credentials when connecting in VexiData

## Troubleshooting

<AccordionGroup>
  <Accordion title="Connection timed out">
    * This is most commonly caused by missing **Trusted Sources**. Verify that VexiData's IP address (`46.101.71.122`) is listed in your cluster's **Settings** > **Trusted Sources**
    * Check that you're using the correct port — `25060` for direct connections, `25061` for connection pools
    * DigitalOcean uses non-standard ports. Make sure you didn't enter the default PostgreSQL port `5432`
  </Accordion>

  <Accordion title="Authentication failed">
    * Double-check your username and password from the DigitalOcean Connection Details panel
    * If using a connection pool, make sure the **Database** field contains the pool name, not the underlying database name
    * You can reset your user password from the **Users & Databases** tab
  </Accordion>

  <Accordion title="No tables visible after connecting">
    * If you connected through a **Connection Pool**, make sure the pool was created against the correct database
    * Confirm your tables are in the `public` schema. If they're in a custom schema, update the **Schema** field in VexiData
    * Check that your database user has `SELECT` permissions on the tables
  </Accordion>

  <Accordion title="SSL connection errors">
    * DigitalOcean requires SSL for all connections. VexiData handles this automatically, but if you see SSL-related errors, ensure you're connecting to the correct host and port
    * Verify the cluster is in a **Running** state in the DigitalOcean console
  </Accordion>
</AccordionGroup>
