# Connecting to MongoDB

**URL:** <https://forum.rasa.com/t/connecting-to-mongodb/33615>\
**Category:** Rasa Open Source\
**Created:** [September 10, 2020, 10:45am UTC](https://forum.rasa.com/t/connecting-to-mongodb/33615 "2020-09-10T10:45:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zbot](https://avatars.discourse-cdn.com/v4/letter/z/ebca7d/32.png) [@zbot](https://forum.rasa.com/u/zbot)\
**Post date:** [September 10, 2020, 10:45am UTC](https://forum.rasa.com/t/connecting-to-mongodb/33615/1 "2020-09-10T10:45:28Z")

</div>

Hi, I am trying to store my conversations in MongoDB but I don’t exactly know how to proceed. I downloaded mongo as a service and the cli. I started mongo with the link provided in the option “connect” in the cluster.

I added the code provided in [https://rasa.com/docs/rasa/api/tracker-stores/#mongotrackerstore](https://rasa.com/docs/rasa/api/tracker-stores/#mongotrackerstore) to my endpoints.yml file.

```
tracker_store:
    type: mongod
    url: <url to your mongo instance, e.g. mongodb://localhost:27017>
    db: <name of the db within your mongo instance, e.g. rasa>
    username: <username used for authentication>
    password: <password used for authentication>
    auth_source: <database name associated with the user’s credentials>

```

However my conversations won’t get stored in the cluster. How can I achieve this?

---

<div class="post-metadata">

**Author:** ![zbot](https://avatars.discourse-cdn.com/v4/letter/z/ebca7d/32.png) [@zbot](https://forum.rasa.com/u/zbot)\
**Post date:** [September 10, 2020, 11:57am UTC](https://forum.rasa.com/t/connecting-to-mongodb/33615/2 "2020-09-10T11:57:42Z")

</div>

to connect it directly to the cluster I changed the URL

```
tracker_store:
    type: mongod
    url: mongodb+srv://cluster-<name of the cluster>.vc5jv.mongodb.net
    db: <name of the db within your mongo instance, e.g. rasa>
    username: <username used for authentication>
    password: <password used for authentication>
```

---

<div class="post-metadata">

**Author:** ![Juste](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/juste/32/15_2.png) [@Juste](https://forum.rasa.com/u/Juste)\
**Post date:** [September 11, 2020, 11:32am UTC](https://forum.rasa.com/t/connecting-to-mongodb/33615/3 "2020-09-11T11:32:36Z")

</div>

Hi @zbot. Is the connection still not working for you?

---

<div class="post-metadata">

**Author:** ![brunohjs](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/brunohjs/32/11489_2.png) [@brunohjs](https://forum.rasa.com/u/brunohjs)\
**Post date:** [November 16, 2020, 11:30pm UTC](https://forum.rasa.com/t/connecting-to-mongodb/33615/4 "2020-11-16T23:30:44Z")

</div>

Same problem… 😕

> [@I can't connect tracker store to mongo's cloud](http://forum.rasa.com/t/i-cant-connect-tracker-store-to-mongos-cloud/37061):
>
> Hi everyone! I need help! I’m trying to connect the tracker store to a cluster in mongo cloud. Here is my configuration of the connection to my cluster (obviously my login data will not be displayed). this is the error:
