> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt

# Linking Neon as a source - Docs

Copy page

# Linking Neon as a source - Docs

![](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`

[Learn more](/wizard.md)

![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

**Alpha release**

This source is currently in **alpha**. The interface and available tables may change.

The Neon connector can link your Neon database tables to PostHog. Neon is serverless Postgres, so this connector uses the same underlying integration as the [Postgres source](/docs/cdp/sources/postgres.md).

To link Neon:

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 Neon
3.  Enter your Neon connection details. To find them, open your project in the [Neon Console](https://console.neon.tech) and click **Connect** – the connection details are shown there. Turn off the **Connection pooling** toggle to see the direct host:
    -   **Host:** The direct host for your Neon endpoint, e.g. `ep-cool-darkness-123456.us-east-2.aws.neon.tech`. Avoid the pooled host (the one with `-pooler` in it) – pooled connections work for standard syncs, but change data capture (CDC) requires the direct host.
    -   **Port:** The port your database is listening on. The default is `5432`.
    -   **Database:** The name of the database. Neon defaults this to `neondb`.
    -   **User:** A user with read access to the schemas and tables you want to sync. Neon defaults this to `neondb_owner`.
    -   **Password:** The password for the database 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. Neon 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**

PostHog then starts syncing your Neon 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: textRequired: False |
| HostType: textRequired: True | In the Neon Console, open your project and click Connect to see your connection details. Use the direct host, e.g. ep-cool-darkness-123456.us-east-2.aws.neon.tech — not the pooled host (the one with -pooler). Pooled connections work for standard syncs, but change data capture (CDC) requires the direct host, and you must enable logical replication in your Neon project settings first. Neon requires SSL, which PostHog uses by default. |
| PortType: numberRequired: True |
| DatabaseType: textRequired: True |
| UserType: textRequired: True |
| PasswordType: passwordRequired: True |
| SchemaType: textRequired: False |
| Use SSH tunnel?Type: ssh-tunnelRequired: False |

## CDC sync

Because Neon uses the Postgres integration, you can also enable change data capture (CDC) sync. See the [Postgres source documentation](/docs/cdp/sources/postgres.md#sync-methods) for details. CDC sync is currently in **alpha**.

To use CDC with Neon:

1.  Enable **logical replication** in your Neon project settings. Note that this can't be disabled once enabled, and keeping an active replication connection prevents your compute from suspending.
2.  Use the direct host (without `-pooler`) when setting up the source – logical replication doesn't work through the connection pooler.

## 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.  Clear the checkbox for any 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 Neon source.
2.  Click **Configure** next to any schema.
3.  Under **Columns**, select which columns to sync.

See the [Postgres source documentation](/docs/cdp/sources/postgres.md#selecting-columns) for details on resync behavior when adding columns.

> **Permissions** The Neon source only requires read permissions on the schemas and tables you intend to sync. We recommend creating a dedicated read-only role in Neon rather than using the default `neondb_owner` role.

Neon requires SSL/TLS for all connections, which PostHog uses by default.

#### 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 |

### Was this page useful?

HelpfulCould be better