Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

FerretDB

> 数据库
Open source

A truly Open Source MongoDB alternative

11.0K stars0 likes1 views
WebsiteGitHub

About

A truly Open Source MongoDB alternative

FerretDB

[!TIP] Looking for FerretDB v1? It is there. 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 application<br>Any MongoDB driver"]
  F{{FerretDB}}
  P[(PostgreSQL<br>DocumentDB extension)]

  A -- "MongoDB protocol<br>BSON" --> F
  F -- "PostgreSQL protocol<br>SQL" --> 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.

Quickstart

Run this command to start FerretDB with PostgreSQL, make sure to update <username> and <password>:

bash
docker run -d --rm --name ferretdb -p 27017:27017 \
  -e POSTGRES_USER=<username> \
  -e POSTGRES_PASSWORD=<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://<username>:<password>@127.0.0.1:27017/.
  • Connect to it using the MongoDB Shell by just running mongosh. If you don't have it installed locally, you can run docker exec -it ferretdb mongosh.
  • For PostgreSQL, connect to it by running docker exec -it ferretdb psql -U <username> 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

[!NOTE] We advise users not to build FerretDB themselves. Instead, use binaries, Docker images, or packages provided by us.

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

  • FerretDB Cloud
  • Civo
  • Tembo
  • Elestio
  • Cozystack

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.

If you want to contact FerretDB Inc., please use this form.

Issues· 449 open

View all issuesOpen on GitHub
  • #5656

    Add LibreDB Studio to compatible applications (GUIs)

    Updated Sep 18, 2026
  • #1943

    Provide RISC-V / `riscv64` Docker images

    help wantedgood first issuecode/chorearea/buildUpdated Sep 16, 2026
  • #5650

    Website is down.

    code/bugnot readyUpdated Aug 20, 2026
  • #4636

    Use a line length of 120

    documentationgood first issuecode/choreUpdated Jul 29, 2026
  • #5612

    findOneAndUpdate returns null when querying nested array field with dot notation

    Updated Jul 20, 2026
  • #5422

    Default pg_cron schedule causes constant 1MB/s disk writes from index building tasks

    code/bugnot readycommunityUpdated Jun 18, 2026
  • #5648

    Strange code fragment

    code/enhancementnot readyUpdated May 13, 2026
  • #5646

    field cannot have more than 2000 dimensions for vector index

    code/bugnot readyUpdated May 11, 2026
  • #177

    Support time series collections

    code/featurenot readyUpdated May 4, 2026
  • #5642

    Add pre-filter support to cosmosSearch vector search operator

    code/enhancementnot readyUpdated Apr 25, 2026

> Tags

Godatabasedocumentferretdbgo

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 28, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库