Setting Up Pi-hole on Raspberry Pi
Pi-hole is a network-level ad and tracker blocker that can be easily set up on a Raspberry Pi. This guide will help you configure Pi-hole and provide some useful links and commands for enhancing its functionality.
Blocklists
To effectively block ads and trackers, you can add various blocklists to Pi-hole. Here are some recommended blocklists:
oisd Lists
The oisd project offers comprehensive blocklists for Pi-hole. You can use the following oisd lists:
Whitelist
To ensure that legitimate domains are not blocked, you can add them to the whitelist. Here is a useful whitelist repository:
Regex List
Regex filters allow you to block or allow specific patterns in URLs. You can use the following regex list:
Backup Your Pi-hole Database
Regularly backing up your Pi-hole database is essential. Here's a command to create a backup:
sudo service pihole-FTL stop
sudo mv /etc/pihole/pihole-FTL.db /media/backup/pihole-FTL_$(date +"%m-%y").db
sudo service pihole-FTL start
Sample:
sudo cp /etc/pihole/pihole-FTL.db ~/pi-hole-backup/pihole-FTL_$(date +"%m-%y").db
This command stops the Pi-hole FTL service, renames the database with a timestamp, and then restarts the service.
With these configurations and resources, you can set up and enhance Pi-hole on your Raspberry Pi to enjoy an ad-free and tracker-free browsing experience.
Caddy
sudo nano /etc/caddy/Caddyfile