db.sparrowx.netIsolated Service Documentation

SparrowX Cloud DB Documentation

Managed Sovereign PostgreSQL 16, PgBouncer Pooler, PostgREST Data API & pgvector

1. Quickstart & Connection Strings

Every SparrowX Cloud DB account provisions an isolated PostgreSQL 16 database with PgBouncer transaction pooling on port 6543 and direct TLS connections on port 5432.

  • Sign in with Google at https://db.sparrowx.net to open your Studio Console.
  • Your dedicated database credentials and TLS URI are available under Overview -> Connect.
  • Use port 6543 for serverless/edge functions and port 5432 for migrations and long-lived pools.
.env
# Direct PostgreSQL 16 connection (migrations & Prisma)
DATABASE_URL="postgresql://<db_user>:<db_password>@db.sparrowx.net:5432/<db_name>?sslmode=require"

# PgBouncer Pooled connection (high-concurrency apps)
POOLER_URL="postgresql://<db_user>:<db_password>@db.sparrowx.net:6543/<db_name>?sslmode=require&pgbouncer=true"

2. Connect from Node.js, Next.js or Prisma

SparrowX Cloud DB speaks 100% standard PostgreSQL wire protocol — no proprietary driver lock-in.

src/db.ts
import pg from "pg";

export const pool = new pg.Pool({
  connectionString: process.env.DATABASE_URL,
  ssl: { rejectUnauthorized: false },
  max: 15,
});

const { rows } = await pool.query("SELECT NOW() AS server_time;");
console.log(rows[0]);

3. Instant PostgREST Data API

Query any table in your public schema over HTTPS using your personal SparrowX API key generated in Studio Settings.

curl
curl -s "https://api.sparrowx.net/rest/v1/projects?select=*&limit=20" \
  -H "apikey: spx_live_your_personal_key" \
  -H "Authorization: Bearer spx_live_your_personal_key"

4. AI Vector Search (pgvector)

Enable native vector similarity search directly inside your PostgreSQL tables for RAG and semantic search.

SQL Editor
CREATE EXTENSION IF NOT EXISTS vector;

CREATE TABLE documents (
  id BIGSERIAL PRIMARY KEY,
  title TEXT NOT NULL,
  embedding VECTOR(1536)
);

CREATE INDEX ON documents USING hnsw (embedding vector_cosine_ops);

5. Automated Backups & Terminal TUI

Manage tables, trigger logical backups, and inspect live row counts directly on your OVH Linux host using the built-in CLI.

Linux Server CLI
# Open the interactive Supabase-style Database TUI
sudo sparrowx-db

# Export full compressed backup of all databases
sudo bash /opt/sparrowxdbs/deploy/backup-all-dbs.sh