Configure a MongoDB user for Infisical
1
Create a MongoDB user
Infisical recommends creating a designated user in your MongoDB database for your connection.
2
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
1
Navigate to App Connections
In your Infisical dashboard, navigate to the App Connections page in the desired project.

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

3
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

4
Connection Created
After clicking Create, your MongoDB Connection is established and ready to use with your Infisical project.
