Connect to your database

Last updated: March 3, 2026

Open the Connection tab to find your credentials and endpoints.

Endpoints

By default, no endpoints are exposed. You must enable a load balancer in Settings before connection details appear.

Endpoint typeAccessHow to enable
PublicAccessible from the internetEnable Public Load Balancer in Settings
PrivateAccessible within your private network onlyEnable Private Load Balancer in Settings

Recommendation: Use a private endpoint for production workloads. Expose a public endpoint only when needed, and restrict access with firewall rules.

Credentials

FieldValue
Usernamepostgres (PostgreSQL default)
PasswordRevealed via Show Password in the Connection tab

Connection string examples

Once your endpoint is active, connect using standard database tooling.

psql (PostgreSQL)

bash
psql -h <your-endpoint> -U postgres -d <database-name>

Connection URI

postgresql://postgres:<password>@<your-endpoint>:5432/<database-name>

Environment variable

bash
export DATABASE_URL="postgresql://postgres:<password>@<your-endpoint>:5432/<database-name>"

Replace <your-endpoint>, <password>, and <database-name> with the values from the Connection tab.


See also: Connect a compute instance to a database