Connect a PowerSync instance to your backend database.
This page covers PowerSync Cloud. For self-hosted PowerSync, refer to this section.
If you’ve previously created an instance in your project, you can create an additional instance by navigating to Manage instances and clicking Create new instance:
You can also create an entirely new project with its own set of instances. Click on the PowerSync icon in the top left corner of the Dashboard or on Admin Portal at the top of the Dashboard, and then click on Create Project.
Next
version of the Service, which may contain early access or experimental features. Always use the Stable
version in production.Each database provider has their quirks when it comes to specifying connection details, so we have documented database-specific and provider-specific instructions below:
Select your Postgres hosting provider for steps to connect your newly-created PowerSync instance to your Postgres database:
Supabase
From your Supabase Dashboard, select Connect in the top navigation bar (or follow this link):
In the Direct connection section, copy the complete connection string (including the [YOUR-PASSWORD]
placeholder)
Back in the PowerSync Dashboard, paste the connection string into the URI field. PowerSync will automatically parse this URI to populate the database connection details.
Update the Username and Password fields to use the powersync_role
and password you created when configuring your Supabase for PowerSync (see Source Database Setup).
Note: PowerSync includes Supabase’s CA certificate by default, so you can use verify-full
SSL mode without additional configuration.
Your connection settings should look similar to this:
PowerSync will now create an isolated cloud environment for your instance. This typically takes a minute or two.
You can update your instance settings by navigating to the Manage instances workspace, opening your instance options and selecting Edit instance.
Supabase is configured with a maximum of 4 logical replication slots, with one often used for Supabase Realtime.
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:
AWS RDS
powersync_role
created in Source Database Setup.verify-full
SSL mode can be used directly, without any additional configuration required.PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
If you get an error such as “IPs in this range are not supported”, the instance is likely not configured to be publicly accessible. A DNS lookup on the host should give a public IP, and not for example 10.x.x.x
or 172.31.x.x
.
Azure Postgres
powersync_role
created in Source Database Setup.verify-full
SSL mode can be used directly, without any additional configuration required."must be superuser or replication role to start walsender"
, ensure that you’ve followed all the steps for enabling logical replication documented here.PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
Google Cloud SQL
powersync_role
created in Source Database Setup.PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
Neon
powersync_role
created in Source Database Setup.server certificate not trusted: SELF_SIGNED_CERT_IN_CHAIN
, click “Download Certificate” to attempt automatic resolution.PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
Fly Postgres
powersync_role
created in Source Database Setup.server certificate not trusted: SELF_SIGNED_CERT_IN_CHAIN
, click “Download Certificate” to attempt automatic resolution.PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
PlanetScale
https://app.planetscale.com/<ORGANIZATION>/<DATABASE_NAME>
and click on the “Connect” button to get your database connection parameters.
host
connection parameter for your database.powersync_role
created in Source Database Setup.
powersync_role
.<branch_id>. Your PlanetScale branch ID can be found on the same connection details page.verify-full
.PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
For other providers and self-hosted databases:
Other / Self-hosted
powersync_role
created in Source Database Setup.server certificate not trusted: SELF_SIGNED_CERT_IN_CHAIN
, click “Download Certificate” to attempt automatic resolution.PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
mongodb+srv://[username:password@]host/[database]
. For example, mongodb+srv://admin:<db_password>@cluster0.abcde1.mongodb.net/powersync
PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
Also see:
PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
Connect a PowerSync instance to your backend database.
This page covers PowerSync Cloud. For self-hosted PowerSync, refer to this section.
If you’ve previously created an instance in your project, you can create an additional instance by navigating to Manage instances and clicking Create new instance:
You can also create an entirely new project with its own set of instances. Click on the PowerSync icon in the top left corner of the Dashboard or on Admin Portal at the top of the Dashboard, and then click on Create Project.
Next
version of the Service, which may contain early access or experimental features. Always use the Stable
version in production.Each database provider has their quirks when it comes to specifying connection details, so we have documented database-specific and provider-specific instructions below:
Select your Postgres hosting provider for steps to connect your newly-created PowerSync instance to your Postgres database:
Supabase
From your Supabase Dashboard, select Connect in the top navigation bar (or follow this link):
In the Direct connection section, copy the complete connection string (including the [YOUR-PASSWORD]
placeholder)
Back in the PowerSync Dashboard, paste the connection string into the URI field. PowerSync will automatically parse this URI to populate the database connection details.
Update the Username and Password fields to use the powersync_role
and password you created when configuring your Supabase for PowerSync (see Source Database Setup).
Note: PowerSync includes Supabase’s CA certificate by default, so you can use verify-full
SSL mode without additional configuration.
Your connection settings should look similar to this:
PowerSync will now create an isolated cloud environment for your instance. This typically takes a minute or two.
You can update your instance settings by navigating to the Manage instances workspace, opening your instance options and selecting Edit instance.
Supabase is configured with a maximum of 4 logical replication slots, with one often used for Supabase Realtime.
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:
AWS RDS
powersync_role
created in Source Database Setup.verify-full
SSL mode can be used directly, without any additional configuration required.PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
If you get an error such as “IPs in this range are not supported”, the instance is likely not configured to be publicly accessible. A DNS lookup on the host should give a public IP, and not for example 10.x.x.x
or 172.31.x.x
.
Azure Postgres
powersync_role
created in Source Database Setup.verify-full
SSL mode can be used directly, without any additional configuration required."must be superuser or replication role to start walsender"
, ensure that you’ve followed all the steps for enabling logical replication documented here.PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
Google Cloud SQL
powersync_role
created in Source Database Setup.PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
Neon
powersync_role
created in Source Database Setup.server certificate not trusted: SELF_SIGNED_CERT_IN_CHAIN
, click “Download Certificate” to attempt automatic resolution.PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
Fly Postgres
powersync_role
created in Source Database Setup.server certificate not trusted: SELF_SIGNED_CERT_IN_CHAIN
, click “Download Certificate” to attempt automatic resolution.PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
PlanetScale
https://app.planetscale.com/<ORGANIZATION>/<DATABASE_NAME>
and click on the “Connect” button to get your database connection parameters.
host
connection parameter for your database.powersync_role
created in Source Database Setup.
powersync_role
.<branch_id>. Your PlanetScale branch ID can be found on the same connection details page.verify-full
.PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
For other providers and self-hosted databases:
Other / Self-hosted
powersync_role
created in Source Database Setup.server certificate not trusted: SELF_SIGNED_CERT_IN_CHAIN
, click “Download Certificate” to attempt automatic resolution.PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
mongodb+srv://[username:password@]host/[database]
. For example, mongodb+srv://admin:<db_password>@cluster0.abcde1.mongodb.net/powersync
PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
Also see:
PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.