# Configure logrotate
sudo editor /etc/logrotate.conf
# Individual service configs
cd /etc/logrotate.d
# Edit this file
sudo editor /etc/systemd/journald.conf
# Restart daemon
systemctl daemon-reload
/var/log/pihole.log
- Generated by dnsmasq - the software powering Pi-hole.
- Contains a record of all domains queried.
- NEVER share this file on support forums.
- Automatically flushed every day via a
cron
job. - Use
pihole -f
to manually flush.
/var/log/pihole/pihole_debug.log
- Generated when you run
pihole debug
. - While it contains a snippet of
pihole.log
, this file IS safe to share. - When you run
pihole debug
, the final step is an option to upload to Pi-hole's secure servers. - Uploading is required if you'll be seeking help on Pi-hole's Discord.
- Uploaded files are transferred using SSL to a secure server and self-destruct after 48 hours.
- Uploaded files ARE collected for analysis by the Pi-hole team.
- This file is safe to delete.
/var/log/pihole/FTL.log
- Generated by Pi-hole's API engine.
- This file does not appear to pose privacy concerns.
Change Logging Level
While installing Pi-hole, you are prompted to select a logging level. I suggest showing everything for testing purposes, then switching to Anonymous Mode or disabling logging.
- Pi-hole web UI > Settings > Privacy
Enable/Disable Logging
# Disable /var/log/pihole.log
pihole -l off
# Enable
pihole -l on
While installing Unbound, you create a pi-hole.conf
file by copying it from the Pi-hole documentation. Copied as-is, the default is to log only errors to syslog
.
# Open this file
editor /etc/unbound/unbound.conf.d/pi-hole.conf
# See these lines
server:
# If no logfile is specified, syslog is used
# logfile: "/var/log/unbound/unbound.log"
verbosity: 0
# Verbosity levels
Level 0 means no verbosity, only errors
Level 1 gives operational information
Level 2 gives detailed operational information
Level 3 gives query level information
Level 4 gives algorithm level information
Level 5 logs client identification for cache misses
# This command
pivpn debug
# Generates this log and is safe to delete
/tmp/debug.log