Compose Database-as-a-Service Help and Documentation

Everything you need to know about Compose, Hosted or Enterprise, is here in our help system. Whether you run one database for your businesses' sole application or six different databases to support an entire corporation, we've got the information you need.

Connecting to PostgreSQL

PostgreSQL deployments come standard with one HAProxy portal providing a connection over HTTPS, and SSL secured with a self-signed certificate.

Language Guides

If you want to use a particular language, you can go directly to its dedicated page:

Connection Overview and Credentials

All the connection information you need to access your depolyment is on the Deployment Overview, under Connection Info.

Connection info panel from the Deployment Overview.

Connection info panel from the Deployment Overview.

By default, the deployment comes with an 'admin' username and password. 'admin' will have access to all the databases on your deployment. You may use this to connect, or you may create users on specific databases for more granular access control. More information is on the User Management for PostgreSQL page.

The deployment also comes with a defualt, 'compose' database. Again, you may use that database, or create your own as meets your needs.

Command-Line Interface - psql

psql is the command line tool to connect to Postgres. To use it, the PostgreSQL client tools will need to be installed on the local system. They can be installed by installing the full PostgreSQL package downloaded from, from your operating systems packages or on MacOS X with brew installed, run brew install postgresql).

You can read more about psql in the PostgreSQL documentation - reference - and a simple introduction in Postgres Guide.

On Compose, we make it simpler to connect by providing you with the command line you need to use in the Connection Info. The psql line just needs the username substituted in and for you to give the password when prompted.

Example `psql` connection string.

Example psql connection string.

Self-signed Certificate

The self-signed certificate can be found under the Connection Info on the Overview of your deployment. Click on the Show Certificate button to reveal the certificate; you may be prompted to re-authenticate for security.

To save a copy, open the certificate and copy it's contents. Paste them into an empty file and save with a .pem or .crt extension. Some language drivers, like python, will need a path to this file to be able to connect using SSL.

Still Need Help?

If this article didn't solve things, summon a human and get some help!

Connecting to PostgreSQL