For some reason™ Mongo changed the minimum ARM version supported for their official builds of the MongoDB arm64 server to ARMv8.2. The Raspberry Pi 4, which runs on a Cortex A72, only supports ARMv8. This means that if you are trying to run a MongoDB server on a Raspberry Pi 4, you’ll be met with a slew of “Illegal instruction (core dumped)” messages.
This wouldn’t be much of an issue if Ubiquiti hadn’t decided to use MongoDB for their database. Additionally, it wouldn’t have been an issue if MongoDB didn’t decide to change their arm64 requirements.
Unfortunately, this means that if you want to run the UniFi controller on a Raspberry Pi 4 (or if you happen to want to run MongoDB on such a device), you must use an older and vulnerable version of mongodb. The last versions that are known to be compiled are 4.4.18 for the 4.4 series, 4.2.23 for the 4.2 series.
Unfortunately, trying to compile the latest versions while forcing the architecture to ARMv8 fails, so the only option, if you want to use a 4.x release, is to run the outdated versions and accept that the database will be subject to WT-10461. This can cause an issue where data is inserted out-of-order in the database, which may cause corruption. It’s rare but buyer beware.