MongoDB 8.x Community Edition on Raspberry Pi 5

I’m frequently asked about running MongoDB on Raspberry PI. My old binaries, on this blog, no longer work as some required libraries have evolved and/or have lost support and distribution. All is not lost! You CAN run the latest version 8.0.x (as of mid-January 2025) on Raspberry Pi 5 with 8GB or 16GB RAM. I focus on the open source community distribution so I don’t need proprietary software of any type. You may miss some features of the commercial version. Ubuntu 24.04 OS is required to get things running. I could not get MongoDB to natively compile on the R-Pi. The good news is that MongoDB, the company, fully(?) supports an ARM version that runs on Ubuntu. Support in that a community version is available as a binary with full install scripts.

Installing is simple if you follow the instructions on the MongoDB website – providing you can find them – lol. In short from:

  • Install the latest Ubuntu 24.04 OS on your Pi via Raspberry Pi Imager. I installed server version 24.04.01.
  • Make sure your Pi is up to date:
    sudo apt update
    sudo apt upgrade
  • Import the public key for MongoDB:
    curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \
    sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \
    –dearmor
  • Create the list file:
    echo “deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse” | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list
  • Reload the package database:
    sudo apt upgrade
  • Install the community server which includes the usual tools and shell (mongosh):
    sudo apt install -y MongoDB
  • Start the server and test with shell app, mongosh:
    sudo service mongod start
    mongosh
    test> show dbs;

You can find detailed install instructions on the MongoDB website in the MongoDB Docs (https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/#std-label-install-mdb-community-ubuntu)

I hope this post helps folks that might be a bit lost in getting MongoDB running on a Pi 5! You can ask questions in the comments…

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top