IP my Digital Ocean App

Posted October 17, 2020 2.8k views
MongoDBPythonDockerDigitalOcean App Platform

I required ip address of my server for MongoDB Atlas whitelist. I don’t see it in control panel.

I’ve tried:

  1. Ping host on my pc and getting this ip.
  2. By console on DO App control panel and python interpreter, like this: “` from requests import get

ip = get(’’).text
print(‘My public IP address is:’, ip)

This 2 methods returns 2 differences ip address. Unfortunately, neither of them doesn't work with Atlas MongoDB.

P.S. My app is in docker file.
1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi michaldev,

We currently don’t provide external IP addresses for apps in App Platform.

To use MongoDB Atlas with App Platform today, you’ll have to add the CIDR block to your access list entries in MongoDB Atlas. Make sure that you have strong credentials, since this will allow access from anywhere.


  • Hi there,
    I am a beginner with MongoDB Atlas. Could you explain what you mean by having strong credentials because I can’t quite figure out where to place these credentials when working with an Atlas DB. Currently anyone with the address of my backend server can send requests to my DB and this is obviously not what I want.

    Thank you,

  • Hi @meskinazi ,

    Is there still no update on this? I’ve seen this being discussed as early as last October.

    I’ve got clients breathing down my neck and now is the worst time to run into this problem.

    I’m trying to host Strapi CMS where I will be managing users. Using an unsecure database like this is illegal as it goes against GDPR.


    • @Bevelle am currently in the same boat
      I already have my app running

      Am currently required to provide an IP address for whitelisting to access a USSD service required by my app

      Am currently stranded, does someone have an idea of how to proceed ?

      • @drkimpatrick I think that there’s still no progress on this. I reached out to the developers of Strapi who it sounds like have connections at DigitalOcean. Unfortunately, I don’t think they’ve received a response after reaching out in over a week.

        In the end, I just went and used a regular DigitalOcean droplet and had to manually configure it over SSH, install a database, web server, set up services to listen to github etc.

        That’s probably run of the mill for some developers but it was my first time and a big learning curve. If you’re in the same boat as me and choose the same route, good luck!

        There might be other solutions which I’ve not found, or simply switching to another PaaS like Heroku, though their starting prices for things like a managed database start a fair bit higher than DigitalOcean, unless you look at their free tier.

        • Thanks @Bevelle let me consider heroku. It will be nice if digital ocean can create at least an add on providing static IP s

          • Yeah, though this kind of thing should really be working day-1 when they opened the PaaS 🤷🏼‍♂️

          • The pricing might affect it there. I thought a lot before getting into Digital Ocean… all though I am more comfortable with Heroku. No disrespect to Digital Ocean, it’s a great service with competitive pricing but minute things like this. And ease of deployment is the reason I am shifting from GCP.

    • I ended up on this for the same reason. I am using Digital Ocean for both my App and managed DB (Postgres). Trying to deploy the Strapi app for my back-end and I don’t want to leave my DB open like this.