{"id":8021,"date":"2024-11-03T18:19:35","date_gmt":"2024-11-03T16:19:35","guid":{"rendered":"https:\/\/www.sigalou-domotique.fr\/?p=8021"},"modified":"2026-01-02T11:18:45","modified_gmt":"2026-01-02T09:18:45","slug":"installer-pi-hole-sur-nas-synology","status":"publish","type":"post","link":"https:\/\/www.sigalou-domotique.fr\/en\/installer-pi-hole-sur-nas-synology","title":{"rendered":"I install Pi-Hole on my Synology NAS"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<label for=\"ez-toc-cssicon-toggle-item-6ae48afde9201\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6ae48afde9201\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/installer-pi-hole-sur-nas-synology\/#Installation_de_limage_Pi-hole\" >Installation of the Pi-hole image<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/installer-pi-hole-sur-nas-synology\/#Creation_dun_dossier_partage_docker-pihole\" >Creating a shared docker-pihole folder<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/installer-pi-hole-sur-nas-synology\/#Creation_dun_projet_dans_Container_Manager\" >Creating a project in Container Manager<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/installer-pi-hole-sur-nas-synology\/#Lancement_du_projet\" >Launch of the project<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/installer-pi-hole-sur-nas-synology\/#Acces_a_linterface_dadministration_de_Pi-Hole\" >Access to the Pi-Hole administration interface<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/installer-pi-hole-sur-nas-synology\/#Test_de_Pi-Hole\" >Pi-Hole test<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/installer-pi-hole-sur-nas-synology\/#Comparaison_avec_et_sans_Pi-Hole\" >Comparison with and without Pi-Hole<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/installer-pi-hole-sur-nas-synology\/#Comparaison_avec_le_bloqueur_de_Brave\" >Comparison with Brave Blocker<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/installer-pi-hole-sur-nas-synology\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Installation_de_limage_Pi-hole\"><\/span>Installation of the Pi-hole image<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8023\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole01-1.png\" alt=\"Pi-hole Installation\" width=\"1051\" height=\"284\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole01-1.png 1051w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole01-1-600x162.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole01-1-300x81.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole01-1-1024x277.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole01-1-768x208.png 768w\" sizes=\"auto, (max-width: 1051px) 100vw, 1051px\" \/><\/p>\r\n<p><!--more--><\/p>\r\n\r\n<h2><span class=\"ez-toc-section\" id=\"Creation_dun_dossier_partage_docker-pihole\"><\/span>Creating a shared docker-pihole folder<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>To create a shared folder, use your system's Control Panel. It is advisable not to use the generic \"docker\" folder to facilitate backups with tools like hyper-backup.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8024\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole02.png\" alt=\"Creating the shared folder\" width=\"253\" height=\"208\" \/><\/p>\r\n<p>Then add two subfolders in the docker-pihole:<\/p>\r\n<ul>\r\n<li>etc-pihole<\/li>\r\n<li>etc-dnsmasq.d<\/li>\r\n<\/ul>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8025\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole03.png\" alt=\"Subfolders\" width=\"340\" height=\"229\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole03.png 340w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole03-300x202.png 300w\" sizes=\"auto, (max-width: 340px) 100vw, 340px\" \/><\/p>\r\n<p>Change the \u2018System\u2019 permissions in this shared folder to avoid access and execution errors.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8039\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole08.png\" alt=\"Modification of authorisations\" width=\"1262\" height=\"792\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole08.png 1262w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole08-600x377.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole08-300x188.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole08-1024x643.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole08-768x482.png 768w\" sizes=\"auto, (max-width: 1262px) 100vw, 1262px\" \/><\/p>\r\n\r\n<h2><span class=\"ez-toc-section\" id=\"Creation_dun_projet_dans_Container_Manager\"><\/span>Creating a project in Container Manager<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8027\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole04.png\" alt=\"Container Manager\" width=\"752\" height=\"276\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole04.png 752w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole04-600x220.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole04-300x110.png 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/p>\r\n<p>Here is the content of the docker-compose file:<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">version: \"3\" services: pihole: Image: pihole\/pihole:latest container_name: pihole hostname: pihole environment: TZ: \"Europe\/Paris\" # WEBPASSWORD time zone: \"your _mot _de _passe\" # Password for DNS1 web interface: \"208.67.222.222\" # Primary DNS (e.g. OpenDNS) DNS2: \"192.168.1.1\" # Secondary DNS (e.g., your Synology router) ports: - \"53:53\/tcp\" # DNS port in TCP - \"53:53\/udp\" # DNS port in UDP - \"8888:80\/tcp\" # Port for web interface volumes: - \/volume1\/docker-pihole\/etc-pihole:\/etc\/pihole # Configuration folder Pi-hole - \/volume1\/docker-pihole\/etc-dnsmasq.d:\/etc\/dnsmasq.d # DNS restart configuration folder: unless-stopped network_mode: bridge<\/pre>\r\n<p>Make sure you set a secure password for the web interface. Note that \u201c192.168.1.1\u201d is the address of my Synology router.<\/p>\r\n\r\n<h2><span class=\"ez-toc-section\" id=\"Lancement_du_projet\"><\/span>Launch of the project<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>Once the project is launched, check its creation in the log to make sure there are no problems.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8043\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole09.png\" alt=\"Creation log\" width=\"541\" height=\"62\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole09.png 541w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole09-300x34.png 300w\" sizes=\"auto, (max-width: 541px) 100vw, 541px\" \/><\/p>\r\n\r\n<h2><span class=\"ez-toc-section\" id=\"Acces_a_linterface_dadministration_de_Pi-Hole\"><\/span>Access to the Pi-Hole administration interface<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8044\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole10.png\" alt=\"Administration interface\" width=\"560\" height=\"689\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole10.png 560w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole10-244x300.png 244w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/p>\r\n<p>To access the administration interface, use the local address of your SIN, e.g. 192.168.1.2:8888. Enter the password you set in the docker-compose file to access the Pi-Hole administration screen.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8045\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole11.png\" alt=\"Administration screen\" width=\"1251\" height=\"935\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole11.png 1251w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole11-600x448.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole11-300x224.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole11-1024x765.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole11-768x574.png 768w\" sizes=\"auto, (max-width: 1251px) 100vw, 1251px\" \/><\/p>\r\n\r\n<h2><span class=\"ez-toc-section\" id=\"Test_de_Pi-Hole\"><\/span>Pi-Hole test<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>To test Pi-Hole, temporarily change the DNS server address in the network settings of your adapter using the IP of your NAS.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8046\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole12.png\" alt=\"Changing the DNS server\" width=\"1332\" height=\"602\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole12.png 1332w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole12-600x271.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole12-300x136.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole12-1024x463.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole12-768x347.png 768w\" sizes=\"auto, (max-width: 1332px) 100vw, 1332px\" \/><\/p>\r\n<p>Then visit a site with lots of ads to test the effectiveness of Pi-Hole.<\/p>\r\n\r\n<h2><span class=\"ez-toc-section\" id=\"Comparaison_avec_et_sans_Pi-Hole\"><\/span>Comparison with and without Pi-Hole<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>Use a browser like Edge in a Windows sandbox, disable all security options, purge the cache and visit the site <a href=\"https:\/\/adblock-tester.com\/\">AdBlock Tester<\/a> to evaluate the effectiveness of Pi-Hole.<\/p>\r\n<p>Result <strong>without<\/strong> Pi-Hole:<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8047\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole13.png\" alt=\"Without Pi-Hole\" width=\"688\" height=\"484\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole13.png 688w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole13-600x422.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole13-300x211.png 300w\" sizes=\"auto, (max-width: 688px) 100vw, 688px\" \/><\/p>\r\n<p>Result <strong>with<\/strong> Pi-Hole:<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8048\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole14.png\" alt=\"With Pi-Hole\" width=\"689\" height=\"484\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole14.png 689w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole14-600x421.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/pihole14-300x211.png 300w\" sizes=\"auto, (max-width: 689px) 100vw, 689px\" \/><\/p>\r\n<p>The score increased from 39\/100 to 70\/100, showing a noticeable improvement.<\/p>\r\n<p>Out of 39 requests to build the page, 14 were blocked.<\/p>\r\n\r\n<h2><span class=\"ez-toc-section\" id=\"Comparaison_avec_le_bloqueur_de_Brave\"><\/span>Comparison with Brave Blocker<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>The Brave browser, with its built-in blocker, is used to compare results. In private mode, Brave blocks 12 sites or queries, scoring 96\/100 without Pi-Hole.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-8052\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/3060.jpg\" alt=\"Brave\" width=\"570\" height=\"200\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/3060.jpg 687w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/3060-600x210.jpg 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/11\/3060-300x105.jpg 300w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><\/p>\r\n<p>With Pi-Hole enabled, the result remains at 96\/100. By disabling Brave's shield, Pi-Hole gets 70\/100, and without Pi-Hole, the score is 39\/100.<\/p>\r\n\r\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<p>Pi-Hole is efficient but less efficient than Brave's built-in blocker according to tests performed on adblock-tester.com. However, it remains a good complement for the local network.<\/p>\r\n<p><code><\/code><\/p>","protected":false},"excerpt":{"rendered":"<p>Installation of the Pi-hole image<\/p>","protected":false},"author":1,"featured_media":8055,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,166],"tags":[],"class_list":["post-8021","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-domotique","category-retex"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts\/8021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/comments?post=8021"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts\/8021\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/media\/8055"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/media?parent=8021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/categories?post=8021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/tags?post=8021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}