Static IP for Heroku and MongoDB Atlas

Secure and Reliable Connectivity for Distributed Database Clusters.

By utilizing our high-availability static gateways, you ensure that every node in your distributed database cluster recognizes and authorizes your application's traffic.

This architecture eliminates connection timeouts caused by rotating IPs while maintaining a hardened security posture through E2EE-protected routing.

MongoDB logo connected to a shield icon with a lock, symbolizing database security.

Solving the Dynamic IP Constraint for MongoDB Atlas

MongoDB Atlas requires a specific IP or CIDR block whitelist to authorize connections, which presents a challenge for applications running on Heroku’s Common Runtime.

Because Heroku dynos operate on a pool of dynamic AWS IP addresses that rotate frequently, maintaining a secure firewall on Atlas is impossible without a static gateway.

QuotaGuard provides a consistent, dedicated IP presence that ensures your database remains locked down while your application scales and restarts seamlessly.

Streamlined Integration via QGTunnel

One of the most difficult aspects of connecting Heroku to MongoDB is managing the complex protocol requirements of distributed clusters and replica sets.

QuotaGuard simplifies this by using QGTunnel, a specialized wrapper that handles the network routing at the process level.

By leveraging Transparent Mode, QGTunnel allows your application to communicate with MongoDB as if it were a direct connection, removing the need for custom proxy logic or driver modifications.

No Code Modifications Required

When using QGTunnel in Transparent Mode with matching ports, you do not need to change your connection strings or driver configurations.

The tunnel intercepts the request at the network layer and routes it through the static gateway, allowing you to use your standard MongoDB URI exactly as it is.

Support for MongoDB+SRV URLs

Connecting to a cluster via an SRV record requires routing to multiple backend shards, which can be difficult to configure manually.

QuotaGuard provides a clear workflow for looking up shard hostnames and creating the necessary tunnels to ensure that every part of your replica set is correctly mapped through your static IP.

Simple Procfile Integration

Implementation is handled by prepending a single command to your startup process in your Heroku Procfile.

This ensures that every time your dyno boots up, the tunnel is initialized automatically and manages all outbound database traffic without any manual intervention.

Digital shield with IP address 35.123.45.67 connected to HTTP and SOCKS5 proxies and cloud storage icons with encryption lock.

E2EE Architecture for Sensitive Data Environments

For organizations handling sensitive information such as PII, PHI, or financial data, standard proxying is often insufficient to meet rigorous compliance standards.

QuotaGuard Shield offers an E2EE (End-to-End Encryption) architecture that ensures data is protected throughout the entire transit path.

This approach allows you to satisfy HIPAA, PCI, and SOC2 requirements while maintaining the high-performance connectivity required for modern cloud-native applications.

FAQs

Technical Configuration and Setup for MongoDB

How do I configure MongoDB Atlas to work with QuotaGuard?

First, provision the add-on and note your two static IPs, then add them to the Network Access tab in the MongoDB Atlas dashboard.

Next, you must download the qgtunnel package into your project root and configure the tunnel settings in the QuotaGuard dashboard.

If you are using a mongodb+srv URL, you will need to look up your cluster’s shards via SRV records and create a tunnel for each shard hostname to ensure the entire replica set is covered.

Be awayre...MongoDB is tricky...Please see our in-depth guide here:  https://www.quotaguard.com/docs/language-platform/mongo-db/connect-mongodb-static-ip

Does QuotaGuard require code changes to handle MongoDB connection strings?

No, provided you utilize QGTunnel in Transparent Mode.

Transparent Mode allows the software to override the DNS for your MongoDB hostnames and redirect traffic locally to the tunnel, which then passes it through the static proxy.

If you match the local and remote ports (typically 27017 for MongoDB), your application can continue using its original connection string without any modification to the host, port, or driver logic.

How do I handle the startup process on Heroku?

Integration is handled via your application's Procfile. You simply need to prepend your standard startup command with bin/qgtunnel.

For example, a web process that previously ran npm start would be updated to web: bin/qgtunnel npm start.

This ensures the tunnel binary is the parent process, allowing it to manage the network environment for your application from the moment it starts.

What is the difference between QuotaGuard Static and QuotaGuard Shield?

QuotaGuard Static provides the standard dual-IP gateway for routing outbound traffic through a known identity.

