MongoDB 3.2 (64 bit) running on Raspberry Pi 3 – with caveats

Add Comment

Debian buster + MongoDB for Raspberry Pi 3

I’ve been asked multiple times if MongoDB 3.2 (or greater) can run on a Raspberry Pi.  The answer has always been “no” — as you need a 64-bit OS to run versions >= 3.2.  Some 64-bit Linux OS’s are starting to become available for R-Pi that, in theory, could run 64-bit MongoDB.  I finally found a configuration that was easy to install and use.  I now have MongoDB 3.2.17 running under Debian buster on a Raspberry Pi 3 — with caveats 😉

The Debian buster release for Raspberry Pi 3 is NOT yet an official image. The hardware still needs the non-free R-Pi firmware to boot. NOTE: this image will NOT work for the new R-Pi 3B+.  There are not a lot of apps available that currently run under buster.  My install is strictly terminal based — or headless (via ssh).  The MongoDB utilities are NOT yet ported.  You can run “mongod”, “mongos” and the “mongo” shell but you’ll need to run utilities such as “mongodump” and “mongorestore” from another computer.

Here is the how-to:

  • get and install the Debian buster image on a microSD Card
  • boot the R-Pi 3 under Debian buster
  • update the OS via “update” and “upgrade”
  • install MongoDB via “apt-get install”
  • configure memory and swap
  • test out your configuration
  • put data into MongoDB database(s)
  • enjoy!

Detailed instructions after the break…


UPDATE: MongoDB 3.6 on ODROID C2 with Ubuntu 16.04.3 – ARM64

1 Comment

I’ve blogged before on MongoDB running on a 4 ODROID C2 SBC Cluster with external SATA drives — see this post.  I had tried both Arch and Ubuntu flavors of Linux.  I pointed out that MongoDB has an official Enterprise Server Version for Ubuntu 16.04 ARM 64.  MongoDB Release 3.6.3 is currently available for download (as of 24 February 2018).  Please check the license terms of the “Enterprise Server Version”.  Note that there is also a “Community Server” version that might better meet your needs and/or avoid restictions.

I use a MongoDB database to analyze data extracted from logs on Linux production servers that handle hundreds of thousands of users per day.  I also have databases that I use for research topics – oriented around K-12 education.  I have pulled data from The British Library and various datasets from the Europeana Collections.

OK, here is the quick and simple way to install the latest MongoDB on your ODROID C2 running Ubuntu 16.04…


Replace that tennis ball with a talking Raspberry Pi!


The challenge is not to hit the ladder while parking

Our garage has a ladder sticking out near where we park our car.  We want to park close to the ladder leaving enough room to walk in front of the car and also allow room behind the car for the garage door to close. A typical solution to this need, and one we’ve used in the past, is to have a tennis ball on a string positioned such that the car window nudges the ball and shakes the string — so you know when to stop.  A great analog solution!  I, however, desired a digital solution that incorporates a Raspberry Pi.

This parking-assist solution doesn’t “speak” to me!

OK, a digital solution should either have a sensor that is tripped by the car or, even better, something that could dynamically measure and show the distance from the car to the ladder.  This would require some way to provide feedback to the driver.   Hmmmm, feedback could be visual or maybe via sound.  Yes,  that’s it!  I could have an R-Pi measure the distance and “talk” to the car driver.  Another project is born 😎



CouchDB 2.1 on Raspberry Pi (Raspbian Stretch)


CouchDB 2.1 on R-PiFrom the Apache CouchDB docs:

CouchDB is a database that completely embraces the web. Store your data with JSON documents. Access your documents with your web browser, via HTTP. Query, combine, and transform your documents with JavaScript. CouchDB works well with modern web and mobile apps.

CouchDB also has Fauxton, a native web-based interface built into CouchDB. It provides an interface to the majority of the CouchDB functionality, including the ability to create, update, delete and view documents and configuration parameters.

I’ve already written a blog post for installing CouchDB 2.0 under Rasbian Jessie for Raspberry Pi.  I’m updating my instructions for CouchDB 2.1 and Raspbian Stretch (in addition to Jessie). I’m presenting this “how-to” in coolbook form — i.e. just type in the commands as presented and you should end up with a functional CouchDB install.  For more background and info, check out my previous blog post.


MongoDB 3.0.14 for Raspbian Stretch


The main operating system for Raspberry Pi, Raspbian, continues to evolve.  The latest version as of August 2017 is “Raspbian Stretch” — based upon the current stable version of Debian 9.  The previous version was known as “Raspbian Jessie”.  One difference between versions is OpenSSL libraries. OpenSSL is a general purpose cryptography library that provides an open source implementation of the Secure Sockets Layer (SSL).  My previous builds of MongoDB relied on the older library.  As a result, my previous binaries for 3.0.14 and 3.0.9 do not run under Raspbian Stretch.  Given this change as well as other changes to MongoDB source and newer compilers, I could no longer compile MongoDB 3.0.14 with SSL.

