Unifi 8.2 MongoDB Issue

I just upgraded from Unifi 8.1.127 to 8.2.93. This upgrade includes going from MongDB 5.x to 6.x. After upgrading I was getting errors in the log about the feature compatibility (https://www.mongodb.com/docs/upcoming/release-notes/6.0-upgrade-standalone/#feature-compatibility-version).

The suggestions I have seen for fixing this involve running mongo on the command line, but the mongo command line was removed in v6.x, and the new MongoSH or Compass tools do not seem to have support for FreeBSD yet.

Any ideas how I can get this back up? How can I update the feature compatibility?

Ok, so this was kind of a pain. What I had to do was something like this:

  1. Install mongodb50, which will remove mongodb60 and unifi8
  2. Start mongodb using the instructions found here: FreeBSD UniFi MongoDB upgrade
mongod --dbpath /usr/local/share/java/unifi/data/db --port 27117 --unixSocketPrefix /usr/local/share/java/unifi/run --logappend --logpath /usr/local/share/java/unifi/logs/mongod.log --bind_ip 127.0.0.1
  1. I don’t know if you could now run mongo from the command line, but I used the version from Node (see mongosh - npm)
  2. Now you can use the instructions from the MongoDB upgrade page I linked to above to see what your current upgrade compatibility is and change it to 5.0.