Prerequisites
- Create a cluster and securely store the password you specified during creation.
-
To connect to a database, install
psql, a PostgreSQL command line client:- macOS
- Ubuntu
After that, restart the terminal. -
To secure connections to databases, install the Nebius AI Cloud certificate:
This command creates the
.postgresqlfolder, downloads the certificate into it and then sets the access rights to the certificate file.
How to connect to a database
Go to the web console and get the connection command with all data filled in for your cluster:- Web console
- In the sidebar, go to
Storage → PostgreSQL.
- Click your cluster.
- Click How to connect.
- Copy the connection command from the window that opens.
Details of the connection command
The connection command that you copy from the web console looks like this:-
<DB_name>: Default database name that you specified when creating the cluster. If you created another database in this cluster, you can use its name instead. -
<username>: The username you specified when creating the cluster.Once you create other databases and users, you can use their names instead. -
<cluster_endpoint>: Depends on where you are connecting from:- To connect from the internet, use the public cluster endpoint. You can connect from the internet only if you enabled public access to the cluster when you created it.
- To connect from other Nebius AI Cloud resources, use the private cluster endpoint.
- Web console
- CLI
- In the sidebar, go to
Storage → PostgreSQL.
- Click your cluster.
- Click Copy endpoint URL and select Public RW endpoint URL to copy the public cluster endpoint, or Private RW endpoint URL to copy the private cluster endpoint.
Postgres, PostgreSQL and the Slonik Logo are trademarks or registered trademarks of the PostgreSQL Community Association of Canada, and used with their permission.