MongoDB server must be in a replica set. If your deployment only has a standalone server, you can create a replica set with one member.

Need help? Check out this guide.

Required settings

  • Connection string
  • Service account

Connection string

  1. Go to Atlas UI
  2. Find your deployment and click “Connect”

We support both MongoDB SRV format or standard connection string.

MongoDB connection string

Creating a service account

You can either use the Atlas UI or use MongoDB CLI.

Option #1 - Atlas UI

  • Click on Database Access on the left
  • Click on Add New Database User
  • Under Database User Privileges, open Built-in Role and Select Only read any database

MongoDB Atlas

Option #2 - Service account script

/* If the user does not exist. */
use admin;
    user: "robin1",
    pwd: "<password>",
    roles: ["readAnyDatabase", {
        role: "read",
        db: "local"

/* If the user already exists */
db.updateUser("robin1", {
    roles: ["readAnyDatabase", {
        role: "read",
        db: "local"