Linking Neon as a source
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.
To link Neon:
- Go to the Data pipeline page and the sources tab in PostHog
- Click New source and select Neon
- Enter your Neon connection details. To find them, open your project in the Neon Console 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-poolerin 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.
- Host: The direct host for your Neon endpoint, e.g.
- 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.
- Click Link
PostHog then starts syncing your Neon data. You can see details and progress in the sources tab.
Configuration
| Option | Description |
|---|---|
Connection string (optional)Type: text Required: False | |
HostType: text Required: True | In the Neon Console, open your project and click Connect to see your connection details. Use the direct host, e.g. |
PortType: number Required: True | |
DatabaseType: text Required: True | |
UserType: text Required: True | |
PasswordType: password Required: True | |
SchemaType: text Required: False | |
Use SSH tunnel?Type: ssh-tunnel Required: False |
CDC sync
Because Neon uses the Postgres integration, you can also enable change data capture (CDC) sync. See the Postgres source documentation for details. CDC sync is currently in alpha.
To use CDC with Neon:
- 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.
- 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:
- During source setup, click Columns next to any table in the table picker.
- Clear the checkbox for any columns you don't want to sync.
- 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:
- Go to the sources tab and click your Neon source.
- Click Configure next to any schema.
- Under Columns, select which columns to sync.
See the Postgres source documentation 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_ownerrole.
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 |