Meet FerretDB: The Open-Source MongoDB Alternative That Actually Works (And Keeps Your Freedom)
Hey devs, builders, and open-source rebels!
Let’s talk about a truth we’ve all felt: the sweet, simple magic of MongoDB. Remember that first time you connected to a database with db.users.insert({ name: "Alex" }) and just… it worked? No complex schemas, no migrations, just pure, beautiful document storage. For years, MongoDB was our golden ticket to rapid development.
But then… it changed. The license shifted. The “open” in open-source started feeling more like a marketing slogan than a promise. Suddenly, projects, especially open-source ones, were locked out. And the worst part? You couldn’t even use it in production without getting tangled in legal weeds.
Don't get me wrong, I love MongoDB, as it is my togo platform for building interactive apps, especially with Meteor framework. But, I have to note that I do not like the licenses a bit.
But now, we have the real alternative, may I say killer, It is FerretDB! It is not a fork. Not a replacement. A revolution.
What is FerretDB?
FerretDB is the true open-source alternative to MongoDB 5.0+, built on PostgreSQL, powered by love, and designed for freedom.
- It works with your existing MongoDB drivers.
- It supports tools like MongoDB Compass, Studio 3T, MingoUI.
- It’s compatible with Meteor, Next.js, Express, NestJS, and dozens of other frameworks.
- It runs in real-time. Yes, real-time.
Why FerretDB? Because You Deserve Better Than Vendor Lock-In
We’re not here to replace MongoDB’s advanced features (like sharding or aggregation pipelines). We’re here to give you what you actually need: a simple, reliable, open document database that doesn’t come with strings attached.
Imagine this:
- You're building a real-time chat app with Meteor.
- Or a project management tool using Next.js + React.
- Maybe a Node.js API with Express and Socket.IO.
You want to store user profiles, tasks, messages, fast, flexibly, and openly. But you don’t want to pay for a hosted MongoDB Atlas plan or risk licensing issues. Enter FerretDB.
It’s a drop-in proxy that translates MongoDB wire protocol queries into SQL, then stores everything in PostgreSQL, with the DocumentDB extension. So you get:
- Full compatibility with MongoDB drivers (Node.js, Python, Go, Java, etc.)
- Zero code changes
- Real-time data sync via Postgres’ streaming capabilities
- Complete ownership of your data
Features & Benefits That Make Us Love it More!
| Feature | Why It Matters |
|---|---|
| Open Source (MIT License) | No SSPL traps. Use it in any project. Free forever. |
| Real-Time Data Streaming | Built on PostgreSQL’s logical replication. Push updates instantly to clients. Perfect for live dashboards, chats, and notifications. |
| Full MongoDB Driver Compatibility | Connect with mongosh, mongoose, pymongo, go.mongodb.org/mongo-driver, etc., without rewrites. |
| Works with All Major Tools | Use MongoDB Compass, Studio 3T, MingoUI, DBeaver, pgAdmin — they all work. |
| Production-Ready Docker Images | Deploy in minutes: docker run -p 27017:27017 ghcr.io/ferretdb/ferretdb-eval:latest |
| Supports Meteor, Next.js, NestJS, Flask, Django & More | If it uses MongoDB, it can use FerretDB. Seriously. |
Real-World Use Cases (Yes, Even Yours!)
- Real-Time Collaboration Apps: Build a Trello-like Kanban board (we did it with WeKan) where every card move triggers an instant update across devices, all powered by FerretDB + PostgreSQL.
- IoT Dashboards: Stream sensor data from thousands of devices, analyze it in real-time, and visualize it live, no cloud vendor required.
- Open-Source SaaS Platforms: Launch your product without worrying about MongoDB’s license. Keep your code open. Keep your users safe.
- Dev Environments: Spin up local databases in seconds. No more
mongodheadaches. Justdocker runand go. - Dynamic Credentials: Integrate with HashiCorp Vault to generate temporary database access tokens, secure, auditable, and auto-expiring.
Deploy in 30 Seconds to a Live DB
docker run -d --rm --name ferretdb \
-e POSTGRES_USER=dev \
-e POSTGRES_PASSWORD=secret \
-p 27017:27017 \
ghcr.io/ferretdb/ferretdb-eval:latest
Now connect with:
mongosh mongodb://dev:secret@localhost:27017
Or use your favorite framework. It’ll just… work.
Pro Tip: For production, use the ferretdb image with persistent volumes and proper backups. Don’t lose your data!Install with DockerCompose
Just write this in your docker-compose.yml and run it:
(Do not forget to change the passwords and username)
services:
postgres:
image: ghcr.io/ferretdb/postgres-documentdb:17-0.105.0-ferretdb-2.4.0
restart: on-failure
environment:
- POSTGRES_USER=ferretdb_user
- POSTGRES_PASSWORD=secure_password
- POSTGRES_DB=ferretdb_db
volumes:
- ./data:/var/lib/postgresql/data
networks:
- ferretdb-net
ferretdb:
image: ghcr.io/ferretdb/ferretdb:2.4.0
restart: on-failure
ports:
- "27017:27017"
environment:
- FERRETDB_POSTGRESQL_URL=postgres://ferretdb_user:secure_password@postgres:5432/ferretdb_db
depends_on:
- postgres
networks:
- ferretdb-net
networks:
ferretdb-net:
name: ferretdb_net
Now run it with $ docker compose up -d
⚠️ Important:Replaceferretdb_user,secure_password, andferretdb_dbwith your own secure credentials.The./datafolder stores your data persistently.Thepostgres-documentdbimage is pre-packaged with DocumentDB — no extra setup needed.
Connect
mongosh mongodb://ferretdb_user:secure_password@localhost:27017
Upgrade your Image
docker compose pull ferretdb
docker compose up -d ferretdb
The Future Is Ferret
FerretDB isn’t just a tool. It’s a movement. A reminder that open-source software should stay open. That innovation shouldn’t be held hostage by licenses. That you, as a developer, should have control over your stack.
We’re proud to be a Maintainer-level supporter of the OSI. We believe in transparency, community, and sustainability.
Ready to Break Free?
FerretDB isn’t just an alternative, it’s the future of open document databases. You get the ease of MongoDB, the reliability of PostgreSQL, and the freedom of open source.
Stop paying for MongoDB. Stop worrying about licenses. Stop letting big vendors dictate your tech choices.
👉 Try FerretDB today — it’s free, it’s fast, it’s real-time, and it’s truly open.
➡️ Get Started Now
➡️ Join the Community on GitHub
➡️ Sign Up for FerretDB Cloud Waitlist
Because the future of databases isn’t locked behind a paywall. It’s open. It’s free. It’s ferret-tastic. 🐹💥
P.S. Why “Ferret”? Because ferrets are curious, clever, and great at digging out secrets, just like how FerretDB helps you uncover the truth behind your data.
Resources & Downloads
