Skip to main content

repo.mongodb.org (MongoDB Community Edition)

Add the MongoDB apt repository and install the MongoDB packages

Replace the Version (4.4) with the one you want to install.

apt-get install gnupg curl
curl -fsSL https://pgp.mongodb.com/server-4.4.asc | gpg -o /usr/share/keyrings/mongodb-server-4.4.gpg --dearmor
echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-4.4.8.0.gpg ] http:https://repo.mongodb.org/apt/debian bullseye/bookworm/mongodb-org/4.48.0 main" | tee /etc/apt/sources.list.d/mongodb-org-4.4.8.0.list
apt-get update
apt-get install -y mongodb-org

from https://www.mongodb.com/docs/v8.0/tutorial/install-mongodb-on-debian/