This repository provides a simple web server to aid in the recovery of Ubiquiti devices by serving firmware files to devices in recovery mode.
Unifi's recovery mode instructions suggest leveraging python. I made this repo because I already had .NET installed and didn't want to install python on the computer I was using at the time.
- Set Network Adapter IP: Configure your network adapter's IP address to
192.168.1.99
with a subnet mask of255.255.255.0
(Get-NetAdapter
andNew-NetIPAddress -InterfaceIndex <Obtain from Get-NetAdapter> -IPAddress 192.168.1.99 -PrefixLength 24
). - Download Firmware: Download the latest firmware for your device from Ubiquiti. Rename the firmware file to
fwupdate.bin
and place it in the same directory asProgram.cs
. - Start the Web Server: Start the web server by pressing
F5
or runningdotnet run
in a terminal. - Configure Firewall: Ensure there is an inbound firewall rule allowing traffic on port 80. (ex:
New-NetFirewallRule -DisplayName "Allow HTTP" -Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow
) - Connect Device: Connect an Ethernet cable between the device and your computer.
- Enter Recovery Mode: Put the device into recovery mode by holding down the reset button while powering it on.
The server logs each request, including the IP address of the device and the requested path. This information, along with the LED status on the device, helps monitor the recovery process.