FerretDB <!-- textlint-disable one-sentence-per-line --> > [!TIP] > Looking for FerretDB v1? > It is there. <!-- textlint-enable one-sentence-per-line --> FerretDB is an open-source alternative to MongoDB. It is a…
FerretDB
<!-- textlint-disable one-sentence-per-line -->
> [!TIP]
> Looking for FerretDB v1?
> It is there.
<!-- textlint-enable one-sentence-per-line -->






FerretDB is an open-source alternative to MongoDB.
It is a proxy that converts MongoDB 5.0+ wire protocol queries to SQL
and uses PostgreSQL with DocumentDB extension as a database engine.
mermaid
flowchart LR
A["Any applicationAny MongoDB driver"]
F{{FerretDB}}
P[(PostgreSQLDocumentDB extension)]
A -- "MongoDB protocolBSON" --> F
F -- "PostgreSQL protocolSQL" --> P
Why do we need FerretDB?
MongoDB was originally an eye-opening technology for many of us developers,
empowering us to build applications faster than using relational databases.
In its early days, its ease-to-use and well-documented drivers made MongoDB one of the simplest database solutions available.
However, as time passed, MongoDB abandoned its open-source roots;
changing the license to SSPL - making it unusable for many open-source and early-stage commercial projects.
Most MongoDB users do not require any advanced features offered by MongoDB;
however, they need an easy-to-use open-source document database solution.
Recognizing this, FerretDB is here to fill that gap.
Scope and current state
FerretDB is compatible with MongoDB drivers and popular MongoDB tools.
It functions as a drop-in replacement for MongoDB 5.0+ in many cases.
Features are constantly being added to further increase compatibility and performance.
We welcome all contributors.
See our public roadmap,
lists of known differences and supported commands,
and [contributing guidelines](CONTRIBUTING.md).
Quickstart
Run this command to start FerretDB with PostgreSQL, make sure to update ` and :
sh
docker run -d --rm --name ferretdb -p 27017:27017 \
-e POSTGRES_USER= \
-e POSTGRES_PASSWORD= \
ghcr.io/ferretdb/ferretdb-eval:2
This command will start a container with FerretDB, pre-packaged PostgreSQL with DocumentDB extension, and MongoDB Shell for quick testing and experiments.
However, it is unsuitable for production use cases because it keeps all data inside and loses it on shutdown.
See our installation guides for instructions
that don't have those problems.
With that container running, you can:
- Connect to it with any MongoDB client application using the MongoDB URI mongodb://:@127.0.0.1:27017/
. - Connect to it using the MongoDB Shell by just running mongosh
.
.
- For PostgreSQL, connect to it by running
docker exec -it ferretdb psql -U postgres.
You can stop the container with docker stop ferretdb`.
We also provide binaries and packages for various Linux distributions.
as well as Go library package
that embeds FerretDB into your application.
See our documentation for more details.
Building and packaging
<!-- textlint-disable one-sentence-per-line -->
> [!NOTE]
> We advise users not to build FerretDB themselves.
> Instead, use binaries, Docker images, or packages provided by us.
<!-- textlint-enable one-sentence-per-line -->
FerretDB could be built as any other Go program,
but a few generated files and build tags could affect it.
See there for more details.
Managed FerretDB at cloud providers
Community
- Website: https://www.ferretdb.com/.
- Blog: https://blog.ferretdb.io/.
- Documentation: https://docs.ferretdb.io/.
- X (Twitter): @ferret_db.
- Mastodon: @[email protected].
- Slack chat for quick questions.
- GitHub Discussions for longer topics.
- GitHub Issues for bugs and missing features.
Members
-
FerretDB
A truly Open Source MongoDB alternative
Go ★ 11k 16d agoExplain → -
example ⑂
FerretDB example
JavaScript ★ 83 1y agoExplain → -
documentdb ⑂
DocumentDB is the open-source engine powering vCore-based Azure Cosmos DB for MongoDB. It offers a native implementation of document-oriented NoSQL database, enabling seamless CRUD operations on BSON data types within a PostgreSQL framework.
C ★ 25 2mo agoExplain → -
wire
MongoDB wire protocol implementation in Go
Go ★ 17 16d agoExplain → -
dance
FerretDB integration testing
Go ★ 13 4mo agoExplain → -
github-actions
Shared GitHub Actions for FerretDB repos
Go ★ 10 3mo agoExplain → -
embedded-example
No description.
Go ★ 10 7mo agoExplain → -
dotnet-example ⑂
No description.
C# ★ 2 5mo agoExplain → -
python-example ⑂
Contains details on how we use pymongo to connect python with mongodb
Python ★ 2 5mo agoExplain → -
fuzz-corpus
No description.
★ 1 1y agoExplain → -
meteor-ferretdb ⑂
Meteor using FerretDB and PostgreSQL instead of MongoDB.
Dockerfile ★ 1 3y agoExplain → -
xfail ▣
Use https://github.com/AlekSi/xfail instead
Go ★ 0 28d agoExplain → -
java-example ⑂
No description.
Java ★ 0 4mo agoExplain → -
nodejs-example ⑂
This repository contains code samples for the Node.js Quick Start blog post series
JavaScript ★ 0 7mo agoExplain → -
documentdb.github.io ⑂
No description.
★ 0 10mo agoExplain → -
deps
FerretDB's development dependencies in Docker containers
Makefile ★ 0 7mo agoExplain → -
notifications-search
No description.
Go ★ 0 7mo agoExplain → -
mongodb-benchmarking ⑂
With mongodb-benchmarking you can benchmark your mongo database multithreaded.
Go ★ 0 7mo agoExplain → -
mongo-core-test ⑂
No description.
Python ★ 0 1y agoExplain → -
gh
GitHub API helpers
Go ★ 0 1y agoExplain → -
flog
No description.
Go ★ 0 1y agoExplain → -
slack
Simple redirect to our community Slack
HTML ★ 0 1y agoExplain → -
civo-kubernetes-marketplace ⑂
Marketplace of Kubernetes applications available for quick and easy installation in to Civo Kubernetes clusters
Shell ★ 0 1y agoExplain → -
merge-queues
No description.
★ 0 2y agoExplain → -
react-tutorial ⑂
React Tutorial is the best place to learn how to use React and Meteor together
★ 0 1y agoExplain → -
linode-marketplace-apps-new ⑂
The Official Akamai Compute (formally Linode) Marketplace
★ 0 2y agoExplain → -
linode-Marketplace-Apps ⑂
The Linode Marketplace is designed to make it easier for developers and companies to share One-Click Apps with the Linode community.
Shell ★ 0 2y agoExplain → -
amazon-documentdb-tools ⑂
Tools for use with the Amazon DocumentDB managed document database service.
Python ★ 0 1y agoExplain → -
.github
No description.
★ 0 3y agoExplain → -
meteor-examples ⑂
Project examples with Meteor
★ 0 2y agoExplain →
No repos match these filters.