Skip to content

Instantly share code, notes, and snippets.

@jochenvw
Created February 6, 2026 20:42
Show Gist options
  • Select an option

  • Save jochenvw/e75af1b3d6e1ee35d9e5138c2e37ad2c to your computer and use it in GitHub Desktop.

Select an option

Save jochenvw/e75af1b3d6e1ee35d9e5138c2e37ad2c to your computer and use it in GitHub Desktop.
PiHole on ARCH
#!/usr/bin/env bash
set -e
echo "=== Updating system ==="
sudo pacman -Syu --noconfirm
echo "=== Installing Docker ==="
sudo pacman -S --noconfirm docker docker-compose
echo "=== Enabling Docker service ==="
sudo systemctl enable docker
sudo systemctl start docker
echo "=== Adding user to docker group ==="
sudo usermod -aG docker $USER
echo "=== Disabling systemd-resolved if active ==="
if systemctl is-active --quiet systemd-resolved; then
sudo systemctl disable systemd-resolved
sudo systemctl stop systemd-resolved
fi
echo "=== Creating Pi-hole directory ==="
mkdir -p ~/pihole
cd ~/pihole
echo "=== Writing docker-compose.yml ==="
cat > docker-compose.yml <<EOF
version: "3"
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
restart: unless-stopped
network_mode: host
environment:
TZ: "Europe/London"
WEBPASSWORD: "changeme"
volumes:
- ./etc-pihole:/etc/pihole
- ./etc-dnsmasq.d:/etc/dnsmasq.d
cap_add:
- NET_ADMIN
EOF
echo "=== Starting Pi-hole ==="
docker compose up -d || sudo docker compose up -d
echo "=== Done ==="
echo "Log out and back in to activate docker group permissions."
echo "Then test with: docker ps"
echo "Access Pi-hole at: http://<radxa-ip>/admin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment