# FerretDB

FerretDB is an open-source MongoDB compatibility proxy for self-hosted stacks. It is open source and self-hosted, installable on Docker Hub and Unraid.

Canonical page: https://ourlocalhost.com/app/241/ferretdb

## Description

FerretDB is an open-source MongoDB compatibility proxy for self-hosted stacks. It translates MongoDB 5.0+ wire-protocol queries into SQL and stores data in PostgreSQL, giving MongoDB clients and tools access to a self-hosted SQL-backed database.

## Platform availability

Available on 1 of 9 platforms: Unraid.

## Health score

60/100 (Good), based on 4 of 4 factors.
- Maintained: 47 (last commit 257 days ago)
- Popular: 81 (11,090 GitHub stars)
- Easy to install: 35 (1 install platform, install notes, Docker image)
- Light to run: 95 (512 MB minimum RAM, runs on ARM)

## Links

- Docker Hub: https://hub.docker.com/r/ferretdb/ferretdb
- Unraid: https://ca.unraid.net/apps/ferretdb-0z6vdzy13y3hbe?q=ferretdb
- Official website: https://docs.ferretdb.io
- GitHub: https://github.com/FerretDB/FerretDB
- Documentation: https://docs.ferretdb.io/

## Common questions

### Does the quick FerretDB Docker container keep my data after it stops?

No. The quick setup keeps all data inside the container and loses it when it shuts down, so it is not suitable for production use. The README points to separate installation guides for setups that do not have that problem.

### Why does FerretDB not work if PostgreSQL is missing or stopped?

FerretDB depends on PostgreSQL to store data. If you are not using the bundled Docker image, install and start PostgreSQL before running FerretDB.

### How do I create the first FerretDB login user?

Start FerretDB once with --test-enable-new-auth=true, --setup-username, --setup-password, and --setup-database to create the first account. Without that first run, authentication may have no valid user for you to connect with.

### Which port does FerretDB use for MongoDB-style connections?

FerretDB opens port 27017 for MongoDB-style connections.

### Can FerretDB match MongoDB query performance on large collections?

It can be much slower. A reported count on a 3-million-row collection took 28 seconds in FerretDB versus 2 seconds in MongoDB, about 14 times slower.

## Alternatives

- Apache Cassandra
- CouchDB: Apache CouchDB is a distributed, fault-tolerant and schema-free document-oriented database accessible via a RESTful HTTP / JSON API.
- Firebase: Firebase, provided by Google, is a backend service and application development platform.
- Microsoft SQL Server: SQL Server delivers on Microsoft’s Data Platform vision by helping your organization manage your data by enabling you to store data from st…
- MongoDB: MongoDB is a cross-platform, open-source document-oriented NoSQL database that stores data in flexible, JSON-like BSON documents instead of…
- MySQL Community Edition: Free GPL database platform supporting SQL and NoSQL applications with InnoDB storage, replication, clustering, connectors, and cross-platfo…
- PostgreSQL: PostgreSQL (Postgres) is an open source object-relational database known for reliability and data integrity.
- Redis: Redis is a fast, in-memory data structure store that can be used as a database, cache, and message broker.
- SQLite: SQLite is a lightweight, embedded relational database engine that stores an entire database in a single file on your device.

---
Source: Our Local Host (https://ourlocalhost.com/app/241/ferretdb), the self-hosted and open-source app directory.
