Skip to main content

Quick connect

Copy your connection string from the dashboard and use it directly:

Connection details

Find your connection credentials in the Rivestack dashboard under the Connection tab of your database or cluster.
Port 6432 applies to every dedicated plan — Solo, Starter, Growth and Scale — on a single node and after scaling to HA alike. Free shared databases use 5432. Copying the connection string from the dashboard always gives you the right one.

Connection string

Click the copy button next to each field in the dashboard to copy values to your clipboard.

SSL / TLS

All Rivestack connections require SSL. Unencrypted connections are rejected. Use sslmode=verify-full so the client also verifies the public CA chain and confirms that the certificate matches the database hostname. sslmode=require encrypts traffic but does not authenticate the server identity. No CA certificate download is needed, because Rivestack uses certificates signed by a trusted public CA.

Connect with psql

You’ll be prompted for your password. To include it inline:

Language examples

Using psycopg2

Using SQLAlchemy

HA cluster connections

For HA clusters, connections are routed through a load balancer that automatically directs traffic to the primary node. All connections use port 6432 — the same port a single-node cluster uses. Scaling up to HA adds the load balancer without changing your connection string: the hostname and port both stay as they were. The load balancer handles failover automatically, and your application reconnects to the new primary without changing connection details.

Connection limits

Troubleshooting

  • Verify your host, port, and credentials are correct.
  • Ensure you’re using sslmode=verify-full and the dashboard hostname, not a raw IP address.
  • Check that your host and port are correct.
All connections require SSL. Configure sslmode=verify-full and connect with the hostname shown in the dashboard. The certificate chains to a public CA, so no custom CA download is needed.
Free tier databases are limited to 15 connections. HA clusters support up to 100. Close idle connections or use connection pooling in your application.