> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Linking Supabase as a source Canonical URL: https://posthog.com/docs/data-pipelines/sources/supabase > **Cloud region:** This page uses US Cloud hosts. For an EU Cloud project, use `https://eu.posthog.com` instead of `https://app.posthog.com` (app host for links). ![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_9608fcca70) ![](https://res.cloudinary.com/dmukukwp6/image/upload/texture_tan_dark_a92b0e022d) Let AI connect your sources for you Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog. `npx @posthog/wizard warehouse` ![PostHog Wizard hedgehog](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png) ![](https://res.cloudinary.com/dmukukwp6/image/upload/wizard_3f8bb7a240.png)Let AI connect your sources for you The Supabase connector can link your Supabase database tables to PostHog. Supabase is built on top of Postgres, so this connector uses the same underlying integration as the [Postgres source](https://posthog.com/docs/data-pipelines/sources/postgres.md). **CDC sync is in alpha** Because Supabase uses the Postgres integration, you can also enable change data capture (CDC) sync. See the [Postgres source documentation](https://posthog.com/docs/data-pipelines/sources/postgres.md#sync-methods) for details. CDC sync is currently in **alpha**. We'd love to [hear your feedback](https://app.posthog.com/home#panel=support%3Afeedback%3A%3Alow%3Atrue). To link Supabase: 1. Go to the [Data pipeline page](https://app.posthog.com/data-management/sources) and the sources tab in PostHog 2. Click **New source** and select Supabase 3. Enter your Supabase connection details. To find your connection details, click **Connect** in the top bar of your Supabase dashboard, open the **Direct** tab, and pick **Session pooler** or **Direct connection** — the URL is shown at the bottom: - **Host:** The Session pooler hostname from Supabase, e.g. `aws-0-us-east-1.pooler.supabase.com`. Don't use the Project URL (`.supabase.co`) from your Supabase dashboard — that's the REST API endpoint, not a database host. Also avoid the direct database host (`db..supabase.co`) which is IPv6-only and not reachable from PostHog. - **Port:** The port your database is listening on. The default is `5432`. - **Database:** The name of the database. Supabase defaults this to `postgres`. - **User:** The pooler username in the format `postgres.` (e.g. `postgres.abcdefghijklmno`), or another database user with read access to the schemas and tables you want to sync. - **Password:** The password for the user. - **Schema:** (Optional) The schema where your tables are located. Leave blank to browse and sync tables from all schemas, or specify one to limit the selection. Supabase defaults this to `public`. 4. If you need to connect through an SSH tunnel, enable and configure it (optional): - **Tunnel host:** The hostname of your SSH server. - **Tunnel port:** The port your SSH server is listening on. - **Authentication type:** - For password authentication, enter your SSH username and password. - For key-based authentication, enter your SSH username, private key, and optional passphrase. - **Require TLS through tunnel?** - Whether to require TLS encryption through the SSH tunnel. Enabled by default. Disable if your database does not support TLS. 5. Click **Link** The data warehouse then starts syncing your Supabase data. You can see details and progress in the [sources tab](https://app.posthog.com/data-management/sources). ## Configuration | Option | Description | | --- | --- | | `Connection string (optional)` **Type:** text **Required:** False | | | `Host` **Type:** text **Required:** True | To get your connection string, click **Connect** in the top bar of your Supabase dashboard, open the **Direct** tab, and pick **Session pooler** or **Direct connection** — the URL is shown at the bottom. For standard syncs use the **Session pooler** host, e.g. `aws-0-.pooler.supabase.com`, with username `postgres.` — the direct host `db..supabase.co` is IPv6-only. For **change data capture (CDC)** you must use **Direct connection** instead and enable Supabase's **IPv4 add-on**, because logical replication doesn't work through the pooler. | | `Port` **Type:** number **Required:** True | | | `Database` **Type:** text **Required:** True | | | `User` **Type:** text **Required:** True | | | `Password` **Type:** password **Required:** True | | | `Schema` **Type:** text **Required:** False | | | `Use SSH tunnel?` **Type:** ssh-tunnel **Required:** False | | ## Selecting columns By default, PostHog syncs all columns from each table. To sync only specific columns: 1. During source setup, click **Columns** next to any table in the table picker. 2. Uncheck columns you don't want to sync. 3. Primary key columns and the incremental sync field (if configured) are always synced and cannot be disabled. You can also change column selection after setup: 1. Go to the [sources tab](https://app.posthog.com/data-management/sources) and click your Supabase source. 2. Click **Configure** next to any schema. 3. Under **Columns**, select which columns to sync. See the [Postgres source documentation](https://posthog.com/docs/data-pipelines/sources/postgres.md#selecting-columns) for details on resync behavior when adding columns. **SSL/TLS required for new sources** Supabase sources created after February 18, 2026 require SSL/TLS encryption for database connections. Supabase enforces SSL/TLS by default, so this is typically already in place. If you're connecting through an SSH tunnel, you can optionally disable TLS using the **Require TLS through tunnel?** toggle since the tunnel already encrypts the connection. > **Permissions** The Supabase source only requires read permissions on the schemas and tables you intend to sync. We recommend creating a dedicated read-only role in Supabase rather than using the default `postgres` superuser. **Row-level security may block syncs** Supabase enables [row-level security (RLS)](https://supabase.com/docs/guides/database/postgres/row-level-security) by default on many tables. RLS policies typically expect an authenticated application user, which PostHog's sync connection doesn't have. If a policy denies the read, PostHog stops retrying and disables the sync. To fix this, either add a permissive policy for PostHog's connecting role, grant the role `BYPASSRLS`, or remove the affected tables from the sync. See the [Postgres troubleshooting guide](https://posthog.com/docs/data-pipelines/sources/postgres.md#row-level-security-policy-or-custom-function-denied-the-read) for details. #### Inbound IP addresses We use a set of IP addresses to access your instance. To ensure this connector works, add these IPs to your inbound security rules: | US | EU | | --- | --- | | 44.205.89.55 | 3.75.65.221 | | 52.4.194.122 | 18.197.246.42 | | 44.208.188.173 | 3.120.223.253 | > **Note:** PostHog connects over IPv4. Don't paste the Project URL (`.supabase.co`) — that's the REST API endpoint, not a database host. Supabase's direct database host (`db..supabase.co`) is also IPv6-only, so you must use the **Session pooler** host instead. To find it, click **Connect** in the top bar of your Supabase dashboard, open the **Direct** tab, and select **Session pooler** — the URL is shown at the bottom.