QuotaGuard Shield is designed for high-compliance environments and includes an E2EE (End-to-End Encryption) architecture.

While both provide the same static IP benefits, Shield ensures that QuotaGuard cannot see or access any data passing through the proxy, making it the required choice for applications that must adhere to HIPAA, PCI, or SOC2 standards.

How do I troubleshoot connection errors between my Heroku app and MongoDB Atlas?

If you encounter connectivity issues, you can enable verbose logging by setting the QGTUNNEL_DEBUG environment variable to true and restarting your application.

This will output detailed technical logs to your Heroku console, allowing you to verify that the tunnel is correctly intercepting and routing your database requests.

Our engineering team can use these redacted logs to help identify network-level bottlenecks or DNS resolution errors within your specific configuration.

How do I ensure my database connection remains stable during QuotaGuard administrative maintenance?

To maximize uptime and eliminate dependencies on our administrative API, you should download a local configuration file from your dashboard and save it as .qgtunnel in your application’s root directory.

This hardening step ensures the QGTunnel binary initializes using local settings upon every dyno boot, providing immediate connectivity regardless of external API availability.

Committing this file to your repository is a production best practice for any enterprise application requiring high-availability MongoDB access.

Can I test my QuotaGuard MongoDB configuration in a local development environment?

The QGTunnel binary is designed specifically for Linux-based environments and is not natively compatible with macOS or Windows.

To verify your MongoDB connectivity and tunnel configurations before deploying to Heroku, we recommend using a Virtual Machine or a Docker container running a Linux distribution such as Ubuntu.

This ensures that your local testing environment accurately mirrors the production networking stack where your application will be running.

Still have questions?

We don’t outsource Support to non-Engineers.

Reach out directly to the Engineers who built Shield to discuss your specific architecture, integration challenges, or compliance constraints here 👇

🚀 Ready to Get Started? Choose Your QuotaGuard Path

QuotaGuard STATIC

Why: You need a rock-solid, fixed IP for general API access, AI workflows, or standard third-party integrations.
Best For: Developers, startups, and general application connectivity.
Key Feature: SOCKS5 support for secure database access.
Sign Up for QG Static for Heroku

QuotaGuard SHIELD

Why: You handle HIPAA, PCI, or sensitive PII data and require End-to-End Encryption (E2EE) for full compliance.
Best For: Regulated industries, financial services, and healthcare.
Key Feature: SSL Passthrough and key isolation.
Sign Up for QG Shield for Heroku

Trusted by Engineering Teams Everywhere

What our customers say

Customer experiences, in their own words. Swipe or scroll to read more.

We've been using QuotaGuard Static for nearly six years to provide static IP addresses to our clients so they are able to whitelist our network traffic.

Read full testimonial

We've been using QuotaGuard Static for nearly six years to provide static IP addresses to our clients so they are able to whitelist our network traffic.

The service has been hassle free, has never "not worked" or had any downtime to my knowledge. The only time we've reached out to support was during a migration from one cloud provider to another to ensure that we wouldn't cause interruptions in the service ourselves. The service we received at that time was prompt and professional.

Zach ColonVP of Engineering at ItsaCheckmate.comSubmitted Oct 20, 2023

The app's backend runs on serverless functions, and the railway data provider I was using only accepted requests from a fixed IP address. QuotaGuard gave me exactly that, and my passengers' PNR status checks kept working.

Read full testimonial

I used QuotaGuard Static IPs for ClearBerth, my train app for Indian Railways passengers. The app's backend runs on serverless functions, and the railway data provider I was using only accepted requests from a fixed IP address. QuotaGuard gave me exactly that, and my passengers' PNR status checks kept working.

It helped me because I could keep building the app without worrying about how to get a static IP. For a solo developer that is a real relief.

The best thing about QuotaGuard is the owner himself. Michael is kind, thoughtful and genuinely warm. When I wrote to say thank you, he replied personally, said it made his Sunday morning, and offered a returning customer discount for any future project. You do not often get that from a service company. I would happily use QuotaGuard again and I recommend it to any developer who needs a static IP.

Aditya Bhattacharya, ClearBerth

Aditya BhattacharyaFounder of ClearBerth appSubmitted Oct 18, 2026

