Skip to content

Retiring MongoDB after upgrading to AIR v4.37+

This guide is for self-hosted and air-gapped environments that have already upgraded to AIR v4.37 or later.

It applies to:

  • Single-tier deployments (/opt/binalyze-air/docker-compose.yml)
  • Two-tier deployments (/opt/binalyze-air-db/docker-compose.yml)

From v4.37 onward, Timeline data is stored in PostgreSQL. MongoDB is no longer required for normal AIR operations.

Keeping an unused MongoDB container has drawbacks:

  • Security scan noise from CVEs in an unused image
  • Extra CPU, RAM, and disk usage
  • Operational overhead in upgrades and image management (especially in air-gapped environments)

No. AIR v4.37+ can still run if the MongoDB container remains in place.

However, removal is strongly recommended. Starting with v4.38+, air.mongo images are no longer shipped, which can create avoidable image-pull and maintenance issues in environments that pin tags.

  1. Confirm your Console is running v4.37 or newer in Settings > General > Version.
  2. Create an AIR backup in Settings > Backup History > Backup Now.
  3. Optionally create a VM snapshot for rollback safety.
Stop containers on the Console server
cd /opt/binalyze-air
docker compose down
Stop containers on the Console server
cd /opt/binalyze-air
docker compose down
Stop containers on the DB server
cd /opt/binalyze-air-db
docker compose down

Step 2: Edit docker-compose and remove MongoDB

Section titled “Step 2: Edit docker-compose and remove MongoDB”

Open the compose file for your deployment type:

Single-tier
sudo nano /opt/binalyze-air/docker-compose.yml
Two-tier (DB server)
sudo nano /opt/binalyze-air-db/docker-compose.yml

Remove the entire mongodb: service block and any depends_on references to MongoDB.

Keep the ./volumes/mongodb directory for now. Delete it only after validating that you no longer need legacy Timeline data from versions earlier than v4.37.

Terminal window
cd /opt/binalyze-air
docker compose up -d --remove-orphans
Start DB server first
cd /opt/binalyze-air-db
docker compose up -d --remove-orphans
Then start Console server
cd /opt/binalyze-air
docker compose up -d

If your environment is scanned by vulnerability tooling, remove unused image layers:

Terminal window
docker image prune -a

Removing only the MongoDB container is not enough. The image should also be removed to avoid false-positive findings from unused, unpatched CVEs.

  1. Confirm MongoDB is no longer running:
Terminal window
docker ps | grep mongo

No output is expected.

  1. In the AIR UI, open Timeline and verify data is still visible.

No. Timeline was migrated to PostgreSQL in v4.37. Data created after upgrade is stored in PostgreSQL.

Will future upgrades break if MongoDB is still present?

Section titled “Will future upgrades break if MongoDB is still present?”

Not immediately, but the unused service remains a maintenance burden. Removing it is recommended.

Yes, once you have confirmed you no longer need legacy Timeline data from versions earlier than v4.37.

No. SaaS environments are managed by Binalyze.

If you encounter issues, contact Support at [email protected].