[TUTORIAL] - How to modify Adguard Home on GL.iNet devices to enable webui without logging in to the admin interface

I'm almost certain you're hitting Apache on port 80 not Adguard on port 3000

Have you run this yet?

opkg remove apache libaprutil libexpat

That'll remove apache

1 Like

It'll work as long as it's hashed properly. I've done the same thing on native Linux installs, Opnsense and in docker containers.

The only other thing that can catch people out is incorrect yaml indentation.

The other thing you can do to check Adguard is actually running (if you've not got the yaml indentation quite right, it may prevent the service from starting)

Restart the adguardhome service with:

service restart adguardhome

then review the syslog with

logread

You should see something like this

Sun Jan 19 15:53:00 2025 user.notice AdGuardHome[24343]: 2025/01/19 15:53:00.965916 [info] Received signal "terminated"
Sun Jan 19 15:53:00 2025 user.notice AdGuardHome[24343]: 2025/01/19 15:53:00.966238 [info] stopping AdGuard Home
Sun Jan 19 15:53:00 2025 user.notice AdGuardHome[24343]: 2025/01/19 15:53:00.966432 [info] stopping http server...
Sun Jan 19 15:53:00 2025 user.notice AdGuardHome[24343]: 2025/01/19 15:53:00.967295 [info] stopped http server
Sun Jan 19 15:53:00 2025 user.notice AdGuardHome[24343]: 2025/01/19 15:53:00.967740 [info] dnsproxy: stopping server
Sun Jan 19 15:53:00 2025 user.notice AdGuardHome[24343]: 2025/01/19 15:53:00.968527 [info] dnsproxy: stopped dns proxy server
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[24343]: 2025/01/19 15:53:01.057598 [info] stopped
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.713115 [info] AdGuard Home, version v0.107.46
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.732797 [info] tls: using default ciphers
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.743227 [info] safesearch default: disabled
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.759888 [info] Initializing auth module: /etc/AdGuardHome/data/sessions.db
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.760952 [info] auth: initialized.  users:1  sessions:3
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.761341 [info] AdGuard Home updates are disabled
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.761664 [info] web: initializing
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.864582 [info] dnsproxy: cache: enabled, size 4096 b
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.864819 [info] dnsproxy: max goroutines is set to 300
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.869866 [info] dnsproxy: cache: disabled
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.870167 [info] The server is configured to refuse ANY requests
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.870372 [info] dnsproxy: cache: enabled, size 4194304 b
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.870569 [info] dnsproxy: max goroutines is set to 300
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.873147 [info] clients: processing addresses
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.873398 [info] AdGuard Home is available at the following addresses:
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.922887 [info] go to http://127.0.0.1:3000
Sun Jan 19 15:53:01 2025 user.notice AdGuardHome[26421]: 2025/01/19 15:53:01.923432 [info] go to http://[::1]:3000
1 Like

let me check whats going on, I just switched to the desktop :wink:

update: yes I remove Apache and his dependencies, but I find out the command sed -e "s/--glinet //g" /etc/init.d/adguardhome its not doing what it supposes to do :face_with_spiral_eyes:

if I run sed -e "s/--glinet //g" /etc/init.d/adguardhome it successfully removes --glinet but then I run cat /etc/init.d/adguardhome to verified and --glinet its back :face_with_spiral_eyes:

so I get to work to figure out what's going on, and went ahead and edited /etc/init.d/adguardhome and remove --glinet manually, restarted the service and I glad to report now its working :call_me_hand:

Thanks for the help and patience while I figure out :call_me_hand:

OK, I found the issue.

It's a typo on my part.

sed -e "s/--glinet //g" /etc/init.d/adguardhome

should be

sed -i "s/--glinet //g" /etc/init.d/adguardhome

Sorry mate, that's put you through it a bit!

Trying to find the root cause of this, so went back through my bash history.

When I did this originally I used

sed -e "s/--glinet //g" -i.backup /etc/init.d/adguardhome

which I tried to simplify before writing this post and removed the backup bit, instead making it a cp command initially to make it more obvious what was happening for people running it, then removed the -i.backup which only left -e which is flawed as it's the -i that does the in place edit.

TL:DR - I screwed up, sorry @gfondeur

You good, thanks for the help anyway :call_me_hand:

You should update the post and get someone to pinned it somewhere :sunglasses:

Don't worries, it helped me, I needed to dust the desktop and polish some skills :wink:

1 Like

Fixed the sed -e mistakes :wink: So everything is good to go now.

2 Likes

Just find out this mod brakes the statistics page on the GL.iNet interface, not big deal for me because I used to go straight to the server itself to begin with :sunglasses:


Just wondering if you knew about :call_me_hand:

@gfondeur Yeah, I mentioned that above.

For my use case it wasn't a big deal, I own a few GL.iNet devices, two Marbles which are at my parents house and my in-laws house, as well as a Beryl AX that I use as my own travel router and I also have two Mango devices which I picked up a while ago and was using one as a travel router before I replaced it, and the other as an access point to a PiKVM device connected to a server.

When I put the Marble at my Dad's house the aim was to replace a perfectly good Fritzbox which worked in coordination with a small server running Adguard with an all in one device and to that end the Marble has been magnificent.

The only issue was that his workflow of disabling the Adguard instance when he needed to was to go to the Adguard web interface via a bookmark and just click disable.

Trying to explain to him, nope, you need to login to the router, then go to the Adguard webui was a step too far, hence I started poking around in the config.

He has no need to go into the router webui, but he does have a need to control the Adblocking at times.

I do love the GL.iNet devices though, being able to alter things is awesome, and I've got both my parents house and my mother in laws house connected permanently to my own house with wireguard which I run on my own router which is running Opnsense on Proxmox. I also have Adguard installed on Opnsense and a backup LXC Adguard instance and another docker container instance as a backup at my parents.

So technically, whilst I wrote this guide, I'm not actually using the GL.iNet devices with Adguard myself.

The Beryl AX travel router I have permanently connects to my home wireguard instance and uses it's DNS and advertises the same SSID I have at home, so when we go away, I don't need to connect everybodys devices to whatever network is at our destination, I just setup the Beryl and everything else just works.

It would be nice if there's a workaround to enable the stats to show but I think it's all hardcoded in the firmware and when you remove the flags it then breaks the intergration. I would love it if the glinet mobile app had all the features of of these 3rd party adguard apps already integrated, being able to manage blocklists and more directly from the glinet would be great! Then no more username/password modifications or an option from within the gui to enable username/password along with a username and password text field and a explanation that it will disable stats inside the glinet gui, then when check the client gui stats are hidden too.

@frisbee I noticed you run multiple devices / adguard instances. I'm not sure if you know about this container but it might be beneficial to you. Basically it lets you sync adguard configurations files to devices, * not sure how well it works with the adguard from within glinet but thought it was worth a mention. Looks like it might only be wise syncing your own personal devices as it copies device names etc so potentially a good way to copy adguard configs from home router to travel router.

:sweat_smile::sweat_smile::sweat_smile::sweat_smile: I missed that, I started this "project" on my phone I guess that's why I was having so many issues :sweat_smile::joy::rofl::joy::sweat_smile::joy:

Me personally thank you did :call_me_hand:

@j2zero Yeah, I use it in my docker compose stack. It's awesome for having a single source of truth and propogating it to all the instances.

Well it would help if I could tell my e from my i too.. :smile:

I'm annoyed as I know a significant issue is I really should be wearing glasses, but I rarely do, I've seen a significant increase in my errors over the last 12 months or so.

I guess maybe I could upgrade my laptop to one with a bigger screen instead. :grinning:

For me doing anything remotely technical on a phone is just impossible.

Sometimes I'm too lazy to go sit in front of the desktop :rofl:

1 Like

Same thing happens when you manually update Adguard (breaking Gl webui integration). I also noticed that updating Gl Inet firmware resets adguardhome script (file in /etc/init.d where you can choose custom dir for stats).