QuotaGuard provided a static IP address via a SOCKS5 proxy. Setting up the proxy and using it from my server was very straightforward.

Read full testimonial

I have a web app running in Heroku, and that server occasionally needs to FTP files from another host. That host required requests to come from a whitelisted IP address. QuotaGuard provided a static IP address via a SOCKS5 proxy. Setting up the proxy and using it from my server was very straightforward.

Stephen BeitzelCTO, Narrative TechnologiesSubmitted Mar 28, 2024

I use QuotaGuard to connect with various APIs that require IP whitelisting and run web automations that require a country-specific IP. The stability and reliability of the service have been nothing short of exceptional.

Read full testimonial

I use QuotaGuard to connect with various APIs that require IP whitelisting and run web automations that require a country-specific IP. The stability and reliability of the service have been nothing short of exceptional. It simply works as expected and whenever I’ve had any questions Michael and the team are always very quick to respond to emails. I would recommend them without a doubt.

Jose VilchesCEO at SIM StoreSubmitted Oct 29, 2023

QuotaGuard has been a reliable partner for us for many years. Their service has consistently been solid, and when we ran into a more unusual use case, their team understood the situation quickly and worked closely with us to resolve the issues.

Read full testimonial

QuotaGuard has been a reliable partner for us for many years. Their service has consistently been solid, and when we ran into a more unusual use case, their team understood the situation quickly and worked closely with us to resolve the issues. That level of responsiveness and support has made a real difference for us.

Anton Litvinenkoco-founder @ Import2Submitted Aug 11, 2026

QG helped us prove our pipeline and workflow with users and in the end, we would have stayed but we use AWS for all our production so we had to switch. Sorry to go but loved every minute of it!

Read full testimonial

QUOTAGUARD FTW! We used qg for spooling up a prototype that needed access to MongoDB through Heroku without having to use 0.0.0.0 in mdb whitelist. Big nono for privacy and security. QG helped as we were able to add it as a resource in Heroku and test our prototype. As the platform matured, more test users came on board and our bandwidth scaled to a point where we were no longer a prototype so we moved over to AWS which is where our production apps live. The team at QG is beyond awesome. I sent an email and I think within 24hrs or less we had solved the issues with Tim and Michael. The fact they didn't pester after signup was refreshing as well. They are Dev dev's who get it. QG helped us prove our pipeline and workflow with users and in the end, we would have stayed but we use AWS for all our production so we had to switch. Sorry to go but loved every minute of it!

Greg LuttonCEO Exsurgo TechnologiesSubmitted Jun 1, 2026

Even though the issue was bank related, Michael and Randall provided exceptional support and helped me troubleshoot the issue.

Read full testimonial

I've had a issue tunneling requests to my bank's VPOS through QuotaGuard.

Even though the issue was bank related, Michael and Randall provided exceptional support and helped me troubleshoot the issue.

5 stars service, highly recommended!

Ozgur S.FounderSubmitted Jul 21, 2026

The product works great - but where they really shine is the exceptional customer service.

Read full testimonial

I needed to configure a static IP address for my app running on Heroku, so I could connect to an external database in a more secure manner. A colleague recommended Quotaguard as an option.

The product works great - but where they really shine is the exceptional customer service. One of my background workers was sneakily polling, which didnt show on the logs, and the Quotaguard support team showed patience and knowledge helping me get to the root of the problem. Fantastic team.

AlexSubmitted Aug 1, 2024

QuotaGuard is an excellent company to work with, they really helped me out on my API issue. Appreciate them as a partner.

Read full testimonial

QuotaGuard is an excellent company to work with, they really helped me out on my API issue. Appreciate them as a partner.

John William MeyerCEO, Jump FinanceSubmitted Sep 30, 2026

Solid service. :) Does what's on the tin.

Read full testimonial

Solid service. :) Does what's on the tin. They know what they're doing, and I mean that in two ways: (1) their execution of their value offering is *solid*, and (2) they appear undistracted by things that *aren't* what they're doing. A "small, sharp tools", you know?

IsaacLightwardSubmitted Jan 25, 2024

Reliability Engineered for the Modern Cloud

For over a decade, QuotaGuard has provided reliable, high-performance static IP and proxy solutions for cloud environments like Heroku, Kubernetes, and AWS.

Get the fixed identity and security your application needs today.