Set AdGuard Home DNS settings
adguard_set_dns_configUpdate AdGuard Home DNS settings only after validating upstream servers, so changes to resolvers, cache, DNSSEC, rate limits, or blocking mode apply network-wide without writing broken configurations.
Instructions
Change selected AdGuard Home DNS settings after the new upstreams pass AdGuard's own test.
Reads dns_info, then — when upstream_dns, bootstrap_dns,
fallback_dns or local_ptr_upstreams change — runs
POST /control/test_upstream_dns on the resulting lists and writes
nothing unless every server answers OK. Then sends only the given
fields to POST /control/dns_config (AdGuard keeps the rest), and
re-reads dns_info. Applies immediately to the whole network.
Use when: changing upstream/fallback/bootstrap/PTR resolvers, rate
limit, cache, dnssec_enabled, blocking mode or upstream timeout.
Not for: reading the current values — use adguard_get_config; filter
lists — use adguard_add_filter, adguard_remove_filter or
adguard_set_filter_enabled.
Returns: {"applied": true, "addon_slug", "changed_fields", "before", "after", "upstream_test"}; before/after list the allowlisted fields.
Errors: invalid_changes, no_changes, upstream_test_failed (with
failed, nothing written), HTTP <status> with AdGuard's detail, and
the add-on lookup errors of adguard_get_config.
Limits: a domain-specific upstream reported as a WARNING also blocks the write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changes | Yes | Only the DNS settings to change, e.g. `{"upstream_dns": ["tls://dns.quad9.net"], "cache_optimistic": true}`. Unknown keys are rejected; omitted keys keep their value. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||