# External MongoDB in rocketchat

**URL:** <https://forums.rocket.chat/t/external-mongodb-in-rocketchat/10217>\
**Category:** Community Support\
**Created:** [January 31, 2021, 7:03pm UTC](https://forums.rocket.chat/t/external-mongodb-in-rocketchat/10217 "2021-01-31T19:03:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![balancin](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/balancin/32/2541_2.png) [@balancin](https://forums.rocket.chat/u/balancin)\
**Post date:** [January 31, 2021, 7:03pm UTC](https://forums.rocket.chat/t/external-mongodb-in-rocketchat/10217/1 "2021-01-31T19:03:31Z")

</div>

Hello!

I’m trying to deploy my rocket.chat instance with snap using an external mongodb that have username, password and pem key file for ssl connection, but I don’t know how I can set my rocketchat settings with it. Which settings or parameters I need to set in rocketchat server to due that?

I did try using these commands:  
sudo snap set rocketchat-server mongo-url=mongodb://:/  
sudo snap set rocketchat-server port=  
([Snaps - Rocket.Chat Docs](https://docs.rocket.chat/installation/snaps))

These settings does not have paramaters like username, password or pem file for ssl connections. Could you help me even with some direction?

Thanks!

---

<div class="post-metadata">

**Author:** ![fdellwing](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/fdellwing/32/1737_2.png) [@fdellwing](https://forums.rocket.chat/u/fdellwing)\
**Post date:** [February 3, 2021, 7:57am UTC](https://forums.rocket.chat/t/external-mongodb-in-rocketchat/10217/2 "2021-02-03T07:57:50Z")

</div>

I have no idea how snap works, but MongoDB URI is documented here: [Connection String URI Format — MongoDB Manual](https://docs.mongodb.com/manual/reference/connection-string/). There are options to set username, password and certificate.
