Help on AdGuard

I Could not log in to Adguard when I use the default URL which is http://192.168.1.1:3000 same as my router IP, so I don't know what should I do? I have already downloaded luci.

Why? LuCI is included by default.

Are you running OpenWRT? If so, which version?

I meant the AdGuard software. I'm using last version.

This is a forum for OpenWRT. Are you using OpenWRT?

The current stable version of OpenWRT is 22.03.5, with the first release candidate for 23.05 also available for those who wish to try it.

adguardhome is a package which is available for OpenWRT. The current version of adguardhome for OpenWRT 22.03.5 is 0.107.21-1.

So, what versions are you using, or trying to use?

By the way, the default URL ends in :3000 only for the initial configuration. When performing the initial configuration the operator is asked to choose a different port number for operational administration. Did you carry out the initial configuration? If so, then what port number did you choose?

You would benefit from reading the AdGuardHome documentation, to refresh your memory about what port(s) it uses and for what purpose(s).

If AdGuardHome is running, but you don't know the port number, it ought to be trivial to find it:

netstat -alnp | grep AdGuardHome | grep LISTEN

I quickly spun up AGH on my OpenWRT VM here, and this is the sample output from my installation:

root@vm-openwrt:~# netstat -alnp | grep AdGuardHome | grep LISTEN
tcp        0      0 :::5353                 :::*                    LISTEN      5034/AdGuardHome
tcp        0      0 :::8080                 :::*                    LISTEN      5034/AdGuardHome
root@vm-openwrt:~#

As you can see, I chose port 8080 for AGH's admin interface, and port 5353 for the DNS listener. Note: I don't intend to keep that configuration; this was solely an example to illustrate the difference between :3000 and AGH's production ports.

I'm using OpenWrt 22.03 and when I want to use AdGuard on OpenWrt after I download it from OpenWrt 22.03 from software I couldn't

I'll assume you used opkg install adguardhome and not some other method to install the service.

And so, if all else fails, you can force AGH to its default again, by deleting one single file.

root@vm-openwrt:/etc# /etc/init.d/adguardhome stop
root@vm-openwrt:/etc# rm /etc/adguardhome.yaml
root@vm-openwrt:/etc# /etc/init.d/adguardhome start
root@vm-openwrt:/etc# netstat -alnp | grep AdGuardHome | grep LISTEN
tcp        0      0 :::3000                 :::*                    LISTEN      6672/AdGuardHome
root@vm-openwrt:/etc#

AGH keeps its configuration in a single file: /etc/adguardhome.yaml. If that file is not present, then AGH goes back to its initial configuration. If AdGuardHome isn't running, and you can't find out what port it's using, then look at the contents of /etc/adguardhome.yaml; that may also tell you which port to use, once you get the service started.

I removed the adguardhome from installed package and reinstall it again, and I still could not log in the GUI! It says “This site can’t be reached”.

Yes, that's to be expected. Uninstalling and reinstalling the package won't reset the AGH configuration, because uninstalling the package doesn't remove /etc/adguardhome.yaml. When you reinstall the package, it starts up again with whatever configuration you gave it the first time around.

There's a reason I suggested investigating the .yaml file as well as some other commands you could execute to find out what AGH is doing.

1 Like

Could you please tell me where can find this .yaml?

I did.

Look in the /etc directory.

Thank you for your responding. But under what can I find /etc directory? Is it in System>Software?

Ah. You're using the Web interface to install and uninstall the software. That makes a bit more sense now.

No, you'll need to get to the command line execute the commands I showed in my samples. See https://openwrt.org/docs/guide-quick-start/sshadministration for some introductory information about doing so.

When i put the comands it says this
root@vm-openwrt:/etc# /etc/init.d/adg-ash: root@vm-openwrt:/etc#: not founduardhome
start
root@vm-root@OpenWrt:~# root@vm-openwrt:/etc# rm /etc/adguardhome.yaml
::3000 :::* LISTEN 6672/AdGu-ash: ardHome
root@vm-openwrt:/etc#root@vm-openwrt:/etc#: not found
root@OpenWrt:~# root@vm-openwrt:/etc# /etc/init.d/adguardhome start
-ash: root@vm-openwrt:/etc#: not found
root@OpenWrt:~# root@vm-openwrt:/etc# netstat -alnp | grep AdGuardHome | grep LISTEN
-ash: root@vm-openwrt:/etc#: not found
root@OpenWrt:~# tcp 0 0 :::3000 :::* LISTEN 6672/AdGuardHome
-ash: tcp: not found

Some of what I quoted were commands.

Some of what I quoted were the responses to the commands.

Simply copying and pasting verbatim won't work.

Spend some time with the document at https://openwrt.org/docs/guide-quick-start/sshadministration and familiarise yourself with how the command line works.

I did all you said, and I don't know where is the problem, I still Could not log in AdGuard GUI?!

/etc/init.d/adguardhome stop
rm /etc/adguardhome.yaml
/etc/init.d/adguardhome start
netstat -alnp | grep AdGuardHome | grep LISTEN

Run just these parts, one line at a time.

2 Likes

It works, Thank you!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.