# Configure mongodb to be remotely accessible

**URL:** <https://discuss.openedx.org/t/configure-mongodb-to-be-remotely-accessible/7799>\
**Category:** Tutor Help\
**Tags:** how-to, tutor, nutmeg\
**Created:** [July 13, 2022, 1:56am UTC](https://discuss.openedx.org/t/configure-mongodb-to-be-remotely-accessible/7799 "2022-07-13T01:56:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sidarth7](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@sidarth7](https://discuss.openedx.org/u/sidarth7)\
**Post date:** [July 13, 2022, 1:56am UTC](https://discuss.openedx.org/t/configure-mongodb-to-be-remotely-accessible/7799/1 "2022-07-13T01:56:49Z")

</div>

Hi,  
I currently have Tutor deployed through AWS and I’m trying to access MongoDB programmatically through R.  
Can someone guide me on how to configure Tutor for this?

I found this tutorial but I’m a bit lost as the MongoDB in Tutor is containerised.

> **[How to connect to your remote MongoDB server](https://ianlondon.github.io/blog/mongodb-auth/)**
>
> I have MongoDB running on my Ubuntu server in Amazon EC2. Since there’s no simple all-in-one tutorial out there explaining how to set up user authentication for Mongo so that you can read and write to your MongoDB server from your laptop, I decided...

---

<div class="post-metadata">

**Author:** ![uetuluk](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/uetuluk/32/3015_2.png) [@uetuluk](https://discuss.openedx.org/u/uetuluk)\
**Post date:** [July 13, 2022, 3:28am UTC](https://discuss.openedx.org/t/configure-mongodb-to-be-remotely-accessible/7799/2 "2022-07-13T03:28:05Z")

</div>

You will need to open the ports on the MongoDB container to allow access from outside the container, think of it as similar to the third step\[1\] in the guide you linked.

I have mentioned how to do this for Caddy on this topic but the basics are the same for MongoDB: [Caddy Metrics (Port 2019) - Tutor - Overhang.IO](https://discuss.overhang.io/t/caddy-metrics-port-2019/2655)

Be aware that this is a security risk and you should not do this on a production machine.

* * *

1. 
  1. Open port 27017 on your EC2 instance
