Pi hole - vincios/rpi-setup GitHub Wiki
The Pi-hole® is a DNS sinkhole that protects your devices from unwanted content without installing any client-side software.
Note
Since Pihole v6 the web server is directly embedded into the pihole-FTL binary. This eliminates the need for lighttpd
/nginx
and PHP
.
The web server configuration for old v5 is still in the legacy wiki.
-
Make sure that your system is fully updated (with
apt
) -
$ curl -sSL https://install.pi-hole.net | bash
⚠️ Make note of the admin password -
Change the http port to 8088
$ sudo pihole-FTL --config webserver.port "8088o,8443os,[::]:8088o,[::]:8443os"
-
Install whitelist
Caution
```bash
$ git clone https://github.com/anudeepND/whitelist.git
$ sudo python3 whitelist/scripts/whitelist.py
```
Notes:
- Current block lists are taken from here.
-
Follow Annex: Add custom dynamic configuration, use the following configuration:
✨ Click to see the code
http: routers: pi-hole: rule: Host(`pihole.{{ env "DUCKDNS_DOMAIN"}}.duckdns.org`) service: "pi-hole" # Middlewares to which the request will be forwarded when the route is activated # Optional middlewares: - redirect-to-admin - authentication # Enable the TLS encryption # Normally, you should not need to edit this section tls: certResolver: "duckdnsResolver" domains: - main: "{{ env "DUCKDNS_DOMAIN"}}.duckdns.org" sans: - "*.{{ env "DUCKDNS_DOMAIN"}}.duckdns.org" middlewares: redirect-to-admin: redirectRegex: regex: "^https://([^/]+)/?$" replacement: "https://${1}/admin/" # Service's urls where the request will be forwarded services: pi-hole: loadBalancer: servers: - url: "http://127.0.0.1:8088/admin/"
$ sudo pihole -up