Nexqloud
Databases

Connect to a Database

Connect to your managed database using standard clients

Connect to a Database

Once your database status is Running, connection details are available on the database overview page.

Finding Connection Details

  1. Navigate to Databases in the sidebar
  2. Click on your database name to open the overview page
  3. Connection details are displayed in the Connection panel

Connection Endpoints

Each database provides two endpoint types:

EndpointDescriptionUse Case
Private HostInternal network endpointApplications running within NexQloud
Public HostSNI proxy at *.dds.dcptunnel.netExternal access (must be enabled during creation)

Toggle between Private and Public endpoints in the connection panel.

Public endpoints are only available if you enabled the Public Endpoint option during database creation.

Connect to PostgreSQL

Using psql

psql -h <host> -p <port> -U <username> -d <database>

You will be prompted for the password. Copy it from the overview page (click the eye icon to reveal, then copy).

Connection String Format

postgresql://<username>:<password>@<host>:<port>/<database>

Application Code Examples

Node.js (pg)

const { Pool } = require('pg');

const pool = new Pool({
  host: '<host>',
  port: <port>,
  user: '<username>',
  password: '<password>',
  database: '<database>',
  ssl: true
});

const result = await pool.query('SELECT NOW()');
console.log(result.rows[0]);

Python (psycopg2)

import psycopg2

conn = psycopg2.connect(
    host="<host>",
    port=<port>,
    user="<username>",
    password="<password>",
    dbname="<database>",
    sslmode="require"
)

cur = conn.cursor()
cur.execute("SELECT NOW()")
print(cur.fetchone())

Go (lib/pq)

import (
    "database/sql"
    _ "github.com/lib/pq"
)

connStr := "host=<host> port=<port> user=<username> password=<password> dbname=<database> sslmode=require"
db, err := sql.Open("postgres", connStr)

Connect to FerretDB (MongoDB-Compatible)

Using mongosh

mongosh "mongodb://<username>:<password>@<host>:<port>/<database>"

MongoDB URI Format

mongodb://<username>:<password>@<host>:<port>/<database>

Application Code Examples

Node.js (mongoose)

const mongoose = require('mongoose');

await mongoose.connect('mongodb://<username>:<password>@<host>:<port>/<database>');

Python (pymongo)

from pymongo import MongoClient

client = MongoClient('mongodb://<username>:<password>@<host>:<port>/<database>')
db = client['<database>']

Security

All database connections are SSL/TLS encrypted automatically. No additional certificate setup is required — clients connect securely by default.

Credentials

Your database credentials are shown on the overview page:

  • Database Name — the default database created with your cluster
  • Username — the admin user
  • Password — click the eye icon to reveal; use the copy button to copy securely
Store your database password securely. It is shown on the overview page but should be saved in a secrets manager or environment variable for application use.

Next Steps