Skip to content

Arch Linux ARM Install Pi-Hole On A Raspberry Pi

Note

Pi-Hole is not officially supported on the Arch Linux operating system.

Prerequisites

Environment

Install Pi-Hole

  1. Install required packages.

    # pikaur -Syu pi-hole-server nginx-mainline php-fpm php-sqlite inetutils
    

    Info

    Pi-Hole Chronometer (pihole -c) utilizes the command "hostname" and therefore the package "inetutils" is required.

  2. Set Pi-Hole web interface administrator password.

    # pihole -a -p <password>
    

  3. Enable PHP required extensions.
    # nano /etc/php/php.ini
    
    extension=curl
    extension=pdo_sqlite
    extension=sockets
    extension=sqlite3
    
  4. Create Nginx directory for site config.
    # mkdir /etc/nginx/conf.d
    
  5. Set Nginx general settings.
    # nano /etc/nginx/nginx.conf
    
    include /etc/nginx/conf.d/*.conf;
    
  6. Create Nginx site config.
    # cp /usr/share/pihole/configs/nginx.example.conf /etc/nginx/conf.d/pi-hole.conf
    
  7. Set system hosts correctly.
    # nano /etc/hosts
    
    127.0.0.1              localhost
    ip.address.of.pihole   pi.hole myhostname
    
  8. Stop and disable "systemd-resolved.service".

    # systemctl stop systemd-resolved.service
    # systemctl disable systemd-resolved.service
    

    Note

    This is done because port 53 is used by "systemd-resolved.service" which will conflict with "pihole-FTL.service" port 53.

  9. Set php-fpm.service overrides.

    # systemctl edit php-fpm.service
    
    [Service]
    ReadWritePaths = /srv/http/pihole
    ReadWritePaths = /run/pihole-ftl/pihole-FTL.port
    ReadWritePaths = /run/log/pihole/pihole.log
    ReadWritePaths = /run/log/pihole-ftl/pihole-FTL.log
    ReadWritePaths = /etc/pihole
    ReadWritePaths = /etc/hosts
    ReadWritePaths = /etc/hostname
    ReadWritePaths = /etc/dnsmasq.d/
    ReadWritePaths = /proc/meminfo
    ReadWritePaths = /proc/cpuinfo
    ReadWritePaths = /sys/class/thermal/thermal_zone0/temp
    ReadWritePaths = /tmp
    

    Note

    This step is required to grant Pi-Hole web interface access to the necessary files/directories.


Last update: September 16, 2020