Connect to your cluster from a client app
You've created a cluster. Now what? You probably want to connect to it!
You can connect to Cloud Service clusters as you would any other Postgres database.
You can find all of the parameters you need to connect on the portal by selecting the name of your cluster on the Clusters page and then selecting the Connect tab.
Following are a few examples of connecting from common clients.
You can connect to your cluster using the client of your choice including:
psql
— Terminal-based client for Postgres- Other common database drivers.
- pgAdmin — Desktop or web UI client to inspect, monitor, manage, and query your cluster's databases.
Recommended settings for SSL mode
Different clients can have different default TLS/SSL modes (sslmode). For example, psql
defaults to prefer
, which means the client attempts to establish a TLS connection but falls back to non-TLS if the server doesn't support it. In the psql
example provided by EDB in the Quick Connect field, sslmode
is explicitly set to require
, which means the client attempts a TLS connection and fails if the connection to the server can't be encrypted.
For public connections and in most environments, EDB recommends setting sslmode
to verify-full
. This setting ensures that you connect to the server you specified and that the connection is encrypted.
Cloud Service generates certificates with LetsEncrypt, a widely trusted certificate authority. Your client machine might already have a bundled CA certificate for LetsEncrypt, for example, at /etc/ssl/certs/ca-certificates.crt
or /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
. If it doesn't, your client machine needs a CA certificate for Let's Encrypt. Once the CA certificate is in place on your client machine, configure the sslrootcert
parameter to its location, and set the sslmode
parameter to verify-full
to verify the certificate to fully validate the connection.
To view the encryption protocol being used for communication, connect to the cluster using psql
and use the conninfo
meta-command. In the case of Cloud Service, TLS (v1.2+) is supported: