The below instructions are currently written for PowerSync Cloud. For self-hosted PowerSync instances, specify database connection details in the config file as documented here.
Postgres Provider Specifics
Select your Postgres hosting provider for steps to connect your newly-created PowerSync instance to your Postgres database:Supabase
Supabase
- In your Supabase Dashboard, click Connect in the top navigation bar, or open this link.
- Select Direct, keep Direct connection as the connection method, and copy the connection string, including the
[YOUR-PASSWORD]placeholder. - In the PowerSync Dashboard, select your project and instance and go to the Database Connection view.
- Select the Postgres tab.
- Paste the connection string into the URI field. PowerSync fills in the other connection fields from the URI.
- Change Username and Password to the
powersync_roleand password you created when you set up Supabase for PowerSync. See Source Database Setup. - Keep SSL Mode set to
verify-full. PowerSync trusts Supabase’s certificate by default, so you don’t need to add a server certificate. - Click Test Connection and fix any errors.
- Click Save Connection.
Enable Supabase Auth
- In the PowerSync Dashboard, go to the Client Auth view.
- Select Use Supabase Auth.
- If your Supabase project uses legacy JWT secrets, copy the JWT secret from your project’s JWT Keys settings into Supabase JWT Secret (optional). If your project uses JWT signing keys, leave this field empty. PowerSync configures your project’s signing keys automatically.
- Click Save and Deploy.
Troubleshooting
Supabase allows 5 replication slots on compute sizes up to Medium, and more on larger compute sizes. Supabase Realtime (unrelated to PowerSync) often uses one of them.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
AWS RDS
- In the PowerSync Dashboard, select your project and instance and go to the Database Connection view.
- Select the Postgres tab.
- Locate the connection details from AWS RDS:
- Copy the “Endpoint” value from the AWS Management Console.
- Paste the endpoint into the “Host” field in the PowerSync Dashboard.
- Complete the remaining fields: “Name”, “Host”, “Port”, “Database name”, “Username”, “Password” and “SSL Mode” are required. You can paste a connection string into the “URI” field to simplify this.
- “Name” can be any name for the connection.
- “Port” is 5432 for Postgres databases.
- “Username” and “Password” maps to the
powersync_rolecreated in Source Database Setup. - PowerSync has the AWS RDS CA certificate pre-configured —
verify-fullSSL mode can be used directly, without any additional configuration required.
- Click Test Connection and fix any errors.
- Click Save Connection.
Troubleshooting
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 example10.x.x.x or 172.31.x.x.AWS Aurora
AWS Aurora
- In the PowerSync Dashboard, select your project and instance and go to the Database Connection view.
- Select the Postgres tab.
- Use the cluster (writer) endpoint from the cluster’s details page in the RDS console as the “Host”. Aurora supports logical replication only from the writer. The cluster endpoint follows the writer through a failover. Do not use the reader endpoint or an instance endpoint.
- Complete the remaining fields:
- “Name” can be any name for the connection.
- “Port” is 5432 for Postgres databases.
- “Database name” is the database in your cluster to replicate.
- “Username” and “Password” maps to the
powersync_rolecreated in Source Database Setup. - PowerSync has the AWS RDS CA certificates pre-configured, so the default
verify-fullSSL mode works without additional configuration.
- Click Test Connection and fix any errors.
- Click Save Connection.
Troubleshooting
If you get an error such as “IPs in this range are not supported”, the host resolves to a private IP. Make the cluster publicly accessible, or connect through a Private Endpoint.If Sync Config validation fails withpostgres query failed, check the instance logs for the underlying error.If the logs show Hostname/IP does not match certificate's altnames, the server certificate does not cover the hostname in “Host”. Check that “Host” is your cluster endpoint. If you use a Private Endpoint, check that the target group behind it forwards to the current writer in the same cluster. Correct the hostname or update the target group as needed.Azure Postgres
Azure Postgres
- In the PowerSync Dashboard, select your project and instance and go to the Database Connection view.
- Select the Postgres tab.
- Fill in your connection details from Azure.
- “Name”, “Host”, “Port”, “Database name”, “Username”, “Password” and “SSL Mode” are required. You can also paste a connection string into the “URI” field to simplify data entry.
- “Name” can be any name for the connection.
- “Port” is 5432 for Postgres databases.
- “Username” and “Password” maps to the
powersync_rolecreated in Source Database Setup. - PowerSync has the Azure CA certificate pre-configured —
verify-fullSSL mode can be used directly, without any additional configuration required.
- Click Test Connection and fix any errors.
- If you encounter the error
"must be superuser or replication role to start walsender", ensure that you’ve followed all the steps for enabling logical replication documented here.
- If you encounter the error
- Click Save Connection.
Google Cloud SQL
Google Cloud SQL
- In the PowerSync Dashboard, select your project and instance and go to the Database Connection view.
- Select the Postgres tab.
- Fill in your connection details from Google Cloud SQL.
- “Name”, “Host”, “Port”, “Database name”, “Username”, “Password” and “SSL Mode” are required. You can paste a connection string into the “URI” field to simplify data entry.
- “Name” can be any name for the connection.
- “Port” is 5432 for Postgres databases.
- “Username” and “Password” maps to the
powersync_rolecreated in Source Database Setup. - The server certificate can be downloaded from Google Cloud SQL.
- If SSL is enforced, a client certificate and key must also be created on Google Cloud SQL, and configured on the PowerSync instance.
- Click Test Connection and fix any errors.
- Click Save Connection.
Neon
Neon
- In the PowerSync Dashboard, select your project and instance and go to the Database Connection view.
- Select the Postgres tab.
- Fill in your connection details from Neon.
- “Name”, “Host”, “Port”, “Database name”, “Username”, “Password” and “SSL Mode” are required. You can paste a connection string into the “URI” field to simplify data entry.
- “Name” can be any name for the connection.
- “Port” is 5432 for Postgres databases.
- “Username” and “Password” maps to the
powersync_rolecreated in Source Database Setup. - Note that if you’re using a self-signed SSL certificate for your database server, click the Download Certificate button to dynamically fetch the recommended certificate directly from your server.
- Also note if you get any error such as
server certificate not trusted: SELF_SIGNED_CERT_IN_CHAIN, click Download Certificate to attempt automatic resolution.
- Click Test Connection and fix any errors.
- Click Save Connection.
Fly Postgres
Fly Postgres
- In the PowerSync Dashboard, select your project and instance and go to the Database Connection view.
- Select the Postgres tab.
- Fill in your connection details from Fly Postgres.
- “Name”, “Host”, “Port”, “Database name”, “Username”, “Password” and “SSL Mode” are required. You can paste a connection string into the “URI” field to simplify data entry.
- “Name” can be any name for the connection.
- “Port” is 5432 for Postgres databases.
- “Username” and “Password” maps to the
powersync_rolecreated in Source Database Setup. - Note that if you’re using a self-signed SSL certificate for your database server, click the Download Certificate button to dynamically fetch the recommended certificate directly from your server.
- Also note if you get any error such as
server certificate not trusted: SELF_SIGNED_CERT_IN_CHAIN, click Download Certificate to attempt automatic resolution.
- Click Test Connection and fix any errors.
- Click Save Connection.
PlanetScale
PlanetScale
- In the PowerSync Dashboard, select your project and instance and go to the Database Connection view.
- Select the Postgres tab.
- Head to your PlanetScale database dashboard page at
https://app.planetscale.com/<ORGANIZATION>/<DATABASE_NAME>and click on the “Connect” button to get your database connection parameters.- In the PowerSync Dashboard, “Name”, “Host”, “Port”, “Database name”, “Username” and “Password” are required.
- “Name” can be any name for the connection.
- “Host” is the
hostconnection parameter for your database. - “Port” is 5432 for Postgres databases.
- “Username” and “Password” maps to the
powersync_rolecreated in Source Database Setup.- Important: PlanetScale requires your branch ID to be appended to your username. The username should be
powersync_role.<branch_id>. Your PlanetScale branch ID can be found on the same connection details page.
- Important: PlanetScale requires your branch ID to be appended to your username. The username should be
- SSL Mode can remain the default
verify-full.
- Click Test Connection and fix any errors.
- Click Save Connection.
Xata
Xata
- In the PowerSync Dashboard, select your project and instance and go to the Database Connection view.
- Select the Postgres tab.
- In your Xata dashboard, navigate to Overview -> Connect and copy the connection URI. Alternatively, use the Xata CLI and run
xata branch urlto obtain the URI and copy that. - Paste the connection details into the “URI” field in the PowerSync Dashboard.
- Click Test Connection and fix any errors.
- Click Save Connection.
Other / Self-hosted
Other / Self-hosted
- In the PowerSync Dashboard, select your project and instance and go to the Database Connection view.
- Select the Postgres tab.
- Fill in your connection details.
- “Name”, “Host”, “Port”, “Database name”, “Username”, “Password” and “SSL Mode” are required. You can paste a connection string into the “URI” field to simplify data entry.
- “Name” can be any name for the connection.
- “Port” is 5432 for Postgres databases.
- “Username” and “Password” maps to the
powersync_rolecreated in Source Database Setup. - Note that if you’re using a self-signed SSL certificate for your database server, click the Download Certificate button to dynamically fetch the recommended certificate directly from your server.
- Also note if you get any error such as
server certificate not trusted: SELF_SIGNED_CERT_IN_CHAIN, click Download Certificate to attempt automatic resolution. - Click Test Connection and fix any errors.
- Click Save Connection.
Make sure that your Postgres database allows access to PowerSync’s IPs — see Security and IP Filtering
- Postgres Source Database Setup
- Security & IP Filtering: TLS with Postgres
MongoDB Specifics
- In the PowerSync Dashboard, select your project and instance and go to Database Connection.
- Select the MongoDB tab.
- Fill in your connection details from MongoDB:
- Copy your cluster’s connection string from MongoDB and paste it into the URI field in the PowerSync Dashboard. PowerSync will automatically parse this URI to populate other connection details.
- The format should be
mongodb+srv://[username:password@]host/[database]. For example,mongodb+srv://admin:<db_password>@cluster0.abcde1.mongodb.net/powersync
- The format should be
- Enter your database user’s password into the Password field. See the necessary permissions in Source Database Setup.
- “Database name” is the database in your cluster to replicate.
- Copy your cluster’s connection string from MongoDB and paste it into the URI field in the PowerSync Dashboard. PowerSync will automatically parse this URI to populate other connection details.
- Click Test Connection and fix any errors. If have any issues connecting, reach out to our support engineers on our Discord server or otherwise contact us.
- Click Save Connection.
Make sure that your MongoDB database allows access to PowerSync’s IPs — see Security and IP Filtering
Azure DocumentDB Specifics
To connect to Azure DocumentDB (formerly Azure Cosmos DB for MongoDB vCore), use the same instructions as for MongoDB above. PowerSync detects DocumentDB automatically. Azure DocumentDB support is in alpha. See Azure DocumentDB for supported variants and limitations.MySQL Specifics
MySQL support is currently in a Beta release.
AWS Aurora
AWS Aurora
Before connecting, complete Aurora MySQL Setup.PowerSync deploys and configures an isolated cloud environment for you, which can take a few minutes to complete.
1
Open the Connection Settings
In the PowerSync Dashboard, select your project and instance and go to Database Connection. Select the MySQL tab.
2
Enter the Connection Details
Use the cluster (writer) endpoint as Host. Do not use the reader endpoint: Aurora MySQL binary logs are available only on the writer. The cluster endpoint follows the writer through a failover, while an instance endpoint does not. If the new writer has a different server UUID, PowerSync takes a new snapshot before resuming replication.Complete the remaining required fields:
- Name can be any name for the connection.
- Port is your cluster’s database port (
3306by default). - Database name is the default database to replicate.
- Username and Password are the credentials for the replication user created in Database User Configuration.
3
Test and Save the Connection
Click Test Connection and fix any errors. Click Save Connection.
Other / Self-hosted
Other / Self-hosted
- In the PowerSync Dashboard, select your project and instance and go to the Database Connection view.
- Select the MySQL tab.
- Fill in your MySQL connection details:
- “Name”, “Host”, “Port”, “Database name”, “Username”, “Password” are required.
- “Name” can be any name for the connection.
- “Host” the endpoint for your database.
- “Database name” is the default database to replicate. Additional databases are derived by qualifying the tables in your Sync Streams.
- “Username” and “Password” maps to your database user.
- Click Test Connection and fix any errors.
- Click Save Connection.
Make sure that your MySQL database allows access to PowerSync’s IPs — see Security and IP Filtering
SQL Server Specifics
SQL Server support is currently in a Beta release.
SQL Server support was introduced in version 1.18.1 of the PowerSync Service.
- In the PowerSync Dashboard, select your project and instance and go to the Database Connection view.
- Select the SQL Server tab.
- Fill in your SQL Server connection details:
- “Name”, “Host”, “Port”, “Database name”, “Username”, “Password” are required.
- “Name” can be any name for the connection.
- “Host” is the endpoint for your SQL Server instance.
- “Port” is typically 1433 for SQL Server (default port).
- “Database name” is the database you want to replicate. CDC should be enabled on this database.
- “Username” and “Password” maps to the database user created in Source Database Setup (e.g.,
powersync_user).
- Click Test Connection and fix any errors.
- Click Save Connection.
Make sure that your SQL Server database allows access to PowerSync’s IPs — see Security and IP Filtering
Convex Specifics
Before connecting PowerSync, add the requiredpowersync_checkpoints table and mutation to your Convex deployment. See Convex Source Database Setup.
- In the PowerSync Dashboard, select your project and instance and go to Database Connection.
- Select the Convex tab.
- Fill in your Convex connection details:
- Deployment URL is your Convex deployment URL, for example
https://<your-deployment>.convex.cloud. - Deploy key is the deploy key for the Convex deployment. In the Convex Dashboard, go to Settings → General and generate a deploy key with Custom permissions that include
deployment:data:view. The Deploy only option does not work for PowerSync replication.
- Deployment URL is your Convex deployment URL, for example
- Click Test Connection and fix any errors.
- Click Save Connection.
