---
title: "MongoDB document database on a VPS · CloudSat"
description: "Self-host MongoDB Community Server on a CloudSat VPS: flexible JSON-style documents, indexes, aggregation, transactions and replica sets on NVMe."
url: https://cloudsat.io/apps/deploy-mongodb
updated: 2026-11-18T15:52:35Z
source: CloudSat (https://cloudsat.io/). Prices in USD.
---

[Databases](https://cloudsat.io/apps/category/database-servers) Editor's pick

# MongoDB on a VPS

MongoDB Community Server stores data as flexible BSON documents, with rich queries, indexes, aggregation and replica sets, on a server you control.

[Deploy MongoDB](https://dash.cloudsat.io/console/deploy?image=app%3Amongodb&plan=cloud-1g) [All apps](https://cloudsat.io/apps)

## About MongoDB

MongoDB stores records as BSON documents with nested fields and arrays, so a collection can hold items of different shapes. Community Server adds indexes, aggregation, transactions and replica sets, free under the Server Side Public License.

Self-hosting keeps the data in the region closest to your app. The WiredTiger cache holds the working set in RAM, so resize to a larger CloudSat plan when data outgrows memory.

`mongod` runs as a systemd service on port 27017 with `mongosh` installed. Upstream packages start with access control off and bound to 127.0.0.1.

## What you get with MongoDB

- Schema-free documents with nested fields and arrays
- Compound, text, geospatial and TTL indexes
- Aggregation pipeline with `$lookup` joins
- Multi-document ACID transactions
- Replica sets, sharding and change streams

## MongoDB use cases

- Back an app whose data model is still moving
- Store catalogs, profiles or event logs with varied fields
- Run a three-node replica set across CloudSat servers

## After you deploy MongoDB

1. When the console shows **Running**, SSH in as root and check `systemctl status mongod`.
2. In `mongosh`, create an administrator in the `admin` database with `db.createUser()` and the `root` role.
3. Set `security.authorization: enabled` in `/etc/mongod.conf`, then `systemctl restart mongod`.
4. Before widening `net.bindIp`, allow 27017 only from your app servers in a CloudSat firewall and add TLS.

## MongoDB ports

Open these in your firewall if you use one: `27017/tcp MongoDB (keep private)`.

## MongoDB FAQ

### Is MongoDB Community open source?

Its source is public, but the SSPL is not OSI-approved. Running it for your own apps is fine; selling MongoDB itself as a service triggers the license's source-sharing terms.

### How much RAM does MongoDB need?

The default WiredTiger cache is half of RAM minus 1 GB. 1 GB suits development; give production 4 GB or more so indexes stay in memory.

### Can I connect MongoDB Compass?

Yes, through a tunnel: `ssh -L 27017:localhost:27017 root@<server IP>`, then point Compass at `localhost` so the port never faces the internet.

**Disclaimer.** The MongoDB project has no affiliation with CloudSat and does not endorse it. Names and logos belong to their owners and appear only to identify the software.

## Apps like MongoDB

[All apps in Databases](https://cloudsat.io/apps/category/database-servers)

- [FerretDB](https://cloudsat.io/apps/deploy-ferretdb): Databases FerretDB speaks the MongoDB wire protocol and stores documents in PostgreSQL. Keep your MongoDB drivers and tools on an Apache-licensed stack.
- [Apache CouchDB](https://cloudsat.io/apps/deploy-couchdb): Databases Apache CouchDB stores JSON documents behind an HTTP API and replicates between servers, browsers and phones. The backend of choice for offline-first apps.
- [PostgreSQL](https://cloudsat.io/apps/deploy-postgresql): Databases PostgreSQL is a mature open-source relational database with strong SQL standards support, JSONB, full-text search, replication and a deep extension ecosystem.
- [Redis](https://cloudsat.io/apps/deploy-redis): Databases Redis is an in-memory data store used as a cache, message broker and session store, and since Redis 8 also as a JSON, search and vector engine.
- [Adminer](https://cloudsat.io/apps/deploy-adminer): Databases Adminer is a full database manager in one PHP file: browse tables, run SQL, edit rows and export dumps for MySQL, MariaDB, PostgreSQL, SQLite and more.
- [Apache Kafka](https://cloudsat.io/apps/deploy-apache-kafka): Databases Apache Kafka is a distributed event streaming platform: durable, partitioned logs that producers write to and consumers read at their own pace.
