Uptime Robot ratio (30 days)      

✨ Debian Bullseye / Bookworm / Testing / SID MongoDB and MongoDB Tools build stable

It is basically a built for the latest MongoDB for Debian.

Unfortunately, I never tested it on any other architecture, but x64, so, it is possible it will not build other CPU types. See this link.

The current version is the r4.2.8 build (https://docs.mongodb.com/manual/release-notes/ ).

There is a newer version 4.3.0, but given, we use NoSQLBooster, it only works with 4.2.0 and the 4.2.x is the stable, the next stable will be 4.4.0, 4.6.0 and so on...


It will remove all mongodb* apt packages in ./scripts/build-server.sh and /etc/systemd/system/mongodb-server.service is replaced.

It installs the required apt dependencies and generates the SystemD service and makes it enabled.

Check, if the build works (building is below). If there is an error, of course, you will not deploy on your server. But, if it builds, then it puts the binaries into /usr/bin and you are done. You might want to create a backup first, but I never had an error to make the database into an unstable state.

There was a Docker file to build in a container, but it was slower and I deprecated.

Before, the script was building everything including unit tests, but it took so long, so I left it out, now, it can build on a 4/8 cores/threads Intel 7700k in 1-2 hours.

Scripts for building 

It can work with sudo, but the best if you are root. Of course, you can check the code, there is no harm for sure!

git clone https://github.com/patrikx3/docker-debian-testing-mongodb-stable
cd docker-debian-testing-mongodb-stable

If below you get an error, please create an issue, because it is possible, I have not added a package, because my server was already there, but I will add in it for you for sure with apt.

The default jobs for building is by the number of threads in the cpu, but you can override as a CORES variable.

1. Build MongoDB Server 

The command:

sudo ./scripts/build-server.sh


All defaults are in the config, that MongoDB uses:

  • /var/log/mongodb - log
  • /var/lib/mongodb - data

It generates everything, all you have to do:

sudo ./scripts/build-server.sh r4.2.8
# if you want to specify how many cores you wanna use do like
sudo CORES=4 ./scripts/build-server.sh r4.2.8

2. Build MongoDB Tools 

The command:


It generates and install GoLang and builds the tools that you find them in:

Then, it puts all tools into the default Debian /usr/bin directories.

The exact command is like:

sudo ./scripts/build-tools.sh r4.2.8

3. Start the services 

Before you start the database, but after the build , you are required to create a config (unless, you already have it), a skeleton is here:


Add safety to the mongodb config file 

sudo cp ./artifacts/root-filesystem/etc/mongodb.conf /etc/mongodb.conf
sudo chmod o-rwx /etc/mongodb.conf
sudo chown mongodb:mongodb /etc/mongodb.conf

After you created the config, you start the database like:
service mongodb-server start or service mongodb-server restart

build MissOut
onenoteGithub onenoteredis-uiGithub redis-uiangular-compileGithub angular-compilegitlistGithub gitlistramdiskGithub ramdiskfreenomGithub freenomopenwrt-insomniaGithub openwrt-insomniadocker-debian-testing-mongodb-stableGithub docker-debian-testing-mongodb-stablecorifeusGithub corifeusredis-ui-serverGithub redis-ui-serversystemd-managerGithub systemd-managerverdaccio-cliGithub verdaccio-clicorifeus-app-web-pagesGithub corifeus-app-web-pagesredis-ui-materialGithub redis-ui-materialxml2jsonGithub xml2jsoncorifeus-web-materialGithub corifeus-web-materialgrunt-p3x-expressGithub grunt-p3x-expresshtml-pdfGithub html-pdfbinary-search-closestGithub binary-search-closestangular-http-cache-interceptorGithub angular-http-cache-interceptorcorifeus-app-server-patrikx3Github corifeus-app-server-patrikx3corifeus-builderGithub corifeus-buildercorifeus-builder-angularGithub corifeus-builder-angularcorifeus-utilsGithub corifeus-utilscorifeus-webGithub corifeus-webjson2xls-worker-threadGithub json2xls-worker-threadfortune-cookieGithub fortune-cookietoolsGithub tools