# MongoDB

MongoDB is an open-source, document-oriented NoSQL database that stores flexible, JSON-like documents, helping developers and self-hosters build applications with dynamic schemas and scalable storage. It is open source and self-hosted, installable on Docker Hub, ZimaOS, Kubernetes (Helm), TrueNAS, Proxmox and Unraid.

Canonical page: https://ourlocalhost.com/app/4344/mongodb

## Description

MongoDB is an open-source, document-oriented NoSQL database that stores flexible, JSON-like documents, helping developers and self-hosters build applications with dynamic schemas and scalable storage.

## Platform availability

Available on 5 of 10 platforms: Unraid, TrueNAS, ZimaOS, Proxmox, Helm.

## Health score

81/100 (Excellent), based on 4 of 4 factors.
- Maintained: 100 (last commit 4 days ago)
- Popular: 89 (28,683 GitHub stars)
- Easy to install: 55 (4 install platforms, install notes)
- Light to run: 50 (2 GB minimum RAM)

## Links

- GitHub: https://github.com/mongodb/mongo
- Documentation: https://support.mongodb.com/welcome
- Docker Hub: https://hub.docker.com/_/mongo/
- ZimaOS: https://github.com/IceWhaleTech/CasaOS-AppStore/tree/main/Apps/Mongo
- Kubernetes (Helm): https://artifacthub.io/packages/helm/bitnami/mongodb
- Official website: https://www.mongodb.com/
- TrueNAS: https://apps.truenas.com/catalog/mongodb/
- Proxmox: https://community-scripts.github.io/ProxmoxVE/scripts?id=mongodb
- Unraid: https://ca.unraid.net/apps/mongodb-0ogppsq02y33dq?q=MongoDB

## Common questions

### How do I run a single MongoDB server from the distributed files?

Create the /data/db directory, start mongod, and connect with mongosh, which defaults to localhost and the test database.

### What license applies to MongoDB versions released after October 16, 2018?

Releases after October 16, 2018, including patch fixes for prior versions, are published under the Server Side Public License version 1. Earlier releases were published under the AGPL.

### What must I install for a PHP or Laravel app to talk to MongoDB?

Install the PHP MongoDB extension first using apt, Homebrew, PECL, or Docker. Without that driver, the app fails with missing-extension errors.

### What extra packages are needed when using GridFS with Laravel MongoDB?

Install the required helper file packages with Composer. Without them, file operations can fail with a runtime exception.

### Where do I find instructions for a self-managed MongoDB deployment?

The self-managed deployments documentation provides installation and administration instructions, including installing a deployment and managing replica sets.

## Alternatives

- Apache Cassandra
- CockroachDB: CockroachDB is a distributed SQL database for developers and operators of transactional applications that need horizontal scaling and resil…
- CouchDB: CouchDB is a document-oriented NoSQL database with a RESTful HTTP/JSON interface for storing, querying, and synchronising JSON documents ac…
- FerretDB: FerretDB is an open-source MongoDB compatibility proxy for self-hosted stacks.
- KeyDB: KeyDB is a distributed, Redis-compatible key-value database that adds true multi-master replication, letting any number of servers accept w…
- 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…
- 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.
- RavenDB: RavenDB is an open-source, transactionally consistent document database that stores application data in flexible records, helping developer…
- 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.
- SurrealDB: SurrealDB is a modern "all-in-one" database that stores and organises your app's information.

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