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
  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.

  1. 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.

  2. Paste this URI into the uri field under replication > connections in your configuration file, for example:

# config.yaml

replication:
  connections:
    - type: postgresql
      uri: postgresql://postgres:[YOUR-PASSWORD]@db.abc.supabase.co:5432/postgres
  1. Replace [YOUR-PASSWORD] with the password for the postgres user in your Supabase database.

  2. PowerSync has the Supabase CA certificate pre-configured — verify-full SSL mode can be used directly, without any custom certificates.

  3. Under client_auth enable Supabase Auth:

client_auth:
  supabase: true
AWS RDS

Add your connection details under replication > connections in your configuration file.

Notes:

  1. The Username and Password is the powersync_role created in Source Database Setup.

  2. 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