Skip to content

Unifi Notes to self

Connect device to multi site controller.

Login to device with ssh.
Default username and password should be: ubnt/ubnt

Setup the controller with the set-inform command

set-inform http://<controller-IP>:8080/inform

It is important to include everything otherwise it will not show up in controller.

Site already established can on the controller that needs to be migrated, go to:

Settings -> Site -> Export Site

This will open up a tool to first backup your existing controller, migrate the site, migrate the devices and finally remove the devices on original controller.
Follow the instructions in the tool. Very easy.

Bear in mind that the migration process takes some time, so be patient. No status bar are present, so its kind a UNIX like command feeling with no errors everything is a success even if you cant see anything is happening. 🙂

Reset Unifi AP to factory settings over ssh

Get the IP of the AP either by using the Unifi controller, or have a look at the DHCP lease on your router, or using ARP lookup.
If the AP has been tied to a controller, go to Settings -> System, scroll down to “Network Device SSH Authentication” to get the Username and password for the SSH connection.

ssh <user>@<IP-OF-AP>
#Run the following command on the AP. 

Resolve Status: Server Reject

Sometimes when you have an Unifi AP that has been removed or forgotten in the Unifi Controller. When you try to type in the set-inform command, then you get the error “Server Reject” when you log in to the device and type “info”

UAP-AC-Pro-Gen2-BZ.6.2.44# set-inform

Adoption request sent to ''.  Use the controller to complete the adopt process.

UAP-AC-Pro-Gen2-BZ.6.2.44# info

Model:       UAP-AC-Pro-Gen2
MAC Address: f0:9f:c2:79:31:af
IP Address:
Hostname:    UAP-AC-Pro-Gen2
Uptime:      440 seconds

Status:      Server Reject (

Sometimes the device hasn’t been removed properly in the database on the controller.
Login with ssh to your Unifi Controller server and login to the database:

> mongo --port 27117
> use ace

After this run the following command, replacing the MAC address with your failing device’s MAC address:

> db.device.remove({"mac":"f0:9f:c2:79:31:af"});
WriteResult({ "nRemoved" : 1 })
> exit

If the return message states “WriteResult({ “nRemoved” : 0 })”, then the device was already removed. Restart the controller to clear up on cache and any other leftovers from the device.

Other issues for Server Reject or adoption loop when on FreeBSD Unifi Controller:

Updating Unifi to Unifi 7.3.83

The update requires updating mongodb to mongodb44, which needs to have the database imported instead just a replacement and update.

So before updating , take a backup of your Unifi Instance in the web.
Go inside the Unifi Manager

cp -R /usr/local/share/java/unifi/data /root/unifi-data/
rm -R /usr/local/share/java/unifi/data/*

Update everything with the normal pkg update && pkg upgrade

If you are running unifi in a jail, you need to go the host system, stop the jail.

nano jail.conf

#add the following line

start the jail and console into it again.

Check if permissions are correct in unifi folder otherwise

chmod -R 755 /usr/local/share/java/unifi
chown -R unifi:wheel /usr/local/share/java/unifi
service -R

Now everything should be up and running again.

Go to web site and import your backup from previous step.
Enjoy your new Unifi instance.

Published inBSD

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.