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 type | Access | How to enable |
|---|---|---|
| Public | Accessible from the internet | Enable Public Load Balancer in Settings |
| Private | Accessible within your private network only | Enable 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
| Field | Value |
|---|---|
| Username | postgres (PostgreSQL default) |
| Password | Revealed 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
[ On this page ]