Skip to main content

Credentials

1. Get Your Connection URI

Local MongoDB

MongoDB Atlas (Cloud)

  1. Create a database user and allow the application host through Network Access.
  2. Select your cluster, then Connect → Drivers.
  3. Copy the connection URI, replace its username and password, and percent-encode special characters in the credentials:
See the Atlas connection guide.

Self-hosted with Authentication

2. Set Environment Variables

For SDK guides, see MongoDB (Python) and MongoDB (TypeScript).