After a few source tweaks and use of various compiler flags, I have manged to compile MongoDB core apps and tools.  These binaries do NOT support SSL and only run under Raspian Stretch on a Raspberry Pi 3.  [UPDATE — 2018 Mar 22] I have confirmed that these binaries work on the latest Raspberry Pi 3 Model B+ with the March 2018 version of Raspbian.



Add Comment

The Planetary SocietyMy wife, Claire, and I have been members of the Planetary Society since its founding in 1980. I was fortunate to be working at The Jet Propulsion Laboritory when Carl Sagen, Bruce Murray and Louis Friedman founded the society. Bill Nye, “The Science Guy” and space advocate, is now CEO.

The society’s mission has changed only slightly over the years and is now:

to empower the world’s citizens to advance space science and exploration. We advocate for space and planetary science funding in government, inspire and educate people around the world, and develop and fund groundbreaking space science and technology.

So, why this post and why this title? The Planetary Society has offered a year-free domain registration with the Top-level domain (TLD) of “space” to members. Well, I needed to take advantage of that and spread the word about this TLD. Being a big Science Fiction fan, the phrase, “Per aspera ad astra” came to mind. Several variants have already been taken so I had to be a (tiny) bit creative.

Until I think of “better” content and have time to put something together, the URL, points to this blog.








MongoDB 3.0.14 binaries for Raspberry Pi 3


[UPDATE: 26 August 2017 – The binaries referenced in this post only work with Raspbian Jessie!  If you have upgraded to Raspbian Stretch on a R-Pi 3 or R-Pi 3B+, get the newer binaries]

The mongoDB documentation at states that 32-bit binaries are deprecated with release 3.2 and will be unavailable in future releases.  The latest version with 32-bit support (i.e. R-Pi with Raspbian) is 3.0.14 as of March, 2017.  I have compiled MongoDB 3.0.14 for Raspberry Pi 2 and 3.  I needed a few tweaks to the build process I used to compile 3.0.9 and associated tools. Use the installation instruction in my previous blog post to install and run MongoDB 3.0.14 on R-Pi.  The only change is to download newer files.  I have compiled MongoDB and Tools with the SSL flag — so the SSL option is available.


Official MongoDB 3.4 on ODROID-C2 under Ubuntu


I’m a big fan of MongoDB but contrary to its “humongous” orientation, I like to think small as in ARM-based SBCs like the Raspberry Pi or ODROID-C2 and DBs under a terabyte 😉  You can get a lot of power out of tiny inexpensive computers and USB disk drives!  You can find my blog entries, below, for getting 32-bit MongoDB 3.0 working on R-Pi and 64-bit, MongoDB 3.2 working under ArchLinux ARM on ODROID-C2.

I had seen MongoDB community requests for a 64-bit ARM version and even a mention that there was “official experimental” development going on – including the efficient WiredTiger storage engine.  I recently perused the MongoDB Community Edition documentation for version 3.4 and saw a download option for “Ubuntu 16.04 Linux 64-bit ARM 64” on the MongoDB Download Center.  Ubuntu 16.04 is the default Linux supplied with the ODROID-C2 🙂  You can purchase a bare ODROID-C2 for US$40 at Hardkernel. Micro SD card or EMMC module with preinstalled Ubuntu Linux is extra.

Click more for installation instructions.


CouchDB 2.0 on Raspberry Pi


The Apache Software Foundation has released CouchDB version 2.0.  CouchDB 2.0, is a “distributed” version of CouchDB, a mature NoSQL, document-oriented data-store that is accessable via a RESTful JSON API. Developers can take advantage of CouchDB’s offline capability and reliable data sync for web, mobile and IoT apps at (any) scale.

[NOTE: September 2017 — CouchDB 2.1 and Raspbian Stretch have been released.  Check out updated instructions in this blog post]

Current Raspbian (November 2016) can “apt-get install” version 1.4 and I have previously written about getting CouchDB 1.6 running on the R-Pi.  I have now installed version 2.0.0 on an R-Pi 3 and am sharing the process.  It is pretty straightforward to get CouchDB 2.0 running on the R-Pi. It takes a combination of the R-Pi specific 1.6 install and the “generic linux” 2.0 install to get things running.


R-Pi Clock Radio – Zeroed!


clock_radio_20160909_smallWe had a really old alarm clock in our bedroom.  Really old.  The LED number segments, which were a nice dim red in color, had been dying at the rate of 1 segment a year and it was getting hard to read the time.  My wife finally had enough of my “I’ll get a new one real soon” excuse and bought a new big, bright, blue LED clock to replace the old clock.  It was blue … and *really* bright … even in its dim-mode 🙁  It had to go!

My converted 1942 Crosley Radio was collecting dust on my workbench.  I had finally received a Raspberry Pi Zero and Zero4U USB hub to play with but was already lusting after the new R-Pi Zero with camera port.  I recently upgraded the audio-output on my Mac from an old USB HiFiMan Express DAC to  a Schiit Modi DAC.   Hmmmmm, seemed like I had the ingredients to make a BIG clock “radio” with alarm(s) and great stereo audio?


Older Entries