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

# Supabase

Connect Supaboard to a Supabase project's underlying PostgreSQL database for direct querying, schema discovery, and AI-powered analysis.

# Before you connect

**Network access** — Supabase projects are accessible over the internet. You do not need to whitelist Supaboard IPs for the direct connection, but if your project has **network restrictions** enabled (under Project Settings → Network), add Supaboard's egress IPs there. The current IP list is shown inside the connector form under **Whitelist IPs**.

**SSL** — Supabase requires SSL for all direct database connections. Supaboard always connects with SSL to Supabase — there is no SSL toggle for this connector.

**Database user permissions** — Use the `postgres` superuser or create a dedicated read-only user. See [Recommended database user permissions](#recommended-database-user-permissions).

# Connection fields

| Field            | Default    | Required | Description                                             |
| ---------------- | ---------- | -------- | ------------------------------------------------------- |
| **Display Name** | —          | Yes      | Label shown in the Supaboard UI                         |
| **Host**         | —          | Yes      | Direct connection host (format: `db.xxxxx.supabase.co`) |
| **Port**         | `5432`     | Yes      | Direct connection port                                  |
| **Database**     | `postgres` | No       | Database name; auto-discovers available databases       |
| **User**         | `postgres` | Yes      | Database user                                           |
| **Password**     | —          | Yes      | Password for the database user                          |

> **SSL** — Supaboard always uses SSL when connecting to Supabase. No toggle is needed.

# Finding your connection details

## Supabase Dashboard

1. Open [supabase.com/dashboard](https://supabase.com/dashboard) and select your project.
2. Go to **Project Settings → Database**.
3. Under **Connection info**, find the **Direct connection** section.
4. Copy:
   * **Host** — format: `db.xxxxxxxxxxxxxxxxxxxx.supabase.co`
   * **Port** — `5432`
   * **Database name** — `postgres`
   * **User** — `postgres`
5. Your database **Password** is the one you set when you created the project. If you've lost it, go to **Database → Database Settings** and reset it.

> **Use the direct connection, not the Transaction Pooler.** The Transaction Pooler (port 6543) does not support schema discovery. Always use port `5432` with the `db.xxxxx.supabase.co` host.

**Documentation:** [Connecting to your database](https://supabase.com/docs/guides/database/connecting-to-postgres) · [Connection pooling](https://supabase.com/docs/guides/database/connection-pooling)

# Recommended database user permissions

The `postgres` user has full access and works out of the box, but for security it is best practice to create a dedicated read-only user:

```sql theme={null}
-- Create a read-only user
CREATE USER supaboard WITH PASSWORD 'strong_password_here';

-- Grant connection to the database
GRANT CONNECT ON DATABASE postgres TO supaboard;

-- Grant schema access (repeat for each schema you want to expose)
GRANT USAGE ON SCHEMA public TO supaboard;

-- Grant read access to all current tables
GRANT SELECT ON ALL TABLES IN SCHEMA public TO supaboard;

-- Grant read access to future tables automatically
ALTER DEFAULT PRIVILEGES IN SCHEMA public
  GRANT SELECT ON TABLES TO supaboard;
```

If you use multiple schemas (e.g. `auth`, `storage`), repeat the `GRANT USAGE` and `GRANT SELECT` steps for each schema you want to expose to Supaboard.

# Troubleshooting

| Error                              | Likely cause                             | Fix                                                                                        |
| ---------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------ |
| `password authentication failed`   | Wrong user or password                   | Verify credentials; reset the database password in **Project Settings → Database**         |
| `Connection refused` on port 5432  | Using pooler host/port instead of direct | Use host format `db.xxxxx.supabase.co` and port `5432`, not the pooler                     |
| `SSL required`                     | Supabase requires SSL                    | Supaboard uses SSL automatically — this error should not occur; contact support if it does |
| Schema discovery returns no tables | User lacks schema USAGE or SELECT grants | Run the grant SQL above for the `supaboard` user                                           |
| `project is paused`                | Free-tier Supabase project is paused     | Visit the Supabase Dashboard and resume the project                                        |
