Connecting to FerretDB on Layerbase Cloud

FerretDB gives MongoDB-compatible APIs backed by PostgreSQL, so many document workloads can use MongoDB tooling without MongoDB server licensing.

Best for: MongoDB-compatible apps, open-source document workloads, and teams standardizing storage around PostgreSQL.

1

Open your database in the dashboard

Go to /cloud, click the database you just created, and the connection panel shows the host, port, username, password, and a ready-to-paste connection string for the engine.

Use the generated username, password, host, and database from Quick Connect.

2

TLS is required, on by default

Add tls=true to the MongoDB URI.

MongoDB-compatible wire protocol over TLS on port 27017

3

Use any standard client

FerretDB works with the normal client family for that engine. Start with the dashboard snippet, then move the same URL and credentials into your app environment.

If your client has separate direct, pooled, TLS, or HTTP options, prefer the exact variant shown in Quick Connect.

bashFerretDB
mongosh "mongodb://layerbase:password@your-host.cloud.layerbase.dev:27017/app?tls=true"

FerretDB notes

  • FerretDB intentionally targets broad MongoDB compatibility, not every MongoDB server feature.
  • Test aggregation-heavy and index-heavy workloads before migrating production traffic.