What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

AdGuard Home Yaml

worf105

Occasional Visitor
Hi all,

Just a quick question, When i edit my AGH YAML file any change is gone when I restart AGH.

I am trying to put these value in (BOLD):

handle_ddr: true
network:
filtering:
localnetwork: true
localhost: true

ipset: []

local_ptr_upstreams:
- 192.168.0.1:553
proxy:
parallel_upstream_queries_enabled: true

use_dns64: false
 
When I've made changes in /opt/etc/AdGuardHome/AdGuardHome.yaml, my settings have remained after router reboots and/or AdGuardHome restarts. Only the installer makes changes to the yaml file I believe. Does the AdGuardHome executable ever change its own yaml file? I guess if you chmod a-rwx /opt/etc/AdGuardHome/AdGuardHome.yaml, it should be immutable.
 
When I've made changes in /opt/etc/AdGuardHome/AdGuardHome.yaml, my settings have remained after router reboots and/or AdGuardHome restarts. Only the installer makes changes to the yaml file I believe. Does the AdGuardHome executable ever change its own yaml file? I guess if you chmod a-rwx /opt/etc/AdGuardHome/AdGuardHome.yaml, it should be immutable.
Thank you for you replay, however this did not work.
 
May i ask what branch are you running? I am using Edge
 
Hi all, Sorry for all the posts. Can anyone say what will cause any edits to the YAML file to reverted back to what has been configured in AGH GUI?
 
I don't know about AGH specifically, but quite often you need to stop a service before trying to edit its config file.

EDIT:

https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#configuration-file

Configuration file

Upon the first execution, a file named AdGuardHome.yaml will be created, with default values written in it. You can modify the file while your AdGuard Home service is not running. Otherwise, any changes to the file will be lost because the running program will overwrite them.
 
Last edited:
I don't know about AGH specifically, but quite often you need to stop a service before trying to edit its config file.

EDIT:

https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#configuration-file
Thank you ColinTaylor and Ripshod for your replies.

I do stop the adguard service and them open yaml file using nano to edit, save and exit. when AGH restarts i check and changes are gone. I have a feeling that either i don't stop everything in regards to AGH or there is something that watches AGH and seeing it down, restarts it while i am editing yaml. I have tried looking to AI for some help but I have been warned before about using AI so I have only used it to see if there is anything obvious i am missing. Any further help would be much appreciated.
 
I have a feeling that either i don't stop everything in regards to AGH or there is something that watches AGH and seeing it down, restarts it while i am editing yaml.
I would use the check funtion to verify that it's shut down. Then edit your file and check again that it's still down. Then restart the service.

 
HI Colin, I have done the following:
worf105@RT-AX86U-7958:/tmp/mnt/AMTM/entware/etc/AdGuardHome# service
stop_AdGuardHome

Done.
worf105@RT-AX86U-7958:/tmp/mnt/AMTM/entware/etc/AdGuardHome# pidof A
dGuardHome
worf105@RT-AX86U-7958:/tmp/mnt/AMTM/entware/etc/AdGuardHome# /opt/et
c/init.d/S99AdGuardHome check
Checking AdGuardHome... dead.
worf105@RT-AX86U-7958:/tmp/mnt/AMTM/entware/etc/AdGuardHome# nano Ad
GuardHome.yaml (edited, saved and exit))
worf105@RT-AX86U-7958:/tmp/mnt/AMTM/entware/etc/AdGuardHome# /opt/et
c/init.d/S99AdGuardHome check
Checking AdGuardHome... dead.
worf105@RT-AX86U-7958:/tmp/mnt/AMTM/entware/etc/AdGuardHome# service
start_AdGuardHome

Done.
worf105@RT-AX86U-7958:/tmp/mnt/AMTM/entware/etc/AdGuardHome# pidof A
dGuardHome
493752
worf105@RT-AX86U-7958:/tmp/mnt/AMTM/entware/etc/AdGuardHome# /opt/et
c/init.d/S99AdGuardHome check
Checking AdGuardHome... alive.
 
