Mongodb url, username and password via snap

I am trying to connect my installation to a MongoDB instance hosted via Atlas service at To connect, you need to add a username and password. I would like to know how to do this via snap (or any other way?)
this works:
sudo snap set rocketchat-server mongo-url=mongodb://
(completes successful, of course, does not connect because there is no user+pw)

this URL is rejected as “not a valid url”. However, without these parameters I can’t connect
sudo snap set rocketchat-server mongo-url=mongodb+srv://

1 Like