Repolode
mongodb

mongodb/mongo

MongoDB, the source-available document database server (mongod) with the mongos sharding router, written in C++.

Open-source alternative to:Amazon DocumentDB

Stars
28,656
Forks
5,843
Open issues
37
Last commit
3 hours ago

What is it?

MongoDB is a NoSQL document database. This repository contains the source for the database server, mongod, which stores and serves data, and mongos, a sharding router that distributes data and queries across a sharded cluster.

The project covers building the server from source, running a single-node database locally with the mongosh shell, and installing MongoDB Compass, the graphical client. Client drivers for most programming languages are maintained separately and are linked from the official documentation, and packaging scripts produce RPM and Debian packages.

Source is published under the Server Side Public License (SSPL) for releases after October 16, 2018, with earlier releases under the AGPL. Individual files carry headers indicating which license applies.

Key features

  • 01Document-oriented NoSQL database server (mongod)
  • 02Sharding router (mongos) for distributing data across a cluster
  • 03Shell access through mongosh, with help and command-line options
  • 04Compass graphical client installable via a bundled script
  • 05Build-from-source instructions and RPM/Debian packaging scripts

Use cases

  • Storing application data as flexible JSON-like documents
  • Scaling a database horizontally with sharding
  • Running a self-hosted MongoDB server built from source
  • Building or customizing the MongoDB server itself

Quick start

  1. 1

    Download MongoDB from the official download page or install via Homebrew

    brew tap mongodb/brew
  2. 2

    Create the default data directory

    sudo mkdir -p /data/db
  3. 3

    Start the mongod database server

    ./mongod
  4. 4

    Connect with the mongosh shell

    ./mongosh

Things to know

  • The license is the Server Side Public License (SSPL), which is source-available rather than an OSI-approved open-source license.
  • Building from source is a non-trivial process documented separately in docs/building.md.

Topics

FAQ

What is mongo?
MongoDB, the source-available document database server (mongod) with the mongos sharding router, written in C++. MongoDB is a NoSQL document database. This repository contains the source for the database server, mongod, which stores and serves data, and mongos, a sharding router that distributes data and queries across a sharded cluster.
Is mongo free to use? What license does it have?
mongo is open source under the Other license. Check the license terms before using it in commercial products.
Is mongo still maintained?
Actively maintained. The last commit to mongo was on Oct 21, 2026.
What can I use mongo for?
Storing application data as flexible JSON-like documents Scaling a database horizontally with sharding Running a self-hosted MongoDB server built from source Building or customizing the MongoDB server itself
How do I install mongo?
Download MongoDB from the official download page or install via Homebrew: brew tap mongodb/brew Create the default data directory: sudo mkdir -p /data/db Start the mongod database server: ./mongod Connect with the mongosh shell: ./mongosh
Where can I get mongo?
The source code and installation instructions are on GitHub: https://github.com/mongodb/mongo

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects