MongoDB
Run MongoDB on dFlow: document database, MONGO reference variables, and multi-port behavior when you Expose.
Written By Charan
Last updated 3 days ago
MongoDB stores documents (JSON-like) in collections. It fits evolving schemas, nested objects, and workloads where a rigid SQL schema is awkward.
Overview of the database model in dFlow: Databases overview.

When to choose MongoDB
Choose MongoDB when a document model matches your product, or your stack already uses official MongoDB drivers and patterns. For relational reporting and strict multi-table constraints, Postgres is often simpler.
Create and deploy
Applications β Environment β Add New β Add service β Database β MongoDB.
Create Service β Deploy.
Wait until provisioning succeeds.
Connection details on Overview
Internal credentials include:
A
mongodb://β¦connection URL.Username, password, host, port, and database name for clients that need discrete fields.
Use the internal URL for applications in the same environment.

Link your app: reference variables
Variables β { } menu. Example:
{{ my-mongo.MONGO_URI }} Internet access (Expose)
MongoDB differs from Postgres or MySQL: Expose may provision more than one public port for the protocols MongoDB uses. You still click Expose once; Overview shows the primary public URL/host/port information most clients need.
Keep using internal URLs for apps running on dFlow. Use Expose when an external client must connect (backup tools, local shells, partners).
Unexpose before Stop if the database was exposed.
Day-to-day actions
Restart, Stop, and Expose / Unexpose follow the same dashboard rules as other databases, including Unexpose before Stop when public, and Deploy hidden after the first successful provision. See Databases overview.