For a new UniFi Network Server, install MongoDB. For Ubuntu 22.04, run the commands below. If you're updating the UniFi Network Server to version 7.5, ignore these commands and instead refer to MongoDB's help article (or use this community script) to update your database to the required MongoDB version 3.6.