Friday, January 5, 2024

Running Ubiquiti UniFi Network Server on Windows 11

I was trying to run the self-hosted UniFi Network Server v8.0.26 on a newly installed Windows 11 but I was getting a cryptic message "Server taking too long to start…" followed by a "Start-up failed" error. It turns out that VC140 runtime is a hidden requirement (Visual C++ redistributable aka MSVC) and in my case it worked fine installing the latest MSVC for 2015,2017 and 2022 available in the official Microsoft site. Here is how I discovered the missing dependency.

After installing the product, the whole application is extracted in "%USERPROFILE%\Ubiquiti UniFi". You will notice that the logs, data, work and run folders are automatically created the first time you execute the server. To start the server you can use the "bin\start.bat" file. In my case, I modified the 2nd line of the bat file to use "%USERPROFILE%\Ubiquiti UniFi\jre\bin\java.exe" executable which is the bundled version of java, instead of using the system's java.

Looking in the "logs\server.log" I observed the following <db-server> INFO  db logs repeating:

- Database process stopped...

- Checking if database needs to be shut down

- Database was not running

- Database configuration, dir=

In the bin folder, you will notice mongod.exe which is the mongo DB server used by the app. If you try to run this, you will get a much clearer error message saying that VC140 is missing.

Hope this process will help you solve other similar issues running UniFi network server.

1 comment:

Anonymous said...

Thank you for this! This solved my issue of the app taking too long.