[HowTo] Running Adguard Home on OpenWrt

wait. So you have openwrt running on your router and want Adguard running on your pi?

Just run their install script on your Pi. Not on your router. Then u will just need to point your router DNS at the newly setup Adguard on your Pi.

But if your router is powerful enough you may be able to run Adguard directly on your router.

One part that was not covered is updates. Current version (AdGuard Home v0.107.0-b.5 is now available!) Can someone please share detailed instructions for this.
I have tried to copy:
cp -R /overlay/AdGuardHome/4UPDATES/AdGuardHome/AdGuardHome /overlay/AdGuardHome
And the restarted the router, but I'm still stuck with the previous version.
Updating from the web-interface does not work.
Thanks!

Did u install AdGuard via their script? Because updating via webinterface works fine for me. Pulls it down and restarts.

AdGuard Home v0.107.0-a.117+12db9823 is now available!

Mon Aug  2 16:18:43 2021 daemon.err AdGuardHome[5748]: 2021/08/02 15:18:43.800036 [info] Updating from v0.107.0-a.116+6fa11672 to v0.107.0-a.117+12db9823.  URL:https://static.adguard.com/adguardhome/edge/AdGuardHome_linux_mips_softfloat.tar.gz
Mon Aug  2 16:19:31 2021 daemon.err AdGuardHome[5748]: 2021/08/02 15:19:30.583103 [info] Stopping all tasks

Thank you. No, it was not with a script that I installed. I downloaded it from github, extracted and that was that. I have the latest version now, but can't seem to copy it over with that command, which is what they say I should do on githib, if the web interface fails. By the way, among the files in the folder, which is the "executable" which is what they asked is copied in manual updates?
Thanks a lot.

So is where they say how to update manually:

Thanks a lot.

No problem. Their early integration seemed to have some issues with OpenWRT. I definatly would not use the openWRT opkg'd version. That is version 104 and substantially behind the current 107 tree. Their script does seem to install ok on OpenWRT devices. It does require some knowledge of linux/ssh at least however.

:edit: this thread has some more info too. Adblock vs Adguard Home

What problems do you have with OpenWrt if I use the package from the repository?

in short? its installed to tmp so you have to reset it up if you reboot. thats the most serious issue. Also its had massive upgrades/fixes.

Honestly its just better to use their install script and have it installed to /opt

Commits · AdguardTeam/AdGuardHome (github.com) Just have a look down all the commits they have done between 104 and 107. Maybe an updated opkg may be better but given how active the AdGuard project is... i'd just go with their live script and auto-update.

1 Like

Oh and additionally? I'm still using the same filter lists that i originally set up with... However now it no longer has out of memory errors and crashes on my 128mb router. Thats was a major pain in ass.

As of today I am at Uptime 15d 2h 38m 49s
And have 26mb of ram out of 128mb free.

1 Like

The master version is 0.106.3. At 21.02 it is 0.104.3.

106 is the stable release version. I'm running Version: v0.107.0-a.121+d0772fda Edge

### Test unstable versions

There are two update channels that you can use:

* `beta` - beta version of AdGuard Home. More or less stable versions.
* `edge` - the newest version of AdGuard Home. New updates are pushed to this channel daily and it is the closest to the master branch you can get.

curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -c edge
that will get you the edge 107 builds.

or

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

gets you the more stable beta channel. Not sure what that one is thou. Guessing mid 107 release?

I am talking about the versions that are in OpenWrt.

Dont use them. OpenWRT really needs to pull newer versions for opkg to use. Ideally the new 107 builds as there are major updates. They also should NOT install to the /tmp folder as this is wiped on router reset.

Until the opkg versions are on later builds my advice is use AdGuards install script to install manually and avoid the opkg versions.

:edit: just to add some detail. I believe they put some of the config files in /tmp to prevent root filesystem filling up. However in 107 they changed some settings to you can set the statistics and query logs to just 6 hrs or disable them which keeps the disk use minimal.

I just checked my data and filters folders.
I'm using 14mb in data (logs queries and stats) and about 4mb in filters.

1 Like

I am still stuck on this update. Any further help, please?

Try a reinstall via their script. It should just pull the newer version and overwrite your bugged version.

If that doesn't replace your existing bugged version i would just delete the AdGuard folder from /opt and do a clean install. It shouldn't take long to reset it back up and also mean any bugged/corrupt files are replaced.

Just to be clear, with this, I'd CD into /overlay/AdGuardHome and then run the command above? Do I need to care which version it will pull. I'm using the MIPS version. An earlier guide on AgGuard failed to point this out and I ran into a lot of issues, until I downloaded the correct file for my device.
Thanks a lot.

it will install into /opt/AdGuardHome and will install the correct arch version for your router.

thanks, but where it installs is an issue because I did Extroot; moved everything to a USB stick. So, is this a concern; anything I should change in the command, or simply cd into the directory i mentioned earlier and run the command from there?
While I have your attention, do you know the commands to start and stop AdGuardhome?
Thanks

Their wiki is here with the automated start script which is the command i linked you.

AdguardTeam/AdGuardHome: Network-wide ads & trackers blocking DNS server (github.com)

root@OpenWrt:~# /etc/init.d/AdGuardHome --help
Syntax: /etc/init.d/AdGuardHome [command]

Available commands:
        start           Start the service
        stop            Stop the service
        restart         Restart the service
        reload          Reload configuration files (or restart if service does not implement reload)
        enable          Enable service autostart
        disable         Disable service autostart
        enabled         Check if service is started on boot
        running         Check if service is running
        status          Service status
        trace           Start with syscall trace
        status  Print the service status

i have questions, in android device they still have ads, can even access what im block but in logs it say blocked