We will discuss how to use MongoDB to retrieve your username and password if you are unable to login, your controller is being managed by someone who did not originally install the system, or you have lost or forgotten your login credentials for the UniFi Controller. This method will not reset your network.
Note: These steps must be completed on the same computer that the UniFi Controller is installed to. If you no longer have access to that computer, and you do not have a backup of your UniFi Controller, you'll need to install the UniFi Controller to a new machine, reset and readopt your UAPs, and reconfigure your network.
Use MongoDB to retrieve username / password.
- Open the UniFI controller.
- Download mongoDB ZIP file and place it on your desktop. (Make sure to get the ZIP file and not the EXE or MSI).
- Open the mongoDB folder.
- Open Terminal (Mac OS X, Linux) or the Command Prompt (Windows) then drag the "/bin" folder contained inside the mongoDB directory to the Command prompt / Terminal to get to the correct path.
Note: The path should look something like this: /Users/yourname/Desktop/mongodb-osx-x86_64-2
- Before completing Step 4, type the following after "/bin":
/mongo --port 27117
- Then type:
- Then type:
db.admin.find()The username / password will be appear, see the following sample output: