Pi-Hole – Set the Database Max Days

I keep running out space on my Pi-Hole device. To limit this I invoked the MAXDBDAYS argument in the Pi-Hole FTL configuration.

  • Login into your Pi-Hole device via SSH.
  • At the prompt type or paste the following code to stop the FTL service:
sudo service pihole-FTL stop
  • Next type or paste the following line of code to edit the FTL configuration file
sudo nano /etc/pihole/pihole-FTL.conf
  • In the editor scroll down to the last lime of the document

#; Pi-hole FTL config file
#; Comments should start with #; to avoid issues with PHP and bash reading this file
PRIVACYLEVEL=0
RATE_LIMIT=1000/60
  • Add the following line of code. In this example I have set the number of days to 14. You can updated it to be longer or shorter
MAXDBDAYS=14
  • Save the file and exit the editor.
  • Type or paste the following code to start the FTL service:
sudo service pihole-FTL start