TiloBox
Back to directory
FerretDB project preview

FerretDB

An open-source database proxy that translates MongoDB wire-protocol requests to a supported PostgreSQL-based backend.

LicenseApache-2.0
GitHub stars11.1k
Last commit2 months ago
Tags7 topics
CliGoMongodb CompatibleDocument DatabaseOpen SourceDeveloper ToolsPostgresql
Overview

Why consider FerretDB?

FerretDB is an open-source proxy that translates MongoDB wire protocol queries to SQL using PostgreSQL as the backend engine. It enables teams to run MongoDB workloads on open-source relational databases without changing their application drivers.

Guided learning

Learn FerretDB by building

Practical setup notes, real use cases, and copy-ready examples in one focused guide.

4 min read 3 sections
In this guide3 sections

FerretDB: Open-Source MongoDB Alternative on PostgreSQL

Modern document-oriented applications often require flexible schema management without the vendor lock-in or licensing restrictions imposed by proprietary document stores. FerretDB is an open-source alternative to MongoDB that operates as a proxy converting wire protocol queries to SQL, allowing developers to retain familiar document database APIs while persisting data into relational storage backends. According to the project's official README, this proxy architecture bridges existing application client drivers with reliable relational database engines.

Developers who adopted document databases early on valued their rapid development speed and driver availability. The project was created after MongoDB changed its licensing model to the Server Side Public License (SSPL), which rendered legacy tooling problematic for commercial and open-source distributions. As detailed in the project README, FerretDB provides a community-driven drop-in option that restores open licensing without requiring teams to rewrite their application code.

Architectural Overview and Database Engines

At a technical level, FerretDB translates MongoDB wire protocol queries to SQL with PostgreSQL and the DocumentDB extension as the underlying engine. This design, documented across the FerretDB documentation, enables applications using standard MongoDB drivers (such as mongosh or official language SDKs) to communicate directly with PostgreSQL without needing bespoke query rewriting layers or complex data migration bridges.

The internal architecture divides duties cleanly between networking and storage abstraction. The codebase organizes command handling and wire protocol server implementations within dedicated internal subpackages, ensuring that query parsing routines for operations like find or aggregate remain decoupled from wire protocol transport protocols. Full architectural details are documented in the project's contributing documentation.

Setting Up Local Development and Building Binaries

When setting up a local development environment, contributors run backend databases inside containerized environments. The supported development setup runs PostgreSQL and other dependencies inside Docker containers while executing FerretDB on the host, ensuring fast compile-test feedback loops during active iteration as outlined in the contributing guide.

System requirements are straightforward for developers working on the source code. Developers building the project require Go 1.25 or later installed on their host system, alongside Git and Docker tools as specified in the official contributing guide.

To begin working with the source code, fork the official GitHub repository and clone your fork locally, establishing the upstream repository remote and fetching all tags as described in the official contributing guide:

sh
1git clone git@github.com:<YOUR_GITHUB_USERNAME>/FerretDB.git
2cd FerretDB
3git remote add upstream https://github.com/FerretDB/FerretDB.git
4git fetch --all --tags

Once development and testing steps conclude, creating deployable assets is handled through automated build scripts. Production release binaries can be compiled with the task build-production command and saved to the binary output directory, allowing teams to produce optimized executables directly from source as described in the contributing instructions.

Release Lifecycle and Security Maintenance

Software reliability and ongoing vulnerability management follow clearly defined versioning cycles. The FerretDB project officially maintains security and maintenance support for the two latest minor versions, ensuring that active deployments receive timely security fixes and patches as documented in the project's security policy.

Production deployments should track tagged versions from the official GitHub releases page to ensure compatibility with backend storage extensions and driver capabilities. The project distributes its source code under the terms of the Apache-2.0 license as verified in the official project license.

Related tools

More options with a similar category or technology profile.

FerretDB FAQs

FerretDB is listed as a Developer Tools tool on TiloBox. Review the overview, features, and official documentation on this page to decide whether it solves your specific workflow.

Start with the project's GitHub repository for supported installation and deployment instructions. Test the setup with representative data or a small project before rolling it out more widely.

FerretDB is listed under the Apache-2.0 license. Read the complete license text and the project's notices before using, modifying, or distributing the software.

Production readiness depends on your requirements. Review maintenance activity, security practices, documentation, backup and upgrade procedures, and compatibility with your stack; then validate it in a non-production environment.

FerretDB is listed as an alternative to MongoDB. Compare the core workflow, deployment model, integrations, and licensing against your must-have requirements before switching.