Database

Install MongoDB on your VPS

Infraa installs MongoDB Community Server 8.0 on your VPS from the official MongoDB apt repository — the only supported apt path, since Ubuntu's own archive stopped shipping MongoDB years ago. One approval covers the repository, the package set (server, mongosh, tools), and the service. The stock config binds to localhost. Ubuntu 22.04 and 24.04, on amd64 and arm64.

Versions
MongoDB Community Server 8.0, from the official MongoDB apt repository
Works on
Ubuntu 22.04 and Ubuntu 24.04 (amd64 and arm64)
Package source
Official MongoDB repository

What does the MongoDB install do?

  • Adds the MongoDB 8.0 apt repository with its release signing key — the key ships inside the module and is pinned at install time.
  • Installs the mongodb-org package set: the server, the mongosh shell, and the database tools.
  • Enables and starts the mongod systemd unit — the package deliberately leaves it stopped.
  • Writes no configuration: the package's stock /etc/mongod.conf binds to 127.0.0.1:27017, reachable only from the server itself.

How do I install MongoDB with Infraa?

  1. Connect your server

    Run the Infraa install one-liner (curl install.infraa.sh | sh) on your VPS. The agent registers over an outbound connection in about 30 seconds — no inbound ports, no SSH keys to share.

  2. Pick the service

    Choose it from the one-click catalog in the dashboard, or just ask in chat. Infraa turns your request into a concrete, reviewable plan.

  3. Review and approve

    Read exactly what will run, then approve. The agent executes only the approved, cryptographically signed steps and streams progress live.

What happens after the install?

Infraa checks MongoDB every 60 seconds — the mongod unit and port 27017 connectivity. The stock install has authorization disabled, so any local process can read and write every database; Infraa's standing recommendation is to create an admin user and enable access control early, and it walks you through exactly that in chat.

MongoDB on Infraa — common questions

01

Is MongoDB exposed to the internet after the install?

No. The stock config binds to 127.0.0.1:27017, so only processes on the server can connect. But authorization is disabled by default, meaning any local process has full access — create an admin user and enable access control early; Infraa proposes this as a standing recommendation.

02

Why is MongoDB Ubuntu-only on Infraa?

MongoDB publishes a separate Debian repository with a different layout, so Debian 12 support is a future revision. Today the module targets Ubuntu 22.04 and 24.04, on both amd64 and arm64.

03

Is MongoDB Community Server open source?

It's source-available under the SSPL, not an OSI-approved license. Running MongoDB for your own applications — which is what this install sets up — is unaffected; the SSPL's obligations apply only if you offer MongoDB itself to third parties as a service.

Connect a server in 30 seconds, then install MongoDB from the catalog or just ask in chat.