You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. In the [PowerSync Dashboard](/usage/tools/powersync-dashboard) project tree (PowerSync Cloud), click on "**Create new instance**":
9
+
## Create a PowerSync Cloud Instance
9
10
10
-
<Frame>
11
-
<imgsrc="/images/usage-12.png"/>
12
-
</Frame>
13
-
14
-
1. Give your instance a name, such as "Todolist Testing".
15
-
2. Under the "**General**" tab, you can change the default cloud region from "US" to "EU", "JP" (Japan), or "AU" (Australia) if desired (more cloud regions are available, [contact us](/resources/contact-us) if you need a different region).
16
-
3. Under the **"DB Connections"** tab, click on the **+** icon.
11
+
<CreateCloudInstance/>
17
12
18
13
Each provider has their quirks when it comes to specifying connection details, so we have documented provider-specific instructions below.
19
14
@@ -22,37 +17,17 @@ Each provider has their quirks when it comes to specifying connection details, s
22
17
Select your Postgres hosting provider for steps to connect your Postgres database to the newly created PowerSync instance:
23
18
<AccordionGroup>
24
19
<Accordiontitle="Supabase">
25
-
1. Get your connection details from Supabase:
26
-
* In your Supabase dashboard, navigate to **"Project Settings"**\-> **"Database" -> "Connection string**" and select the "URI" tab.
27
-
* Uncheck the "**Display connection pooler**" checkbox. PowerSync needs to connect to the database directly and cannot use the pooler.
28
-
<Frame>
29
-
<imgsrc="/images/usage-13.avif"/>
30
-
</Frame>
31
-
* Copy the connection string. The hostname should be `db.<PROJECT-ID>.supabase.co`, and not, for example, `aws-0-us-west-1.pooler.supabase.com`.
32
-
* Paste this URI into the connection URI field.
33
-
* Enter the password for the `postgres` user in your Supabase database
34
-
* Supabase also [refers to this password](https://supabase.com/docs/guides/database/managing-passwords) as the _database password_ or _project password_.
35
-
* PowerSync has the Supabase CA certificate pre-configured — `verify-full` SSL mode can be used directly, without any custom certificates.
36
-
* If you want to query your database via the PowerSync dashboard, enable "_Allow querying in the editor?_".
37
-
1. Click **"Test Connection"** and fix any errors.
38
-
2. Under the **"Client Auth"** tab, enable **"Use Supabase Auth".**
39
-
3. Click **"Save".**
40
-
41
-
<Note>
42
-
The "Supabase Auth" setting no longer works for Supabase projects created after 25 November 2024. While we are working with Supabase on a fix, please apply this workaround: https://releases.powersync.com/announcements/important-notice-for-supabase-users-using-supabase-jwts
43
-
</Note>
20
+
<SupabaseConnection/>
44
21
45
-
PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
46
-
47
-
### Troubleshooting
22
+
### Troubleshooting
48
23
49
-
Supabase is configured with a maximum of 4 logical replication slots, with one often used for Supabase Realtime.
24
+
Supabase is configured with a maximum of 4 logical replication slots, with one often used for Supabase Realtime.
50
25
51
-
It is therefore easy to run out of replication slots, resulting in an error such as "All replication slots are in use" when deploying. To resolve this, delete inactive replication slots by running this query:
26
+
It is therefore easy to run out of replication slots, resulting in an error such as "All replication slots are in use" when deploying. To resolve this, delete inactive replication slots by running this query:
52
27
53
-
```sql
54
-
select slot_name, pg_drop_replication_slot(slot_name) from pg_replication_slots where active = false;
55
-
```
28
+
```sql
29
+
select slot_name, pg_drop_replication_slot(slot_name) from pg_replication_slots where active = false;
30
+
```
56
31
</Accordion>
57
32
<Accordiontitle="AWS RDS">
58
33
1.[Locate the connection details from RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER%5FConnectToPostgreSQLInstance.html):
<Framecaption="Video walkthrough of the integration guide.">
8
11
<iframewidth="1005"height="420"src="https://www.youtube.com/embed/eUcBCyPfVok?si=WFPfEp-86Dr_3qh_"title="YouTube video player"frameborder="0"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"referrerpolicy="strict-origin-when-cross-origin"allowfullscreen></iframe>
9
12
</Frame>
@@ -74,37 +77,11 @@ create publication powersync for table public.lists;
74
77
75
78
## Configure PowerSync
76
79
77
-
### Connect PowerSync to Your Supabase
78
-
79
-
1. In the [PowerSync dashboard](/usage/tools/powersync-dashboard) Project tree, click on "**Create new instance**":
80
-
81
-
<Frame>
82
-
<imgsrc="/images/integration-20.png"width="60%"/>
83
-
</Frame>
84
-
85
-
1. Give your instance a name, such as "Supabase Testing".
86
-
2. Under the "**General**" tab, you can change the default cloud region from US to EU, JP (Japan), or AU (Australia) if desired (more cloud regions are available, [contact us](/resources/contact-us) if you need a different region).
87
-
3. Under the "DB Connections" tab, click on the + icon.
88
-
4. Now we get the connection details from Supabase:
89
-
* In your Supabase dashboard, navigate to **"Project Settings"**\-> **"Database" -> "Connection string**" and select the "URI" tab.
90
-
* Uncheck the "**Display connection pooler**" checkbox. PowerSync needs to connect to the database directly and cannot use the pooler.
91
-
<Frame>
92
-
<imgsrc="/images/integration-21.png"/>
93
-
</Frame>
94
-
It is important to uncheck this checkbox
95
-
* Copy the connection string. The hostname should be `db.<PROJECT-ID>.supabase.co`, and not, for example, `aws-0-us-west-1.pooler.supabase.com`.
96
-
* Paste this URI in PowerSync the instance **URI** field.
97
-
* Enter 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_).
98
-
* PowerSync has the Supabase CA certificate pre-configured — `verify-full` SSL mode can be used directly, without any custom certificates.
99
-
1. Click **"Test Connection"** and fix any errors.
100
-
2. Under the **"Client Auth"** tab, enable **"Use Supabase Auth".**
101
-
3. Click **"Save".**
80
+
### Create a PowerSync Cloud Instance
81
+
<CreateCloudInstance />
102
82
103
-
<Note>
104
-
The "Supabase Auth" setting no longer works for Supabase projects created after 25 November 2024. While we are working with Supabase on a fix, please apply this workaround: https://releases.powersync.com/announcements/important-notice-for-supabase-users-using-supabase-jwts
105
-
</Note>
106
-
107
-
PowerSync deploys and configures an isolated cloud environment for you, which will take a few minutes to complete.
83
+
### Connect PowerSync to Your Supabase
84
+
<SupabaseConnection />
108
85
109
86
### Configure Sync Rules
110
87
@@ -676,19 +653,18 @@ Below is a list of known issues and limitations.
676
653
677
654
1. It's not currently possible to use the FlutterFlow Web Editor to test your app due to limitations with FlutterFlow.
678
655
2. When trying to compile any of the PowerSync Custom Actions, you will see errors — these can be safely ignored:
1. Using `watch()` queries creates a [StreamSubscription](https://api.flutter.dev/flutter/dart-async/StreamSubscription-class.html) and it's important to regularly call `.cancel()` on these to avoid multiple subscriptions for the same query running.
687
-
2. Deploying to the Apple App Store currently requires some workarounds due to limitations in FlutterFlow:
662
+
3. Using `watch()` queries creates a [StreamSubscription](https://api.flutter.dev/flutter/dart-async/StreamSubscription-class.html) and it's important to regularly call `.cancel()` on these to avoid multiple subscriptions for the same query running.
663
+
4. Deploying to the Apple App Store currently requires some workarounds due to limitations in FlutterFlow:
688
664
1. Download the code from FlutterFlow
689
665
2. Open the `Podfile` located in the `ios/`directory
690
666
3. The following option in the `Podfile` needs to be updated from `use_frameworks! :linkage => :static` to `use_frameworks!` (remove everything after the exclamation sign)
691
667
4. After removing that option, clean the build folder and build the project again.
692
668
5. You should now be able to submit to the App Store
693
-
3. Exporting the code from FlutterFlow using the "Download Code" action in FlutterFlow requires the same workaround listed in 4\. above.
694
-
4. Other common issues and troubleshooting techniques are documented here: [Troubleshooting](/resources/troubleshooting)
669
+
5. Exporting the code from FlutterFlow using the "Download Code" action in FlutterFlow requires the same workaround listed in 4\. above.
670
+
6. Other common issues and troubleshooting techniques are documented here: [Troubleshooting](/resources/troubleshooting)
**Note:** this guide uses the default `postgres` user in your Supabase account for replicating changes to PowerSync, since elevating custom roles to replication [has been disabled](https://github.com/orgs/supabase/discussions/9314) in Supabase. If you want to use a custom role for this purpose, contact the Supabase support team.
108
111
</Info>
109
-
## Configuring PowerSync
110
-
111
-
### Connect PowerSync to Your Supabase
112
-
113
-
1. In the [PowerSync Dashboard](/usage/tools/powersync-dashboard) Project tree, click on "**Create new instance**":
114
-
115
-
<Frame>
116
-
<imgsrc="/images/integration-2.png"width="60%" />
117
-
</Frame>
118
-
119
-
2. Give your instance a name, such as "Supabase Testing".
120
-
3. Under the "**General**" tab, you can change the default cloud region from US to EU, JP (Japan), or AU (Australia) if desired (more cloud regions are available, [contact us](/resources/contact-us) if you need a different region).
121
-
4. Under the **"DB Connections"** tab, click on the **+** icon.
122
-
5. Now we get the connection details from Supabase:
123
-
* In your Supabase dashboard, navigate to **"Project Settings"**\-> **"Database" -> "Connection string**" and select the "URI" tab.
124
-
* Uncheck the "**Display connection pooler**" checkbox. PowerSync needs to connect to the database directly and cannot use the pooler.
125
112
126
-
<Frame>
127
-
<imgsrc="/images/integration-3.png"/>
128
-
</Frame>
129
-
It is important to uncheck this checkbox
130
-
* Copy the connection string. The hostname should be `db.<PROJECT-ID>.supabase.co`, and not, for example, `aws-0-us-west-1.pooler.supabase.com`.
131
-
* Paste this URI in PowerSync instance URI field.
132
-
* Enter 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_).
133
-
* PowerSync has the Supabase CA certificate pre-configured — `verify-full` SSL mode can be used directly, without any custom certificates.
134
-
6. Click **"Test Connection"** and fix any errors.
135
-
7. Under the **"Client Auth"** tab, enable **"Use Supabase Auth".**
136
-
<Framecaption="PowerSync fetches the Supabase JWT key directly from the database.">
137
-
<imgsrc="/images/integration-4.png"/>
138
-
</Frame>
139
-
8. Click **"Save".**
113
+
## Configuring PowerSync
140
114
141
-
<Note>
142
-
The "Supabase Auth" setting no longer works for Supabase projects created after 25 November 2024. While we are working with Supabase on a fix, please apply this workaround: https://releases.powersync.com/announcements/important-notice-for-supabase-users-using-supabase-jwts
143
-
</Note>
115
+
### Create a PowerSync Cloud Instance
116
+
<CreateCloudInstance />
144
117
145
-
PowerSync deploys and configures an isolated cloud environment for you, which will take a few minutes to complete.
1. Copy the database connection details from Supabase:
3
+
* In your Supabase dashboard, navigate to **"Project Settings"**\-> **"Database" -> "Connection string**" and select the "URI" tab.
4
+
* Uncheck the "**Display connection pooler**" checkbox. PowerSync needs to connect to the database directly and cannot use the pooler.
5
+
<Framecaption="It is important to uncheck this checkbox">
6
+
<imgsrc="/images/integration-3.png"/>
7
+
</Frame>
8
+
* Copy the connection string. The hostname should be `db.<PROJECT-ID>.supabase.co`, and not, for example, `aws-0-us-west-1.pooler.supabase.com`.
9
+
* Paste this URI in PowerSync instance **URI** field.
10
+
* Enter the **Password** for the `postgres` user in your Supabase database.
11
+
* Supabase also [refers to this password](https://supabase.com/docs/guides/database/managing-passwords) as the _database password_ or _project password_.
12
+
* PowerSync has the Supabase CA certificate pre-configured — `verify-full` SSL mode can be used directly, without any custom certificates.
13
+
2. Click **"Test Connection"** and fix any errors.
14
+
3. Under the **"Client Auth"** tab, enable **"Use Supabase Auth"**:
15
+
<Framecaption="PowerSync fetches the Supabase JWT key directly from the database.">
16
+
<imgsrc="/images/integration-4.png"/>
17
+
</Frame>
18
+
4. Click **"Save".**
19
+
20
+
<Note>
21
+
The "Supabase Auth" setting no longer works for Supabase projects created after 25 November 2024. While we are working with Supabase on a fix, please apply this workaround: https://releases.powersync.com/announcements/important-notice-for-supabase-users-using-supabase-jwts
22
+
</Note>
23
+
24
+
PowerSync deploys and configures an isolated cloud environment for you, which will take a few minutes to complete.
0 commit comments