Ubiquiti UniFi Recovery Mode

Updated on 5 mag 2023Print

Recovery Mode is a last-resort solution to recover an unresponsive UniFi device, often resulting from power loss occurring at the same time as an update. Only use Recovery Mode if you are unable to perform a standard factory reset.

Note: UniFi Power Backup can prevent unexpected power losses from occurring.

The following UniFi devices support Recovery Mode:

  • Dream Machine, Dream Machine Pro & Dream Wall
  • Access Points (all models)
  • Cloud KeyCloud Key Gen2+
  • Cameras
  • USW Flex Mini

Before Considering Recovery Mode

If you are considering Recovery Mode, first check two key points:

  1. Reboot your UniFi device. If this resolves your symptoms, no further actions are required.
  2. Factory reset your UniFi device. If you have cloud backups, you can easily restore your settings after factory resetting. If a factory reset works, no further actions are required.

Performing a Device Recovery

Dream Machine, Dream Machine Pro & Dream Wall

  1. Download the most recent firmware for your device, found here.
  2. Completely power-off the UniFi device and unplug it from its power source.
  3. Press and hold the Reset button and then reconnect it to the power source.
  4. Continue holding the Reset button for 5 seconds, or until the display (in supported models) indicates Recovery Mode.
  5. Connect an Ethernet cable from your computer to the first LAN port (Port 1). This is usually the port nearest to the top left corner.
    • Note: Connect to the Dream Wall via Port 18, not Port 1.
  6. Configure a static IP address on your computer in the 192.168.1.0/24 range (for example, 192.168.1.11).

Windows Client

  1. Navigate to the Windows 10 Network connections
    • Settings > Network & Internet > Status > Change Adapter Option
  2. Modify the IPv4 settings of the Ethernet adapter
    • Ethernet Adapter > Properties > Internet Protocol Version 4 (TCP/IPv4) > Propertie
  3. Select the option to manually enter an IP address and add the following information:
    • IP address: 192.168.1.11
    • Subnet mask: 255.255.255.0
    • Default gateway: <blank>
    • DNS servers: <blank>

macOS Client

  1. Navigate to the mac OS Network connections.
    • System Preferences > Networks > Ethernet Adapter
  2. Select to manually enter an IP address and add the following information:
    • IP Address: 192.168.1.11
    • Subnet Mask: 255.255.255.0
    • Router: <blank>
    • DNS server: <blank>
  1. In a web browser, navigate to http://192.168.1.30 to access the Recovery Mode UI.
    • Note: The Recovery Mode UI is accessible via HTTP only (not HTTPS). Your browser may try to redirect your session to HTTPS. Use a different browser if necessary.
  2. Select Firmware Update > Choose and browse your computer for the previously downloaded firmware (.bin) image file.
  3. Wait for the upgrade process to complete and reboot the device afterwards.

Access Points

  1. Download the most recent firmware for your device, found here.
  2. Connect your AP and computer to the same network or VLAN, either through a PoE switch or by connecting the computer directly to the network (data) port on the PoE adapter.
  3. Press and hold the Reset button, and connect your computer to the available ethernet port of the AP.
  4. Continue holding the Reset button until the LED flashes white, blue, off as indicated in our LED Status Guide. This indicates your device is ready for TFTP Recovery and you can release the button.
  5. Set a static IP address on your computer to communicate with the AP, which has a default IP address of 192.168.1.20. The following is an example configuration:
    • Static IP: 192.168.1.25
      Subnet: 255.255.255.0
      Gateway: 192.168.1.20
  6. Use TFTP to move the firmware from your computer to your AP. There are various programs and methods for accomplishing this. Here are two methods for your reference.
    • Windows
      1. Use the built-in TFTP command line tool, or a separate program such as Tftpd64 or pumpKIN.
      2. Select the downloaded firmware image and transfer it to the AP.
    • macOS and Linux
      1. Open Terminal
      2. Enter TFTP mode by entering the command:tftp
      3. Once in TFTP, paste the following commands and hit enter.connect 192.168.1.20
        binary
        rexmt 1
        timeout 60
        put /path/to/firmware_name.bin
  7. The file transfer will begin. The firmware will upgrade and the device will automatically reboot once it has finished. Do not reboot it yourself.

Cloud Key

Cloud Key Gen2, Gen2 Plus

  1. Download the most recent firmware for your device, found here.
  2. Power off the system.
  3. Press and hold the Reset button and then connect it to the power source.
  4. Continue holding the Reset button for 10 seconds, until the LED flashes blue and white. The LCD screen on the front panel will also read “RECOVERY MODE.”
  5. Open your browser and type the IP address for the Cloud Key, visible on the device’s screen.
    • Note: The IP address comes from your DHCP server. If it has not been assigned an IP address, you can try the fallback: 192.168.1.30.
  6. Run the “Check Filesystem” to try searching for and repairing any problems with your storage disk that may cause system issues.
  7. Restore the firmware you downloaded in step (1). Note that this will also factory reset your device.
  8. The LED will flash white while upgrading and turn into a steady white when it is complete.
  9. If your device fails again, this is a sign that you should replace your storage disk.

