By Matt Cohen
We have two Apps both in the same VPC (confirmed by viewing them via the VPC dashboard).
The frontend app connects to the backend app via an environment variable which is currently the full DigitalOcean.app URL of the backend app. e.g. https://back-app-3gxb7.ondigitalocean.app/
The Private IP for back-app shows as: 10.124.0.5, so I tried to replace the env var with https://10.124.0.5/ but but my build failed due to not being able to make a connection to the backend. Is there something more I need to do on back-app to allow connections over the private IP?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there,
Just to confirm, when you say “frontend app”, is it a static site or a client-side JavaScript app that runs in the browser? If so, it won’t be able to reach your backend through the private VPC IP (10.x.x.x) since those addresses are only accessible inside the platform’s private network. In that case, you’ll need to expose the backend through a public endpoint and have the frontend call that.
If both apps are actually backend services deployed on App Platform within the same VPC, then internal routing should work, but the best approach is to group them as service components under the same app. That automatically handles private communication without having to manage IPs manually:
You can check out the official guide here: https://docs.digitalocean.com/products/app-platform/how-to/manage-internal-routing/
Could you share a bit more about how the frontend is deployed and how you’re trying to make the connection?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.