template.yaml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. ---
  2. kind: compose
  3. schema: "1.2"
  4. metadata:
  5. name: AdGuard Home
  6. description: |
  7. Network-wide software for blocking ads and tracking. AdGuard Home operates as a DNS server that
  8. re-routes tracking domains to a "black hole", thus preventing your devices from connecting to those servers.
  9. It features advanced DNS filtering, parental controls, safe browsing, and HTTPS/DNS-over-TLS/DNS-over-QUIC support.
  10. ## Swarm Deployment Warning
  11. AdGuard Home uses local storage and configuration files and does NOT support running multiple replicas.
  12. This template enforces a single replica with node placement constraints to ensure stable DNS resolution.
  13. ## References
  14. * **Project:** https://adguard.com/adguard-home/overview.html
  15. * **Documentation:** https://github.com/AdguardTeam/AdGuardHome/wiki
  16. * **GitHub:** https://github.com/AdguardTeam/AdGuardHome
  17. version: latest
  18. author: Christian Lempa
  19. date: '2025-11-13'
  20. tags:
  21. - traefik
  22. - swarm
  23. next_steps: |
  24. ### 1. Deploy the Service
  25. {% if swarm_enabled -%}
  26. Deploy to Docker Swarm:
  27. ```bash
  28. docker stack deploy -c compose.yaml adguardhome
  29. ```
  30. {% else -%}
  31. Start AdGuard Home using Docker Compose:
  32. ```bash
  33. docker compose up -d
  34. ```
  35. {% endif -%}
  36. ### 2. Initial Setup
  37. {% if traefik_enabled -%}
  38. * Navigate to: **http://{{ traefik_host }}.{{ traefik_domain }}:3000**
  39. {% else -%}
  40. * Navigate to: **http://localhost:3000**
  41. {% endif -%}
  42. * Complete the initial setup wizard to configure admin credentials and DNS settings.
  43. ### 3. Access the Web Interface
  44. {% if traefik_enabled -%}
  45. * Navigate to: **https://{{ traefik_host }}.{{ traefik_domain }}**
  46. {% else -%}
  47. * Navigate to: **http://localhost:{{ ports_http }}**
  48. {% endif -%}
  49. * Login using the credentials configured during initial setup.
  50. spec:
  51. general:
  52. vars:
  53. service_name:
  54. default: "adguardhome"
  55. container_name:
  56. default: "adguardhome"
  57. container_hostname:
  58. default: "adguardhome"
  59. traefik:
  60. vars:
  61. traefik_enabled:
  62. needs: "network_mode=bridge"
  63. traefik_host:
  64. default: "adguardhome"
  65. network:
  66. vars:
  67. network_mode:
  68. extra: >
  69. Use 'host' mode if you need DHCP functionality or want AdGuard Home to bind directly to port 53.
  70. NOTE: Swarm only supports 'bridge' mode!
  71. network_name:
  72. default: "adguardhome_network"
  73. ports:
  74. vars:
  75. ports_http:
  76. description: "External HTTP port (admin panel)"
  77. type: int
  78. default: 3080
  79. needs: ["traefik_enabled=false", "network_mode=bridge"]
  80. ports_https:
  81. description: "External HTTPS port"
  82. type: int
  83. default: 3443
  84. needs: ["traefik_enabled=false", "network_mode=bridge"]
  85. swarm:
  86. vars:
  87. swarm_enabled:
  88. needs: "network_mode=bridge"
  89. swarm_placement_host:
  90. required: true
  91. optional: false
  92. needs: null