
FerretDB
Run MongoDB apps on PostgreSQL with no code changes needed
Replaces Mongodb Atlas, Amazon Documentdb With Mongodb Compatibility, Azure Cosmos Db For Mongodb

Who it's for
FerretDB fits teams that want to keep a MongoDB-like API while moving toward open-source database foundations.
Skip it if your app depends on advanced MongoDB features that FerretDB does not support.
Teams already strong in PostgreSQL operations can evaluate FerretDB for document-style workloads.
Use MongoDB Atlas if full compatibility and managed operations matter more.
The problem
MongoDB compatibility is attractive because many apps and developers know the document model. The problem is that managed MongoDB-compatible services can create licensing, cost, and portability concerns once the database becomes central to the product. Teams need a migration path that preserves common MongoDB application patterns while moving storage onto open-source foundations they can operate and inspect.
How it works
FerretDB aims to provide MongoDB-compatible behavior for applications and drivers, reducing the need to rewrite every data access path at once.
FerretDB uses PostgreSQL as a backend, letting teams build on a widely understood open-source database foundation.
Applications can keep document-style data access patterns while teams evaluate what compatibility gaps matter for their workload.
Features
- MongoDB wire-protocol goal
- PostgreSQL-backed deployment
- Document database API
Recommended for this setup
Strengths
- Open-source compatibility path: FerretDB gives teams a way to reduce MongoDB dependency without abandoning document-oriented application design immediately.
- Apache-2.0 license: Apache-2.0 licensing makes FerretDB easier to evaluate for commercial use than restrictive or source-available database licenses.
Trade-offs
- Not full MongoDB parity: Compatibility depends on the commands, indexes, aggregation behavior, and workload you use. Production migrations need careful testing.
- PostgreSQL behavior still matters: Because PostgreSQL is the backend, performance and operations depend on PostgreSQL sizing, backups, and query behavior.
Tech stack
FAQ
FerretDB can replace MongoDB for compatible workloads, but teams must test feature and command compatibility.
FerretDB commonly uses PostgreSQL as its backend.
FerretDB is Apache-2.0 licensed.