Cloud Key (Gen1)

  1. Download the most recent firmware for your device, found here.
  2. Power off the system.
  3. Press and hold the Reset button and then connect it to the power source.
  4. Continue holding the Reset button for 10 seconds, until the LED flashes blue and white.
  5. Open your browser and type the IP address for the Cloud Key.
    1. Note: The IP address comes from your DHCP server. If it has not been assigned an IP address, you can try the fallback: 192.168.1.30.
    2. If your Cloud Key does have an IP address assigned by the DHCP server, the fallback IP will not work.
    3. User Tip: If you don’t know your Cloud Key’s IP address, you can use thearp -a SSH command, or software such as nmap to find the IP address.
  6. You will be taken to the Recovery Mode screen. From here you can reset, reboot, power off and most importantly upload an updated firmware bin file.
  7. Upload the firmware you downloaded in step (1).
  8. Once it is uploaded, reboot the Cloud Key to complete the firmware upgrade.
  9. The LED will flash white while upgrading and turn into a steady white when it is complete.

Cameras

  1. Unplug the PoE cable from the camera.
  2. Press and hold the Reset button, then reconnect the camera to its PoE cable.
  3. Continue holding the Reset button for at least 10 seconds, or until you see the LED flash 3 times rapidly.
  4. Release the Reset button.
  5. The device will automatically reboot to an older firmware. 
  6. To update to more recent firmware:
    1. Find your specific camera model at our Downloads page using the left hand menu.
    2. Copy the .bin file link of the firmware.
    3. Use that link to upload it via the webUI of the camera, in System Settings.
      1. Alternatively, adopt the camera to your NVR to perform an upgrade via the NVR-hosted UniFi Video user interface.

USW Flex Mini

  1. Prepare a web server (see below*).
  2. Set the server/computer’s IP to a static 192.168.1.99.
    1. The method to set a static IP on a computer varies from platform to platform. Find instructions in your product’s documentation (Windows, macOS or Ubuntu/Linux).
  3. Download the most recent firmware for your device, found here.
  4. Rename the binary to fwupdate.bin and place it in the directory that was created earlier (webserver).
  5. Power off the switch by unplugging it from its power source.
  6. Press and hold the Reset button and then connect it to the power source.
  7. Continue holding the Reset button for 10 seconds, until the LED flashes blue, white, off.
  8. The USW-Flex-Mini should be updated.

* The first step in the recovery process is to prepare a web server. See below for a walkthrough on your operating system: Windows, macOS and Ubuntu/Debian. 

Prepare a Web Server on Windows

  1. Download Python for Windows (Executable Installer) here.
  2. Open the downloaded file and make sure you select Add Python x.x to PATH during installation.
  3. After the Python installation open Command Prompt as Administrator and confirm that Python is installed correctly with the command below:
    python -V
  4. Create a directory for the web server by running the commands below:
    mkdir c:\webserver
    cd c:\webserver
  5. 5. Start the Python web server on port 80. Note that the version of Python can be found with the command from step 3:
    1. Python 3.x:
      python -m http.server 80
    2. Python 2.x:
      python -m SimpleHTTPServer 80

Prepare a Web Server on macOS

  1. Download Python for macOS here.
  2. After the Python installation open Terminal and confirm that Python is installed correctly with the command below:
    python -V
  3. Create a directory for the web server by running the commands below:
    cd ~
    mkdir webserver
    cd webserver
  4. Start the Python web server on port 80. Note that the version of Python can be found with the command from step 2:
    1. Python 3.x:
      python -m http.server 80
    2. Python 2.x:
      python -m SimpleHTTPServer 80

Prepare a Web Server on Ubuntu/Debian

  1. Install Python on your machine with the commands below:
    sudo apt-get update && sudo apt-get install python3
  2. After the Python installation open a terminal and confirm that Python is installed correctly with the command below:
    python_version=$(dpkg -l | grep “^ii” | awk ‘/python/{print$2}’ | grep “^python[0-9].[0-9]$” | head -n1)
    sudo “${python_version}” -V
  3. Create a directory for the web server by running the commands below:
    cd ~
    mkdir webserver
    cd webserver
  4. Start the Python web server on port 80. Note that the version of Python can be found with the command from step 2:
    1. Python 3.x:
      sudo “${python_version}” -m http.server 80
    2. Python 2.x:
      sudo “${python_version}” -m SimpleHTTPServer 80

Source :
https://help.ui.com/hc/en-us/articles/360043360253-UniFi-Recovery-Mode