[HowTo] Running Adguard Home on OpenWrt

@jamesmacwhite https://github.com/AdguardTeam/AdGuardHome/releases/tag/v0.107.3

Mind doing a PR for the new version?

PR sent yesterday, pending approval from main maintainers.

Built from 21.02 and run tested on 19.07.8.

Nothing slips past you eh? Cheers!

No worries, GitHub release notifications are extremely useful!

1 Like

Isn't it better to have the latest version in OpenWrt and not the "stable" one?

My personal view on that is the "latest" are classified as edge builds by AdGuard Home developers, which technically isn't "stable". OpenWrt packages would prefer stable over edge, even in master. The reasoning behind that is because often commits from master will get backported down to the latest stable release and having an edge build go down to a stable release branch probably won't sit well with the main maintainers with push access and likely be voted against. You could treat master as edge builds only, but I think it will probably be messy. The development cycle is also too fast currently to keep up. Merging updates to the package requires approval from the main maintainers and those with push access and this can take time.

So the OpenWrt package is likely to be on the stable release branch. The edge builds can be installed with the instructions and manual installation steps, so I think it covers whatever preferred scenario.

2 Likes

James's view is correct. OpenWrt devs will only use "Stable" releases.

AGH isn't really stable at this point. They are still patching and improving a fair bit of stuff so really its beta testing. Edge builds do ensure you keep more up to date but their stable branch really only got useful at 0.107 build. I think when they hit v1.0 then it would be much more polished and finished.

Right now there are UI changes needed, DHCP badly needs fixing/improving. That's the primary reason I've made my scripts only use AGH for DNS, instead of saving me some pain and using AGH for DNS and DHCP. For a simple flat network it should be ok. But with all the different networks and vlans that OpenWrt users do? Its just not something i wanted to be supporting. So making it a DNS adblocker and leaving OpenWrt to handle everything else was the better option.

There are more improvements coming. Have a few issues filed that are getting looked at. The key one of disk space checks for upgrades so those with smaller routers/space can use it is due in 108 builds. They have to re-write how they do updates however (so they can get the compressed and uncompressed size). Also they are looking into the size of the binary (its 35mb right now) to see if they can reduce it as well.

Onwards and upwards as they say :smiley: :100:

1 Like

I have a question, can I install AGH on the SD card and use it?
(I am going to buy an LTE router, the machine has an SD card slot for users to store data.)

should be fine. i use AGH off my SDCard on my R4S right now. (my docker off a external usb but i might move it to SDCard as well.)

if you worried about writing lots just disable the query logs or keep them to just 24hrs. but any decent class 10 card should be more than capable.

So what do I need to do to install AGH on the SD card?

Have openwrt installed on the device. If the sdcard is treated like a seperate storage space then have it automount in fstab and then have it mount as /opt and follow my AGH thread about installing and it will end up at /opt/AdGuardHome. [How-To-Updated 2021] Installing AdGuardHome on OpenWrt Just install like that once you have your device running.

Follow this for mounting your sdcard (yes it says usb drives but it will work for sdcards too. The mount device may be different however. usually something like /dev/mmcblk0p2 for an sdcard.)

Your /etc/config/fstab will end up with an entry like this

config mount
	option target '/opt'
	option uuid '292f3823-ba8f-42bb-8821-f45cf5569341'
	option enabled '1'

More info from i post i answered other day

2 Likes

OK, Thanks for your help. I will try these things.

1 Like

Suddenly thought, Can I partition the SD card into 2 sectors?
(One of them is dedicated to openWRT)

of course. you then can just set the openwrt partition for automount in fstab.

OK, So do I need to set the filesystem for the partition used by openWRT? Or should I let fstab set it?

manually partition and setup the card as you want it.

Then follow the guide so it imports the filesystem/partition. It may import both partitions. Delete the other one from fstab if you dont want it automounting.

1 Like

OK, Thanks again for your help.

Hi all,

I'm running AGH and OpenWRT in a RPi4 (CM4 really, with DF Robot router board) and I have two interfaces:

  • eth1 - Main connection
  • eth1.10 - VLAN for guests

In the adguardhome.yaml file, I setup three dns "bind_hosts":

  • 127.0.0.1
  • -IP from eth1-
  • -IP from eth1.10-

And I've tried everything: different firewall zones, added rules to allow DHCP and DNS for eth1.10, add DNS forwardings with both hosts from AGH, but I cannot make it work for the Guest interface (eth1.10).

All devices connected via eth1 are fine.
Devices connected via eth1.10 can't get connection. The browser error I get when connect to Guest is "ERR_NAME_NOT_RESOLVED".

Can any of you help me?

There is now a proper opkg version with entry on the OpenWrt wiki as well as a new thread:

Please head over to the new topic for any open questions regarding Adguard Home.