Self Hosting
- Getting Started
- Installation
- Local Development
- Lifecycle / Maintenance
- Enterprise
- Appendix
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).
-
In your Supabase Dashboard, click Connect in the top bar:
- Under Direct connection, 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
- Under Direct connection, copy the connection string. The hostname should be
-
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 Authentication:
client_auth:
supabase: true
supabase_jwt_secret: [secret]
For more details, see Supabase Auth.
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.
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.
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.
Add your connection details under replication
> connections
in your configuration file.
The Username and Password is the powersync_role
created in Source Database Setup.
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:
Add your connection details under replication
> connections
in your configuration file.
The Username and Password is the powersync_role
created in Source Database Setup.
Was this page helpful?