Databases

MongoDB Hosting

MongoDB is a NoSQL document-based database. It supports different deployments for high-availability and scalability use cases.

Serverless MongoDB cluster

Easily spin up a MongoDB cluster onto your instances in a serverless workflow. Effortlessly scale replicas and compute when demand requires. Northflank provides an optimised developer experience for you to access metrics, backups and restores in a container based deployment.

As things start to scale, select from a range of plans starting at $2.70 per month.

MongoDB versions supported: 5.0.5, 4.4.11, 4.2.18, 4.0.27

Need to deploy on your Kubernetes cluster? Click here.

MongoDB on Northflank

Ready for scale

Horizontal and vertical scaling with replicas and increased compute capacity.

Backups and restores

Create, import, and delete backups, as well as restore your database from an existing backup.

Observe and Monitor

Observe your database in real-time with log tailing and performance metrics.

Pause and resume

Pause and restart your running MongoDB database at any time enabling experiments and dev databases.

Advanced networking

Secure private network, enable public load-balancing and connect locally with Northflank CLI proxy.

TLS and secure connection

Connect your workloads to MongoDB securely with TLS and generated connection details.

MongoDB on Northflank dashboard

MongoDB use cases

  • Real-time data processing
  • Logging and aggregation
  • Content management systems
  • Product data management
  • Customer analytics
  • Big data

Supported MongoDB versions

  • 5.0.5
  • 4.4.11
  • 4.2.18
  • 4.0.27

MongoDB Docker Image

mongo:latest

Pull MongoDB Docker Image locally

docker pull mongo

Connect to MongoDB locally with Northflank CLI

sudo northflank forward addon --projectId --addonId

MongoDB Ports

27017

Using Mongo client to connect to remote MongoDB instance

mongo "mongodb+srv://user:password@hostname/database?replicaSet=rs0&authSource=database&tls=true"

Platform Teams

Northflank makes it easier for infrastructure and platform teams to focus on levelling up the developer experience for their teams building great apps.

Common MongoDB questions among developers and platform teams:

How to securely connect to a MongoDB database from developer workstations?

You can access a MongoDB database from your machine using the Northflank CLI. To forward a specific database or storage: <code>sudo northflank forward addon --projectId [project-name] --addonId [addon-name]</code> You can now access the database or storage locally.

How to set up an external connection outside of the cluster?

When creating an addon, under Networking you can choose “Publicly accessible”. Once the addon is created, you can make the addon publicly accessible from the Settings page. If “Publicly accessible” is selected, your addon will be given a public URL and will be accessible from the internet.

How to provision SSL and TLS for a database?

When creating an addon, under Networking you can choose “Deploy with TLS”. Once the addon is created, you can provision SSL and TLS from the Settings page by choosing “Deploy with TLS”. If “Deploy with TLS” is selected, a Let’s Encrypt TLS certificate will be provisioned for your addon, allowing secure communication between the addon and your services/jobs within this project.

How to scale a MongoDB deployment with more replicas or resources?

When creating an addon, under resources you can choose the compute plan (memory and virtual CPU), storage and replicas. Once the addon is created, under resources you will always be able to change these to adapt to your needs.

How to backup a MongoDB cluster?

On the backups page you can create, import, and delete backups of your MongoDB cluster.

How to restore a MongoDB cluster?

You can restore your database from an existing backup from the backups page. This page will display a list of backups and each entry will have a Restore button you can use to restore from that selected backup. The backup will be scheduled and executed shortly.

How to import from another MongoDB cluster?

You can import a backup from multiple sources: URL, file upload, and connection string. When importing from a URL or file upload, Northflank will treat it as clear text, unless the file ends in.gz, then Northflank will attempt to unzip it. When importing from a connection string, it should contain the relevant credentials and parameters. Northflank will create a dump from the source database which you can then restore from.

How to fork a MongoDB cluster?

To fork a MongoDB cluster, you can create a backup of an existing MongoDB addon from the backups page and create a new addon using this backup.

MongoDB on Kubernetes with Northflank

Deploying MongoDB onto Kubernetes can be difficult to bootstrap, operate and scale. Your current options may involve manually rolling MongoDB Helm charts, YAML, statefulsets, replicasets, services, persistent volumes, ingress, Horizontal Pod Autoscaling (HPAs), Pod Disruption Budgets (PDBs), prometheus metrics, certificates and logging.


Northflank offers a comprehensive stateful workload solution. Run a highly scalable and performant MongoDB database in your AWS, GCP and Azure accounts using Kubernetes and Northflank’s platform.

MongoDB in your cloud

Automate your MongoDB hosting and management using a real-time UI and developer friendly CLI & API. Deploy, monitor, backup, and scale with Northflank cloud or on your cloud account.