Hosting mongoDB database locally, and being able to connect from an external network

Viewed 69

I am currently trying to host a MongoDB database on my local network (raspberry pi) and have the ability to connect to it from my google cloud server.

I have been having severe difficulties doing this and have recently found out that it's because the IP which the MongoDB is hosted on, is a local IP.

I have scouwered the web looking for a solution to hosting a local MongoDB database on another IP that can be connected to on my local network, but have not managed to find anything.

Any help would be really handy.

1 Answers

Was actually way easier than I thought, once I knew what to do.

Create port forward on my virgin media hub from my raspberry PI IP with the mongodb port, then in my mongodb connection instead of using my local IP i just use my public IP and it redirects the request to my raspberry pi.

Related