Skip to main content

Connection String

Every Nearbase instance has a unique connection string available on the Overview tab in the console. It follows this format:
SSL is required for all connections. Always include sslmode=require (or its equivalent for your driver). Connections without SSL are rejected.

Connection Details

Code Examples

Connection Pooling

For production applications, use a connection pool to efficiently reuse database connections rather than opening a new one per request.
A good starting point: set your pool size to 5–10 connections per CPU on your database instance. You can monitor live active connection counts on the Performance tab.

SSL / TLS

All Nearbase databases require TLS. If your driver accepts a configuration object instead of a connection string, enable SSL explicitly:
Need help? Reach out at team@m.nearbase.dev.