src/postgres/third-party-extensions/documentdb/docs/v1/index.md
DocumentDB is a fully open-source document-oriented database engine, built on PostgreSQL.
It supports seamless CRUD operations on BSON data types, full-text search, geospatial queries, and vector embeddings — all within the robust PostgreSQL ecosystem.
A curated collection of guides to help you understand what DocumentDB is, why it matters, and how to get up and running—from initial setup to advanced document operations.
pg_documentdb_core – PostgreSQL extension for BSON type and operationspg_documentdb – Public API layer enabling document-oriented accesspg_documentdb_gw – Gateway for DocumentDB, providing a MongoDB interfaceThere are prebuild images available for different platforms. You can find the list of prebuild images here.
To run the prebuild image, use the following command:
# example for Ubuntu 22.04, PostgreSQL 16, amd64
# Choose the image tag according to your configuration
docker run -dt mcr.microsoft.com/cosmosdb/ubuntu/documentdb-oss:22.04-PG16-AMD64-0.103.0
docker exec -it <container-id> bash
To run the prebuild image with the DocumentDB Gateway, use the following command:
docker run -dt -p 10260:10260 -e USERNAME=<username> -e PASSWORD=<password> ghcr.io/microsoft/documentdb/documentdb-local:latest
mongosh localhost:10260 -u <username> -p <password> \
--authenticationMechanism SCRAM-SHA-256 \
--tls \
--tlsAllowInvalidCertificates
git clone https://github.com/microsoft/documentdb.git
cd documentdb
docker build -f .devcontainer/Dockerfile -t documentdb .
docker run -v $(pwd):/home/documentdb/code -it documentdb /bin/bash
make && sudo make install
Contributors and users can join the DocumentDB Discord channel in the Microsoft OSS server for quick collaboration.
To contribute, see these documents:
Q1. While performing make check if you encounter error FATAL: "/home/documentdb/code/pg_documentdb_core/src/test/regress/tmp/data" has wrong ownership?
Please drop the /home/documentdb/code/pg_documentdb_core/src/test/regress/tmp/ directory and rerun the make check.
Contributors and users can join the DocumentDB Discord channel in the Microsoft OSS server for quick collaboration.
DocumentDB is licensed under the MIT License. See LICENSE for details.
This project may use trademarks or logos. Use of Microsoft trademarks must follow Microsoft’s Trademark & Brand Guidelines. Use of third-party marks is subject to their policies.