Carlgo11

Unifi Dream Machine Tricks

I’ve used Ubiquiti/UniFi products for a couple of years now and have during that time I’ve saved some useful commands and directories/files that I thought I’d share.
All of these commands are tested to work with the UniFi UDM/UDM Pro. Some of the commands also work on other UniFi products but your mileage may vary.

Non of the tricks outlined in this post should result in your device being bricked but Ubiquiti doesn’t officially support tinkering with UniFi devices through SSH and it may result in data loss.

Commands

CommandDescription
unfi-os shellOpen a shell to the UniFi-OS Ubuntu container
unifi-os restartRestart all UniFi apps (Networks/Protect/Access etc)
ubnt-device-info summarySystem info
set defaultFactory reset device
sensorsShow fan RPMs & temperatures
tcpdumpPacket capture

I’ve also found this reddit post useful in the past.

Paths

PathTypeDescription
/mnt/data/unifi-os/unifi-core/config/unifi-core.*PersistentLocation of certificate/key
/mnt/data/unifi-os/unifi-core/logs/Non-persistentLocation of UnFi app logs
/var/log/messagesNon-persistentUnFi Network output log
/tmp/udapi.cfgNon-persistentUDM configuration

Useful third party projects

UniFi systems are more limited in their capabilities out of the box than some other networking vendors but the amazing community more than makes up for that!
Here are some useful open source projects that I’ve used on my UDM Pro:

  • Split-VPN - VPN client. Connect your entire LAN to any commercial VPN service!

  • UDM / UDMPro Boot Script - Environment setup tool. Allows for changes in the alpine environment to persist through reboots.

  • udm-le - Let’s Encrypt integration. For automated TLS certificates on your UDM/UDMP.

  • UniFi-API-client - UniFi API PHP client. Useful for external guest portals to integrate with UniFi Network.