MongoDB Backup
Mirror your bot data to your own MongoDB in real time — connect any Atlas or self-hosted cluster.
Connect your own MongoDB and every write your bot makes is mirrored there in real time. Your bot keeps running on the platform — this is a live backup, not a migration.
How it works
When a custom MongoDB URI is set for a bot, every write operation (setProp, insertOne, updateOne, deleteOne, and all variants) is sent to both the platform database and your own cluster simultaneously. Reads always come from the platform database — your cluster receives a copy only.
The mirror write is fire-and-forget. If your cluster is temporarily unreachable the bot continues running without interruption and the platform copy is unaffected.
Setting it up
Open the bot editor and go to Settings → Custom MongoDB. Paste your connection URI and optionally specify a database name. The platform tests the connection before saving — if it cannot reach the cluster the URI is rejected.
| Field | Required | Description |
|---|---|---|
| Connection URI | Yes | Full MongoDB URI including credentials. `mongodb://` or `mongodb+srv://` schemes supported. |
| Database name | No | Which database to write into on your cluster. Defaults to the database in the URI if omitted. |
MongoDB Atlas
Atlas clusters restrict incoming connections by IP address by default. Because NxCreator bots run on shared infrastructure with dynamic IPs, you must allow access from all IPs for the connection to work reliably.
In the Atlas dashboard go to Network Access → Add IP Address and add 0.0.0.0/0 (Allow Access from Anywhere). Without this the connection will time out and the URI will be rejected during setup.
0.0.0.0/0 allowlist entry does not remove credential protection — your username and password are still required. It only removes the IP restriction layer.Write behaviour
- Dual-write: Every write goes to both the platform db and your cluster. The platform result is always returned to your bot code — your cluster write does not block execution.
- Reads from platform only:
findOne,findAll,getProp,countDocuments, andaggregatealways read from the platform db regardless of whether a custom URI is set. - Failure isolation: If the mirror write fails (network error, auth issue, cluster down) it is silently dropped. Your bot does not see the error and the platform copy remains intact.
- Per-bot: The custom URI is configured independently for each bot. Setting it on one bot does not affect others.
Collection names
In your custom cluster, collections are stored using the same names you use in your bot code — exactly as you pass them to db.insertOne, db.findOne, and so on. No prefix or modification is applied on your cluster side.