LEDE on Ubiquiti Unifi Security Gateway?

Has anyone ever built and installed LEDE on the Ubiquiti Unifi Security Gateway? I would imagine that the hardware would make for a fairly nice wired-only LEDE platform device. Beyond that, LEDE offers a lot more capability than the Unifi environment when it comes to advanced routing and firewall rules and flexible package installation.

P.S. I do know that LEDE works on the EdgeRouter devices and some of the Unifi APs, but I'm specifically curious if there is the possibility of installing LEDE onto the USG.

I've wondered the same, but don't currently have a USG. If you currently have one can you post output from U-Boot and dmesg? It may be possible to use the EdgeRouter Lite image as internally they may be identical.

Unfortunately I don't have a USG or I'd happily provide the requested info... I had been contemplating buying it from a friend (and I think it is no longer available). If we're lucky, someone reading this thread will have one handy to pull the data.

I don't think much needs to be done looking at what they needed to add on FreeBSD

I made some patches and got an image flashed it on the USG-3P Edit: and it now boots fine with network enabled.
(https://wiki.openwrt.org/toh/ubiquiti/edgerouter.lite) followed these instructions for flashing.

My patches are here:

Just apply them on your fresh lede tree select the USG 3P from the device selection and build away.

Feel free to try it out and give me some feedback.

Known issues:


Fixed issues:

  • The blue and white dome led dont work (/sys/class/led is empty) Fixable by introducing led support to octeon / fixing gpio code maybe ?

I included a patch that enables CONFIG_PACKAGE_kmod-leds-gpio=y and CONFIG_PACKAGE_kmod-ledtrig-gpio=y

The system loses its configuration after a reboot

The deployment from the above link (squashfs) has a fundamental flaw, the overlay filesystem never gets created because the required mkfs.f2fs tool is missing, for now i updated my patch to include f2fs-tools by default for the entire octeon architecture. However this might be fixable on image generation / initial deploy to usb stick too but i wont bother for now.

  • Worked fine!
  • Did work with issues. (Please report)
  • Did not work at all.

0 voters

1 Like

Update: i made a stupid mistake with the network devices in my patch which i now corrected.
Feel free to try it out.


thank you for posting this. what is the current state of the patch today?

waiting on my USG to arrive. id be more than willing to work with you on getting the LEDS working if you dont have them working yet and other things that need to be fixed.

The leds and everything else the device has to offer works just fine, the patches are a bit ugly but it works!

I might refactor it a little bit (new devicetree for e120 aka usg, etc) but thats not relevant for now.
Make sure you have a serial cable for troubleshooting issues + take a full backup of the usb stick using dd or an equivalent full sector backup software.

Edit: I refactored the patches a bit they should be much cleaner now, everything i tested is working so far.

If you really go for lede on the usg keep in mind that you will lose the hardware offloading as that is proprietary.
You can however use Qualcomms sfe which should give you some of the performance back.


could you send the patch for the USG to LEDE via GitHub?

do you happen to be working on a USG-Pro-4 port also??

id love to see the existing changes Commited to LEDE.


@huntingdmouse i wanted too but im not too sure if it will get accepted, will do within the next few days and see what the upstream devs think.

Edit: https://github.com/lede-project/source/pull/1370 lets see what i need to change to get it in.

I have no USG-Pro-4 sadly and i dont feel great about bricking other peoples devices.
I can try to get it working using the GPL archives provided by ubiquiti but i cant promise anything.

1 Like

@MartB ,

thanks for opening the pull request on Github, Continue to do what they ask so it can get added to Lede. looking forward to seeing the inclusion in Lede so it can be used more widely.


Reviving this old post, and considering the merge back to openwrt since then, I tried using git patch on the main buildroot directory and failed miserably. It is still not pulled on Github. This might probably be something really easy to fix, but I have no idea how. Could any kind soul take mercy on this suffering man and tell me how to go about

a. Patching so I can use the USG with OpenWRT / LEDE

b. Helping @MartB out with his pull request to make it easier for the next guy?

Thanks a bunch!

Hey there,

i dodged the device and got an ER-X instead but i can fix the patch when i have some time and someone here can try to get it into openwrt.

I disliked the fact that i needed to make the effort to upstream the patches to linux (which would have most likely been rejected for various pedantic reasons as the current state of the patche is crap) and im not willing to spend my limited time reworking it for a questionable benefit.

Kind regards

Would a beer perhaps assist your decision?

I want to install the new OpenWRT 18.06.1 on Ubiquiti USG-3P.
Please help me as to how I can do it using EdgeRouter Lite image?
Why USG is not supported but EdgeRouter Lite is?

There is a patch file given above for LEDE 7.01.1. Can anybody please help me how to apply this patch file for USG-3P. If not, 18.06.1, at least 17.04.1 can be used.