Neon
Mirror your WorkOS data into Neon from your own host or a Neon Function.
Neon is hosted Postgres with branching, automatic scaling, and scale to zero. The sync engine uses the same @workos/sync-postgres destination as any other Postgres database.
The Neon integration guide in the sync engine repository covers database setup, connection strings, TLS, deployment, and branching.
Follow the Postgres guide with your Neon connection string as DATABASE_URL. Both direct and pooled connections work. Use sslmode=verify-full and preserve the other parameters in the connection string.
See Choose a connection and Run the sync from your own host for the exact setup.
You can also run the sync on the Neon branch itself, without operating a separate host. The Neon Functions template uses scheduled triggers for polling, backfill, and reconciliation. A verified WorkOS webhook can trigger an immediate poll, and a token-protected status endpoint reports the mirror’s health.
Follow Run the sync as a Neon Function for the template, environment variables, trigger configuration, and deployment commands.
A continuous listener or a tick every minute keeps Neon’s compute awake, so plan for continuous compute usage while syncing. A longer polling interval can let it suspend between polls, at the cost of more lag.
A Neon branch copies the mirror, cursor, checkpoints, and writer lease. A sync on the child resumes from that cursor for the same WorkOS environment rather than starting a new backfill. See Branches for lease timing and shared API rate limits.
Keep the workos schema out of Neon’s Data API unless you have designed the grants and row-level security for browser access. The mirror includes raw event payloads and deleted rows; see Query it.