This guide provides step-by-step instructions to connect your Supabase Postgres database to Sequin.

Connect Sequin to your Supabase database

1

Get your database connection details

Login to Supabase and navigate to the database settings page (“Project Settings” > “Database”).

2

Copy your database connection details

In the “Connection string” section, copy the connection string for your database (e.g. postgresql://<username>:<password>@<host>:5432/<database>?sslmode=require).

3

Enter the connection details in Sequin

In Sequin web console, navigate to the “Databases” tab and click on the “Connect Database” button. Click the “Autofill with Connection String” button and paste the connection string you copied in the previous step.

Click “Autofill” to have Sequin prefill the connection details.

Your database password is not included in the Supabase connection string, so you’ll need to enter your password in the “Password” field.

4

Create a publication

In the Supabase SQL editor, execute the following SQL query to create a publication:

CREATE PUBLICATION sequin_pub FOR TABLE table1, table2, table3;

If you want to publish changes from all tables, you can use:

CREATE PUBLICATION sequin_pub FOR ALL TABLES;
5

Create a replication slot

Next, create a replication slot to capture changes from the publication:

SELECT pg_create_logical_replication_slot('sequin_slot', 'pgoutput');
6

Enter the replication slot details in Sequin

Back in the Sequin Console, enter the name of the replication slot (e.g. sequin_slot) and publication (e.g. sequin_pub) you just created. Then, name your database and click Create Database.

Create sinks to replace database webhooks and triggers

With your Supabase database connected to Sequin, you can create sinks to replace your database webhooks and triggers. Follow one of our guides below to get started:

Was this page helpful?