Search code examples
mongodbnetwork-programmingraspberry-piremote-accessraspbian

How do i remotely update a mongodb, when i dont have a public ip for my pc?


I have a raspberrypi which has a 3g modem attached to it. I run a mongodb instance on the raspberrypi. How do i remotely connect to the instance and run update queries? The public ip of the modem keeps changing. I use bitsync for managing files in the same scenario.


Solution

  • Use a dynamic DNS service so your pi has a public internet host name. A quick search for dynamic dns turned up dnsdynamic.org (which I have never used and have no association with) which claims to be a free service. You will have to run a little app on the pi to update the dns record using e.g. The perl client they have. They seem to have several domains you can use and also seem to provide domain hosting so you could use your own domain name with them. I'm sure there are other dynamic dns services out there with simular offerings.