FerretDB proposes a hybrid architecture that translates MongoDB commands into SQL over PostgreSQL, aiming to regain the freedom and transparency that many developers and modern infrastructures demand.
For years, MongoDB was synonymous with agility and flexibility for developers. Its document-oriented model and the ease of use of its drivers made it a benchmark in the NoSQL database universe. However, the change in license to SSPL has shifted the perception of many users, leading them to seek more open alternatives. In this context, FerretDB emerges, a solution that preserves the MongoDB experience while storing data in PostgreSQL.
What is FerretDB?
FerretDB is not a database per se, but a proxy that acts as an intermediary between MongoDB clients and a PostgreSQL database. It uses the DocumentDB extension to support JSON-like structures and automatically translates MongoDB’s BSON protocol operations into standard SQL queries.
This allows any application using MongoDB drivers to work with FerretDB without needing to change a single line of code.
Architecture and Functionality
FerretDB operates as a transparent intermediary layer. Its design is compatible with clients like mongosh
, Compass, or libraries like Mongoose or PyMongo.
Functional Schema:
- Client or application with MongoDB driver → FerretDB → PostgreSQL with JSONB support
Thanks to this architecture, developers can maintain their MongoDB development experience while benefiting from the reliability, transactional consistency, and tools of the PostgreSQL ecosystem.

Why Choose FerretDB?
FerretDB arises from a clear need: to offer a truly open source alternative to MongoDB, without the constraints of the SSPL. Here are some of its key advantages:
Apache 2.0 License
Unlike MongoDB’s SSPL, which is not recognized by the OSI and has commercial limitations, FerretDB opts for an Apache 2.0 license, widely accepted and compatible with both enterprise and community environments.
Full Compatibility with MongoDB
FerretDB supports the main operations of MongoDB:
find
,insert
,update
,delete
- Indexes
- Aggregation operations
- Geospatial queries (in development)
Reliability of PostgreSQL
Data is stored in PostgreSQL using JSONB
columns, allowing for:
- ACID compliance
- Compatibility with SQL tools
- Integration with Kubernetes environments, advanced backups, and native replication
Sustainable Infrastructure
FerretDB aligns with the trend toward open infrastructures, easily integrable into platforms like Docker, Kubernetes, or multicloud environments.
Comparison: FerretDB vs MongoDB
Feature | MongoDB Community Edition | FerretDB + PostgreSQL |
---|---|---|
License | SSPL (not OSI) | Apache 2.0 |
Storage Engine | WiredTiger | PostgreSQL (JSONB) |
Driver Compatibility | Native | Compatible |
SQL Queries | No | Yes |
Deployment Flexibility | Medium | High |
Production Maturity | High | Medium (growing) |
Getting Started with FerretDB (Docker)
For quick tests, FerretDB provides a preconfigured Docker image:
bashCopiarEditardocker run -d --rm --name ferretdb -p 27017:27017 \
-e POSTGRES_USER=ferret \
-e POSTGRES_PASSWORD=ferretpw \
ghcr.io/ferretdb/ferretdb-eval:2
This image contains:
- FerretDB
- PostgreSQL with DocumentDB Extension
- MongoDB Shell Client
Note: this configuration does not persist data after shutdown. For production, a more robust installation is recommended as detailed in the official documentation.
Use Cases and Ecosystem
FerretDB already has support on platforms like:
- FerretDB Cloud
- Tembo
- Civo
- Elestio
- Cozystack
It positions itself as an ideal solution for:
- SaaS projects requiring MongoDB compatibility without license restrictions
- DevOps teams managing multitenant architectures
- Developers wanting to blend NoSQL capabilities with traditional SQL tools
Additionally, there is an embedded version as a library in Go, ideal for advanced integrations in backend services.
Community and Future
The project evolves rapidly, with constant improvements in aggregation support, performance, and compatibility. Its community is active, featuring open repositories and public roadmaps.
FerretDB represents a bridge between two worlds: the dynamism of MongoDB and the robustness of PostgreSQL. At a time when technological sovereignty and transparency are more critical than ever, this open source solution stands out as a robust, efficient, and ethical alternative for developers and systems architects.
Looking for the agility of MongoDB without the ties? FerretDB might be the answer.