About once a year my Ubiquiti routers give me trouble. I’ve long since stopped asking anything complicated of them like reliable failover or a VPN. I just want it routing packets. This week’s problem is my Unifi Dream Machine, my router/access point in San Francisco. I installed in in late 2020 and to its credit haven’t thought much about it since. Including not doing software updates. (Oops).
Yesterday I tried to upgrade it from version 1.0.10. It went badly, I ended up having to factory reset and rebuild the network configuration from memory. Some notes on that:
Being safer next time
First, how to prevent the mess I found myself in. The main problem is I had no backup of the Network application config. I did have one for the UDM console itself but that doesn’t contain the useful network stuff like wifi SSID, subnet, port forwarding, … I should have made a backup before doing anything. Modern Unifi systems are backing up to the cloud, maybe automatically, but mine was so old I think I had to have done a manual backup and downloaded it. By the time I thought to do that it was too late.
What went wrong
The update process sucked. It wanted to upgrade itself like six times as it hauled itself forward through versions. Each update took at least 5 minutes, one said it’d take 20 and was more like 45. Each time the Internet connection would go down for a few seconds, twice. Mostly though it looked like things were working.
Until I got to UnifiOS v4.0.6, the current version. That time when it booted the “Network” app that’s most of what I really care about never started. Just spinning, hung in starting. I logged in via ssh to see what was up and couldn’t really figure it out. The mongod was spinning around 100% CPU though. Why Ubiqiuti chose such a weird and unreliable database for this simple application is beyond me.
The Internet is full of advice on how to manually repair corrupted Unifi mongo databases. But I decided to cut my losses and do a factory reset. The appliance said it had a full cloud backup, should be easy right? ha, joke’s on me. That was just a backup of the host OS itself, not the network. After the reset and restore the network was default settings.
I had no network backup. I’m a little confused; the updated Network 8.2.93 app has a manual backup option that downloads a file, but then implies the cloud backup of the console should cover the network too. That didn’t work for me, maybe because the crucial update failed? I was able to do one manual backup of 8.2.93 after configuration. A second one never completed. A third fails immediately. That does not inspire confidence. After a reboot a backup worked.
(I also can’t figure out how to backup the network config on a self-hosted Unifi linux environment running Network 8.0.7. The backup button does not appear under Settings > System. A comment I read online suggests this may be a user permissions problem but I can visually inspect all the settings I want to back up so that seems wrong or dumb. I was finally able to make a backup using the managed utility at https://unifi.ui.com/. I also saw a hint monthly backups were happening and being stored locally, not synced to cloud.)
Rebuilding the network
So I rebuilt the network. Over the years I’ve learned my lesson and keep the router as simple as possible. But I use the non-default 192.168.0.* subnet. Also am forwarding ports for ssh, web servers, tailscale, plex, and syncthing. There’s a lot of fun looking other settings for things like the WiFi radio I didn’t touch.

I had to re-adopt my UAP-AC-Pro access point. In theory my restore for the UDM should have taken care of that. Getting the impression that backup did absolutely nothing useful. At least that’s relatively simple since there’s no significant device configuration. Hold down the reset button on the hardware, then click the “Adopt” button in the webapp.
Some observations
Complaints and disaster aside the latest Network webapp on the UDM is pretty snappy. The old bugs where you’d change something in the config and it wouldn’t take until a reboot seem gone. The app shows lots of interesting things like a visualization of how all your wifi clients are doing. There’s also a neat NetMan mobile app for more wifi testing.
The Unifi network webapp itself is some overgrown dynamic Javascript architecture where page loads aren’t really page loads. It’s perfectly possible to click the “Dashboard” button and see a working new dashboard page even though the router is actually down. Just old data and no immediate confirmation that the router is even up. Really bad choice for a router, as snappy as it may be.
The Dynamic DNS configuration for Afraid has you storing your account password in plaintext. Afraid has long-had a token based authentication mechanism they should be using instead.
By default port 443 is captured by the router itself to get to its own admin page. That’s probably secure, and I think but am not certain it’s not available over the Internet by default. Also you can port forward 443 somewhere else on your LAN if you need. Ubiquiti has a whole remote management API with mobile apps and stuff you’re supposed to use instead of the web server. It’s pretty nice, TBH.



