Database Connection
This section is a work in progress.
Below, you can find provider-specific instructions to obtain connection details that you need to specify in your configuration file (see PowerSync Service Setup).
Supabase
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.
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
.Paste this URI into the
uri
field underreplication
>connections
in your configuration file, for example:
# config.yaml
replication:
connections:
- type: postgresql
uri: postgresql://postgres:[YOUR-PASSWORD]@db.abc.supabase.co:5432/postgres
Replace
[YOUR-PASSWORD]
with the password for thepostgres
user in your Supabase database.Supabase also refers to this password as the database password or project password.
PowerSync has the Supabase CA certificate pre-configured —
verify-full
SSL mode can be used directly, without any custom certificates.Under
client_auth
enable Supabase Auth:
client_auth:
supabase: true
AWS RDS
Add your connection details under replication
> connections
in your configuration file.
Notes:
The Username and Password is the
powersync_role
created in Source Database Setup.PowerSync has the AWS RDS CA certificate pre-configured —
verify-full
SSL mode can be used directly, without any additional configuration required.
Azure Postgres
Add your connection details under replication
> connections
in your configuration file.
Notes:
The Username and Password is the
powersync_role
created in Source Database Setup.PowerSync has the relevant Azure CA certificates pre-configured —
verify-full
SSL mode can be used directly, without any additional configuration required.
Google Cloud SQL
Add your connection details under replication
> connections
in your configuration file.
Notes:
The Username and Password is the
powersync_role
created 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 added to your
powersync.yaml
file.
Neon
Add your connection details under replication
> connections
in your configuration file.
The Username and Password is the powersync_role
created in Source Database Setup.
Fly Postgres
Add your connection details under replication
> connections
in your configuration file.
The Username and Password is the powersync_role
created in Source Database Setup.
For other providers and self-hosted databases:
Other / Self-hosted
Add your connection details under replication
> connections
in your configuration file.
The Username and Password is the powersync_role
created in Source Database Setup.
Last updated