Troubleshoot dead/flashing Unifi equipment
Identifying the problem
These instructions only apply if the device powers on and one or more of the following is true:
- The port activity lights on the device do not blink as they normally should (they are either off, or solid)
- There is a noticeable low-volume electrical hum coming from the device or power supply
- Port lights (other than the 24V POE indicator) stay on after unplugging ethernet from that port
- The lights seem normal, but you cannot contact the device through ping, web interface, or SSH
Attempt the "usual fixes"
- Power the device off and back on, check for signs of life.
- Try swapping the power supply for a known-working power supply.
- Try factory resetting the device.
If none of the above works, it's likely that the hardware inside the device is failing. The most common failure is that the boot drive has gone bad. Most Unifi devices have a removable USB boot drive that can be swapped out. The following devices are known to have a removable boot drive:
- USG-3P
- USG-Pro-4
- UNVR
- Unifi Switches
- Edge Routers
Before attempting to remove and replace the USB drive, check the warranty status of the device. If possible, RMA the device because replacing the USB drive could possibly void the warranty or cause issues/delays in the RMA process.
Replace the USB Drive
Unifi routers and switches
Follow the instructions on this Ubiquiti Forum Post
Alternatively, get the 4.2.0 image, unpack it (bunzip), then flash it to a replacement USB drive using a utility like Rufus (Windows) or Balena Etcher (Windows/Mac). To get the USG to show up again on the Controller, you will probably have to manually update the firmware to the latest available from Unifi manually via SSH (see below).
Alternatively, build a fresh bootable USB from scratch via instructions here from user BranoB.
Alternative instructions for recovery via SCP and SSH
Unifi NVR (UNVR)
NOTE The power supply is exposed and only covered by a thin sheet of plastic. Do not attempt these instructions immediately after powering off the device, as the power supply may still have significant electrical charge that could seriously injure or kill you.
- Power down the unit, remove the screws holding in the outer case, and remove the USB drive
- Remove the Hard Drives (note failure to do this may result in data loss). With a sharpie, write a number on the drive corresponding to the bay it was removed from (i.e. Bay 1 is the leftmost)
- Insert a new USB drive
- Replace the outer case and screws, power on the device with the hard drives still removed
- Allow the device 10-20 minutes to rebuild the USB. Eventually, the UNVR should allow you to reach the configuration webpage at its IP address to begin setting it up from a factory reset condition.
- Power down the device, then reinsert the hard drives in the same order in which they were removed.
- Navigate to the UNVR webpage at its IP address and begin setting up the device
- When prompted, choose to restore one of the backups presented (if no backups, check UI cloud account)
- When the restoration is completed, the device should be in a fully working state with all previously-added cameras and recordings. It is possible that you will have to recreate and/or reinivite Protect users.
No backups from which to restore
If there are no backups available, you will have to setup the UNVR from scratch including a factory reset of each camera, which will require physically handling and then repositioning every camera. If possible, avoid this by recovering the "Device Password" from the previous UNVR installation which will allow you to readopt the devices to the new UNVR instance without physically touching them.
To get the device password:
- Connect the failed/failing original USB to a Linux machine
- Browse to
/etc/unifi-protect/jsonDb/nvrs.jsonand open the file - Search for
devicePasswordand copy the value. It should be a 20-character random password
Before proceeding, take some time to gather data that will make the readoption process smoother:
- Login to the customer's Unifi Site in the Unifi Network Controller, or login to their router/other interface if they do not have a Unifi site or do not use Unifi equipment
- On the Clients tab (or, on other interfaces, the "DHCP Client List" or similar), identify all named cameras. If a camera was named "Main Building - Front", then its device name on the network would be "main-building---front".
- For each device that was previously adopted to the controller, gather its name, MAC address, and IP address. This will prevent any confusion because the devices will lose their names once readopted
Once you have all the requisite information:
- Login to the local UNVR web interface. Devices will not show up for adoption in the Cloud web interface (unifi.ui.com).
- On the devices tab, find previously-adopted cameras in the list as "Managed by another controller"
- Click on a device, and then click to readopt them
- Enter the device password
- The device should almost immediately readopt and appear in a separate section in the devices list
- Repeat steps 3-5 for all devices to adopt
- Rename devices according to the information you gathered earlier
- Recreate/reinvite any administrators/users that existing previously