diff --git a/images/installation/supabase-connect-database.png b/images/installation/supabase-connect-database.png new file mode 100644 index 00000000..de8943e8 Binary files /dev/null and b/images/installation/supabase-connect-database.png differ diff --git a/images/installation/supabase-connection-string.png b/images/installation/supabase-connection-string.png new file mode 100644 index 00000000..dfd7363b Binary files /dev/null and b/images/installation/supabase-connection-string.png differ diff --git a/images/integration-3.png b/images/integration-3.png deleted file mode 100644 index d2ec8775..00000000 Binary files a/images/integration-3.png and /dev/null differ diff --git a/images/self-hosting-3.avif b/images/self-hosting-3.avif deleted file mode 100644 index 0d8c3958..00000000 Binary files a/images/self-hosting-3.avif and /dev/null differ diff --git a/self-hosting/appendix/database-connection.mdx b/self-hosting/appendix/database-connection.mdx index 8dba9efb..c0ed8f2f 100644 --- a/self-hosting/appendix/database-connection.mdx +++ b/self-hosting/appendix/database-connection.mdx @@ -8,27 +8,30 @@ Below, you can find provider-specific instructions to obtain connection details - 1. In your Supabase dashboard, navigate to **"Project Settings"** \-> **"Database" -> "Connection string**" and select the "URI" tab. - 2. Uncheck the "**Display connection pooler**" checkbox. PowerSync needs to connect to the database directly and cannot use the pooler. - - - - 3. Copy the connection string. The hostname should be `db..supabase.co`, and not, for example, `aws-0-us-west-1.pooler.supabase.com`. - 4. Paste this URI into the `uri` field under `replication` \> `connections` in your configuration file, for example: - - ```yaml - # config.yaml - - replication: - connections: - - type: postgresql - uri: postgresql://postgres:[YOUR-PASSWORD]@db.abc.supabase.co:5432/postgres - ``` - - 5. Replace `[YOUR-PASSWORD]` with the password for the `postgres` user in your Supabase database. - * Supabase also [refers to this password](https://supabase.com/docs/guides/database/managing-passwords) as the _database password_ or _project password_. - 6. PowerSync has the Supabase CA certificate pre-configured — `verify-full` SSL mode can be used directly, without any custom certificates. - 7. Under `client_auth` enable Supabase Authentication: + 1. In your Supabase Dashboard, click **Connect** in the top bar: + + + + + - Under **Direct connection**, copy the connection string. The hostname should be `db..supabase.co`, and not, for example, `aws-0-us-west-1.pooler.supabase.com`. + + + + + + - Paste this URI into the `uri` field under `replication` \> `connections` in your configuration file, for example: + ```yaml + # config.yaml + + replication: + connections: + - type: postgresql + uri: postgresql://postgres:[YOUR-PASSWORD]@db.abc.supabase.co:5432/postgres + ``` + 2. Replace `[YOUR-PASSWORD]` with the password for the `postgres` user in your Supabase database. + - Supabase also [refers to this password](https://supabase.com/docs/guides/database/managing-passwords) as the *database password* or *project password*. + 3. PowerSync has the Supabase CA certificate pre-configured — `verify-full` SSL mode can be used directly, without any custom certificates. + 4. Under `client_auth` enable Supabase Authentication: ```yaml client_auth: diff --git a/snippets/supabase-database-connection.mdx b/snippets/supabase-database-connection.mdx index e1a71414..bd1e4bf7 100644 --- a/snippets/supabase-database-connection.mdx +++ b/snippets/supabase-database-connection.mdx @@ -1,10 +1,14 @@ -1. Copy the database connection details from Supabase: +1. In your Supabase Dashboard, click **Connect** in the top bar: - - + + - * Copy the connection string. The hostname should be `db..supabase.co`, and not, for example, `aws-0-us-west-1.pooler.supabase.com`. + * Under **Direct connection**, copy the connection string. The hostname should be `db..supabase.co`, and not, for example, `aws-0-us-west-1.pooler.supabase.com`. + + + + * Paste this URI in PowerSync instance **URI** field. @@ -14,10 +18,6 @@ * PowerSync has the Supabase CA certificate pre-configured — `verify-full` SSL mode can be used directly, without any custom certificates. - * In your Supabase dashboard, navigate to **Project Settings** > **Database** > **Connection string** and select the "URI" tab. - - * Uncheck the **Display connection pooler** checkbox. PowerSync needs to connect to the database directly and cannot use the pooler. - 2. Click **Test Connection** and fix any errors. 3. Under the **Client Auth** tab, enable **Use Supabase Auth** and enter your Supabase **JWT Secret**: