
DocumentDB
A MongoDB-compatible document database built as PostgreSQL extensions plus a gateway, so MongoDB drivers and tools talk to Postgres underneath.
Linux Foundation project- What it is
- Document databases
- Type
- Open source
- Made by
- DocumentDB project (LF Projects, started at Microsoft)
- Foundation
- The Linux Foundation, joined August 2025. A series of LF Projects, LLC, donated by Microsoft
- License
- MIT
- Facts checked
- 28 October 2026
What it is
DocumentDB is three pieces that sit on an ordinary PostgreSQL server. pg_documentdb_core adds a BSON data type and its operators to Postgres. pg_documentdb is the API layer: it stores each collection as a Postgres table of BSON documents and implements inserts, updates, queries, aggregation pipelines and index management as SQL functions. pg_documentdb_gw, a gateway written in Rust, speaks the MongoDB wire protocol and turns each command into calls on those functions. An application connects with a normal MongoDB driver (mongodb://…) and never sees SQL, while an operator gets Postgres’s storage, write-ahead log, backups and extensions. Full-text, geospatial and vector search are included; vector search comes from the pgvector extension.
Microsoft released it in January 2025 as the engine behind the vCore-based Azure Cosmos DB for MongoDB, a service renamed Azure DocumentDB in November 2025. It moved to the Linux Foundation in August 2025, and its technical steering committee now has members from Microsoft, Amazon, AB InBev, Rippling and Yugabyte. DocumentDB 1.0, the first generally available release, shipped on 19 October 2026 with packages for PostgreSQL 17 and 18, container images for PostgreSQL 15 to 18, a Kubernetes operator (also 1.0) and a VS Code extension. Despite the name, it is unrelated to Amazon DocumentDB, AWS’s proprietary MongoDB-compatible service.
Why teams pick it
- Keeps MongoDB drivers, shells and query code, but runs on PostgreSQL, which many teams already know how to operate, back up and monitor
- MIT licence with no usage or distribution restrictions, unlike MongoDB’s SSPL
- Neutral governance: Microsoft, AWS and Yugabyte contribute, and Azure DocumentDB is built on the same code
- One versioning scheme with a long-term-support track from 1.0, plus a Kubernetes operator for running it yourself
Watch out for
- A reimplementation of the MongoDB API, not MongoDB: some commands and operators behave differently or are missing, so test the queries your application uses
- High availability is Postgres replication, not MongoDB replica sets: on Kubernetes the operator builds clusters on CloudNativePG, otherwise you set up Postgres replication and failover yourself
- Young as a standalone product: 1.0 arrived in October 2026, and the
documentdb-localcontainer sends usage telemetry unless you turn it off - The name collides with Amazon DocumentDB and with Azure’s
Microsoft.DocumentDBresource namespace, which makes documentation searches confusing
- Data model
- BSON documents in collections, stored as rows of a PostgreSQL table
- Query language
- MongoDB query filters and aggregation pipelines
- Secondary indexes
- Indexes created with
createIndex, including text, geospatial and vector (pgvector) search - Storage engine
- PostgreSQL heap tables and WAL
- Ways to run it
- Linux packages, Docker image, Kubernetes operator, or Azure DocumentDB
Alternatives
What all document databases have in common →Compare side by side →
RethinkDBDormantOpen sourceA clustered JSON document database whose queries can stay open as changefeeds, pushing every change to the client instead of the app polling for it.How it fits with other technologies
Run DocumentDB locally and talk to it with a MongoDB client · bash
docker run -dt -p 10260:10260 --name documentdb \
-e USERNAME=app -e PASSWORD=secret \
ghcr.io/documentdb/documentdb/documentdb-local:pg17-1.0.0
mongosh 'mongodb://app:secret@localhost:10260/?tls=true&tlsAllowInvalidCertificates=true'
# inside mongosh: plain MongoDB API calls, stored as BSON rows in Postgres
# db.orders.insertOne({ customer: 'ada', items: [{ sku: 'A1', qty: 2 }], total: 18 })
# db.orders.createIndex({ customer: 1 })
# db.orders.aggregate([{ $match: { total: { $gt: 10 } } },
# { $group: { _id: '$customer', spent: { $sum: '$total' } } }])See it in a real stack
No architecture uses DocumentDB yet. Drop it into the playground and wire it up yourself.Open playground →Where it came from2025–2026
Microsoft built the engine in 2024 for the vCore-based Azure Cosmos DB for MongoDB, a service that, unlike the original Cosmos DB API for MongoDB, ran on PostgreSQL rather than on the Cosmos DB engine. On 23 January 2025 it published the two PostgreSQL extensions under the MIT licence as DocumentDB, arguing that document databases lacked an open, portable standard and that teams wanted a fully supported local instance. The gateway that speaks the MongoDB wire protocol followed in the same repository.
On 25 August 2025, at Open Source Summit Europe, the Linux Foundation announced that DocumentDB had joined it, with AWS, Google, Yugabyte, Supabase, Snowflake, Cockroach Labs and others named as supporters. The repository moved from Microsoft’s GitHub organisation to its own. Microsoft renamed its managed service Azure DocumentDB that November, and the project reached 1.0 on 19 October 2026, with a proposal for a yearly major release that is supported until three months after the next one.
Why it’s built this way
- Build on PostgreSQL instead of a new storage engine
- Postgres already had durable storage, replication, extensions and a large operations community; the project’s README lists its stability, extensibility and features as the reasons.
- Implement the MongoDB API rather than invent one
- Existing drivers, tools and application code work unchanged, which is what most people moving document workloads need.
- MIT licence and a foundation
- Microsoft wanted a standard others could build on; AWS, which runs its own MongoDB-compatible service, said it valued “a permissively licensed database for implementing the MongoDB API”.
Timeline
- 2025
Open-sourced by Microsoft (January); joins the Linux Foundation (August); Azure Cosmos DB for MongoDB vCore renamed Azure DocumentDB (November)
- 2026
DocumentDB 1.0, its Kubernetes operator 1.0 and VS Code extension 1.0 (October)
- Microsoft Open Source Blog: DocumentDB open-source announcement (23 January 2025)
- Linux Foundation press release: Linux Foundation welcomes DocumentDB (25 August 2025)
- DocumentDB blog: name disambiguation (Azure DocumentDB renamed from Azure Cosmos DB for MongoDB vCore, 18 November 2025)
- DocumentDB blog: Long-term support or development? (versioning proposal, October 2026)
- GitHub: documentdb/documentdb release v1.0-0 (19 October 2026)
Sources10 · facts checked 28 October 2026
- GitHub: documentdb/documentdb README (components, MIT licence, why Postgres)
- GitHub: pg_documentdb_gw (Rust gateway)
- DocumentDB website (TSC members, operator 1.0, a Series of LF Projects, LLC)
- DocumentDB 1.0 overview (PostgreSQL versions, packages, upgrades)
- GitHub: documentdb/documentdb release v1.0-0 (packages, images, telemetry, operator and VS Code 1.0)
- GitHub: documentdb/documentdb-kubernetes-operator (built on CloudNative-PG, high availability)
- Microsoft Open Source Blog: DocumentDB open-source announcement (pgvector, no licensing fees)
- Linux Foundation press release: Linux Foundation welcomes DocumentDB (25 August 2025)
- DocumentDB blog: name disambiguation (Azure DocumentDB, Cosmos DB, ARM namespace)
- Phoronix: Microsoft announces open-source DocumentDB (name already used by Amazon)