Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/damianiglesias/pihole-ubuntu-deploy/llms.txt

Use this file to discover all available pages before exploring further.

Log2Ram redirects /var/log writes to a RAM-backed tmpfs mount and periodically syncs the contents to disk. This significantly reduces write cycles on SD cards (Raspberry Pi), SSDs in VMs, and other low-endurance storage media β€” which is especially important for Pi-hole, a service that generates continuous log traffic as it processes DNS queries across your entire network.

Installation via deploy.sh

During the deploy.sh interactive setup you will be prompted at Step 4.7:
πŸ’Ύ Step 4.7: Disk Optimization (Log2Ram)
   Reduces disk wear by writing logs to RAM. Recommended for SD Cards & VMs.
   Install Log2Ram? [y/n]:
Type y and press Enter. The script performs the following steps:
  1. Adds the Azlux repository to your apt sources:
    echo "deb [signed-by=/usr/share/keyrings/azlux-archive-keyring.gpg] http://packages.azlux.fr/debian/ stable main" \
      | tee /etc/apt/sources.list.d/azlux.list
    
  2. Imports the GPG signing key from the Azlux server:
    wget -O /usr/share/keyrings/azlux-archive-keyring.gpg https://azlux.fr/repo.gpg
    
  3. Installs Log2Ram via apt:
    apt-get update && apt-get install log2ram -y
    

When It Activates

Log2Ram starts automatically after the next reboot. No additional configuration or manual steps are required β€” once the system comes back online, /var/log will be backed by a RAM-based tmpfs and synced to disk on a regular schedule.
Log2Ram activates after reboot. Any logs written between installation and the reboot are stored normally on disk and are not affected.

Who Should Install It

Raspberry Pi

SD cards have a limited number of write cycles. Pi-hole’s constant DNS logging can shorten their lifespan significantly. Log2Ram is highly recommended for all Raspberry Pi deployments.

VMs with Thin-Provisioned Disks

Reduces IOPS on the underlying host storage, lowering overhead and improving performance on shared virtualisation platforms.

Systems with SSDs

Extends SSD lifespan by reducing the total bytes written over time β€” especially valuable for consumer-grade SSDs with lower endurance ratings.

Systems with HDDs

Log2Ram is generally not needed for traditional hard disk drives. HDDs handle high write-cycle workloads well and do not suffer the same endurance limitations as flash storage.
If you are running Pi-hole on a Raspberry Pi or any SD-card-based system, Log2Ram is highly recommended. Pi-hole generates substantial log traffic over time β€” every DNS query is recorded β€” and this write load can accelerate SD card wear and lead to premature failure.

Checking Status After Reboot

After rebooting, verify that Log2Ram is running and that /var/log is mounted in RAM:
systemctl status log2ram
df -h /var/log
In the df output, /var/log should show a tmpfs filesystem rather than your root disk partition, confirming that log writes are going to RAM.

Build docs developers (and LLMs) love