Yeah, I can't get 4.0 or 4.2 to run on the host, 4.4 thankfully seems fine. Using a Docker trick to upgrade.
:# Start the server in a container root@unifi02:~# docker run --rm -it --mount type=bind,source=/usr/lib/unifi,target=/usr/lib/unifi --mount type=bind,source=/var/lib/unifi,target=/var/lib/unifi --mount type=bind,source=/var/log/unifi,target=/var/log/unifi --entrypoint bash mongo:4.0 root@fc90064ba7cc:/# mongod --dbpath /usr/lib/unifi/data/db