HI Colin, I have done the following:
worf105@RT-AX86U-7958:/tmp/mnt/AMTM/entware/etc/AdGuardHome# service
stop_AdGuardHome

Done.
worf105@RT-AX86U-7958:/tmp/mnt/AMTM/entware/etc/AdGuardHome# pidof A
dGuardHome
worf105@RT-AX86U-7958:/tmp/mnt/AMTM/entware/etc/AdGuardHome# /opt/et
c/init.d/S99AdGuardHome check
Checking AdGuardHome... dead.
worf105@RT-AX86U-7958:/tmp/mnt/AMTM/entware/etc/AdGuardHome# nano Ad
GuardHome.yaml (edited, saved and exit))
worf105@RT-AX86U-7958:/tmp/mnt/AMTM/entware/etc/AdGuardHome# /opt/et
c/init.d/S99AdGuardHome check
Checking AdGuardHome... dead.
worf105@RT-AX86U-7958:/tmp/mnt/AMTM/entware/etc/AdGuardHome# service
start_AdGuardHome

Done.
worf105@RT-AX86U-7958:/tmp/mnt/AMTM/entware/etc/AdGuardHome# pidof A
dGuardHome
493752
worf105@RT-AX86U-7958:/tmp/mnt/AMTM/entware/etc/AdGuardHome# /opt/et
c/init.d/S99AdGuardHome check
Checking AdGuardHome... alive.
When checking the Yaml file after the above, all edits have gone.
 
I think the above entries I am trying to put in the YAML file are redundant as these are already taking care of elsewhere in AGH. I could be wrong (probably am) when i enter then in the YAML file, AGH checks it and find these already in place and restores to previous or writes out from what AGH know from somewhere. Just trying to understand.
 
I recall AGH running AdGuardHome --check-config somewhere. I've never had any problems with it so I've never explored it, but maybe that removes offending lines? I will say I don't have any of the tags you are trying to add, so are you sure those are correct and/or in the right place? If you just change something like adding an upstream_dns to see if that sticks? Is anything kept if you make changes via the web browser (http://[router]:3000/)?
 
I recall AGH running AdGuardHome --check-config somewhere. I've never had any problems with it so I've never explored it, but maybe that removes offending lines? I will say I don't have any of the tags you are trying to add, so are you sure those are correct and/or in the right place? If you just change something like adding an upstream_dns to see if that sticks? Is anything kept if you make changes via the web browser (http://[router]:3000/)?
Hi ArbitraryLake, Anything i do in the GUI sticks and is found in the YAML file. I only have a problem if i edit the YAML file directly.

 
What does ./AdGuardHome --check-config -c /opt/etc/AdGuardHome/AdGuardHome.yaml output? Oddly, I put some different bogus tags in there to see what it would do, and it still said the config was OK so I didn't find out what would happen if it reported it was bad. Did you install AGH via the amtm script, manually via the old threads, opkg, or something different? I've only used the amtm script, and I'd guess that's the only recommended way.
 
I'm looking through the AGH Configuration Guide (https://github.com/AdguardTeam/Adguardhome/wiki/Configuration). I don't see the options you are trying to add. You added parallel_upstream_queries_enabled. The closest I can find is upstream_mode parallel. Since AGH can apparently edit its own config file as @ColinTaylor noted, I would guess this is the problem. That's the only thing I can think of.
 
I'm looking through the AGH Configuration Guide (https://github.com/AdguardTeam/Adguardhome/wiki/Configuration). I don't see the options you are trying to add. You added parallel_upstream_queries_enabled. The closest I can find is upstream_mode parallel. Since AGH can apparently edit its own config file as @ColinTaylor noted, I would guess this is the problem. That's the only thing I can think of.
Hey ArbitraryLake, I values i was trying to put in were already set, one using the GUI and the others were already implemented from some other source.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top