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
$lookupjoins - 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
- When the console shows Running, SSH in as root and check
systemctl status mongod. - In
mongosh, create an administrator in theadmindatabase withdb.createUser()and therootrole. - Set
security.authorization: enabledin/etc/mongod.conf, thensystemctl restart mongod. - 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.