[HowTo] Running Adguard Home on OpenWrt


Is AGH automatically started when I reboot the router?
Can I auto delete the logs at some point? I set it to the minimum already, but apparently it fills up nevertheless

Yes AGH should autostart on reboot (unless it is out of disk space like yours was)

I just delete the rotated logs now and then. I also delete the backup AGH files so it has space for its next upgrade.

1 Like

Apparently the install script does not work

curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -c edge

It spits out this message:

starting AdGuard Home installation script
unsupported cpu type: ppc

Apparently wrong type of CPU.
Got any other that I can try ?

You can ask AGH team via an issue on their github if they will do a "ppc" target.

Or build from source using https://github.com/AdguardTeam/AdGuardHome#how-to-build-from-source

or install AGH on a device internal to your network and have your router point to it for DNS services.

1 Like

disk space warnings are going to be looked at and so is log rotation.

Thanks. Actually I already have Pi-Hole up and running on a different system.
I was trying to incorporate AdBlockHome with OpenWrt in the same router, hoping to drop my PiHole if this works. Less computer to hook up.

I'm asking the AGH Team if they have source for PPC as we speak.

What version of Adguard home do you use?
I have a nanopi r2s as well and it is armv8 I see.

you might want to try https://github.com/anaelorlinski/OpenWrt-NanoPi-R2S-R4S-Builds

and i advise you use the edge 107 build. It has a number of issues fixed that the older builds dont.


Tried to install with:

curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -c edge

But I get the error:

Cannot install Adguard as a service

did it mention you were missing any thing on install?
check the log carefully. you may have missing packages

make sure sudo is installed

Sudo was missing... thanks!

I have configured Adguard.
When I test the adblocker I see around 26% is blocked. F.e. google ads are not blocked as well as google analytics.

With AdBlock (package) all is blocked.
I use this link as test;
' https://d3ward.github.io/toolz/adblock.html'

I added a lot of block lists.

1 Like

Really cool test, thanks.

I use Adblock and it just works.

I am amazed on how complicated running Adguard is, the sheer number of posts is mind boggling.

I prefer the KISS concept, Keep It Simple Stupid, and Adblock really sticks to this concept.

its been 2yrs since this thread started.

As long as you install the 107 edge build its far simpler. However AGH is more powerful compared to adblock. You are just blocking ads with adblock. you arent filtering per client or doing client groups to allow you to do filtering for kids.

As for filters. you are limited by only your memory. On a more powerful router you can add huge lists. I find that my selection list deals with most things. however i know some people have over 2million block lists with pihole and AGH. I think thats going abit far but its your choice to make.

I download the Linux arm64 version. Then use the installation method of the topic author.

Then I openWRT using the AO version of openWRT provided to me by mercygroundabyss.

The photos are my actual usage. But I think my average processing time is too long

depends what your upstream is also your cpu use on your router. Under periods of heavy load i got 300ms dns lookups. however a few updates solved some of the cpu usage and my overall times came down once it was running for a week or so.

1 Like

I installed AGH (107) on PlusNet Hub One router (https://openwrt.org/toh/bt/homehub_v5a).
It works OK for about 30 minutes and then it stops working, router GUI and SSH access is almost impossible to use.
Is my router not powerful enough for AGH?

For me, Adguard-Home has two killer advantages over adblock and simple-adblock:
1 - Built-in TLS support, so I can get rid of stubby
2 - Can be set to listen on port 53 instead of dnsmasq, while putting dnsmasq on another port as an upstream resolver for the local domain. Since dnsmasq A) forks for every request and B) would normally have to delegate the overwhelming majority of requests, this is much more performant.


Same router i'm using (the hub one is a rebranded HH5). However i have a seperate wifi (ubiquiti ac-lite so onboard wifi is disabled and the router only routes instead of managing wifi as well)

How many filters are you using (i have about 140k and more than that will crash the router as it runs out of memory)? How much memory have you available at start and when it becomes laggy?
High CPU usage will make the router very laggy and recovery becomes challenging.

Try disabling all but AGH's default list and see if it is more usable. See how much cpu usage and traffic is going through your router.

I have disabled all filters but default 40k+ rules and still the same.

See picture