MongoDB URI Authentication
Last updated
Last updated
The connection between Rocket.Chat and MongoDB instance is achieved using a . MongoDB authentication is done with the username and password.
Adding the following snippet to your .env
file does the trick:
In your container, pass MONGO_URL
and MONGO_OPLOG_URL
with the right values for connection.
Your docker-compose.yml
file should look like this:
If you are using docker run
, it should look like this:
MongoDB authentication role
If you are using MongoDB authentication, you might also need to add the role to your user. The clusterMonitor
role gives users read-only access to MongoDB monitoring tools. This is a requirement for your instance to be able to use . Change streams allow your workspace to react to real-time changes in data
Execute the following command, replacing the users with that selected for your users: