Configure a MongoDB user for Infisical
Create a MongoDB user
Infisical recommends creating a designated user in your MongoDB database for your connection.
Grant Relevant Permissions
Depending on how you intend to use your MongoDB connection, you’ll need to grant one or more of the following permissions.
- Secret Rotation
For Secret Rotations, your Infisical user will require the ability to create, update, and delete users in the target database:
The
userAdmin role allows managing users (create, update passwords, delete) within the specified database.Create MongoDB Connection in Infisical
- Infisical UI
- API
Navigate to App Connections
In your Infisical dashboard, navigate to the App Connections page in the desired project.

Select MongoDB Connection
Click the + Add Connection button and select the MongoDB Connection option from the available integrations.

Fill out the MongoDB Connection Modal
Complete the MongoDB Connection form by entering:
- A descriptive name for the connection
- An optional description for future reference
- The MongoDB host URL for your database
- The MongoDB port for your database
- The MongoDB username for your database
- The MongoDB password for your database
- The MongoDB database name to connect to

