Jump to content

Adguard Home: Difference between revisions

From Official NixOS Wiki
Initial Commit: added example configuration & link to NixOS Search
 
m fix: new parameter available host and port which override the param http.address
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Expansion}}
[https://github.com/AdguardTeam/AdGuardHome AdGuard Home] is an DNS Server for blocking ads and tracking.
== Example config ==
== Example config ==
<syntaxhighlight lang="nixos">
<syntaxhighlight lang="nixos">
   services.adguardhome = {
   services.adguardhome = {
     enable = true;
     enable = true;
    # You can select any ip and port, just make sure to open firewalls where needed
    host = "127.0.0.1";
    port = 3003;
     settings = {
     settings = {
      http = {
        # You can select any ip and port, just make sure to open firewalls where needed
        address = "127.0.0.1:3003";
      };
       dns = {
       dns = {
         upstream_dns = [
         upstream_dns = [
Line 37: Line 39:
   };
   };
</syntaxhighlight>See available options for the service at [https://search.nixos.org/options?query=services.adguardhome search.nixos.org/options?query=services.adguardhome]
</syntaxhighlight>See available options for the service at [https://search.nixos.org/options?query=services.adguardhome search.nixos.org/options?query=services.adguardhome]
[[Category:Applications]]
[[Category:Networking]]
[[Category:Server]]
[[Category:DNS]]

Latest revision as of 13:00, 28 November 2025

☶︎
This article or section needs to be expanded. Further information may be found in the related discussion page. Please consult the pedia article metapage for guidelines on contributing.

AdGuard Home is an DNS Server for blocking ads and tracking.

Example config

  services.adguardhome = {
    enable = true;
    # You can select any ip and port, just make sure to open firewalls where needed
    host = "127.0.0.1";
    port = 3003;
    settings = {
      dns = {
        upstream_dns = [
          # Example config with quad9
          "9.9.9.9#dns.quad9.net"
          "149.112.112.112#dns.quad9.net"
          # Uncomment the following to use a local DNS service (e.g. Unbound)
          # Additionally replace the address & port as needed
          # "127.0.0.1:5335"
        ];
      };
      filtering = {
        protection_enabled = true;
        filtering_enabled = true;

        parental_enabled = false;  # Parental control-based DNS requests filtering.
        safe_search = {
          enabled = false;  # Enforcing "Safe search" option for search engines, when possible.
        };
      };
      # The following notation uses map
      # to not have to manually create {enabled = true; url = "";} for every filter
      # This is, however, fully optional
      filters = map(url: { enabled = true; url = url; }) [
        "https://adguardteam.github.io/HostlistsRegistry/assets/filter_9.txt"  # The Big List of Hacked Malware Web Sites
        "https://adguardteam.github.io/HostlistsRegistry/assets/filter_11.txt"  # malicious url blocklist
      ];
    };
  };

See available options for the service at search.nixos.org/options?query=services.adguardhome