Pihole on Windows 11
Yes, you can absolutely run Pi-hole on Windows 11, but because Pi-hole is built natively for Linux, you have to use a “bridge” to get it running.
Given your background in networking and your existing home lab, you’ll find the Docker approach most familiar, but there is also a lightweight WSL option if you want to avoid Docker Desktop overhead.
Method 1: Using Docker (Recommended)
Since you already use Portainer and Ubuntu, this will be the most seamless way to integrate it into your existing workflow.
- Install Docker Desktop: Download and install it, ensuring the WSL 2 backend is enabled during setup.
- Pull the Image: Open Terminal and run:
bash docker pull pihole/pihole - Run the Container: Use a command similar to the one below. You’ll need to map ports 53 (DNS), 80 (Web UI), and 443 (HTTPS).
bash docker run -d --name pihole \ -e TZ="America/Los_Angeles" \ -e WEBPASSWORD="yourpassword" \ -p 53:53/tcp -p 53:53/udp \ -p 80:80 \ -p 443:443 \ --restart=unless-stopped \ pihole/pihole:latest
> Note: Windows often has a service called “Internet Connection Sharing” or “DNS Client” that might already be using port 53. If you get a “port already in use” error, you may need to disable thehns(Host Network Service) or use a specific IP address for the container.
Method 2: Using WSL (Lightweight)
If you don’t want the resource overhead of Docker Desktop, you can run it “semi-natively” using Windows Subsystem for Linux (WSL).
- Manual Install: Install a distro like Ubuntu from the Microsoft Store, open it, and run the official Pi-hole script:
curl -sSL https://install.pi-hole.net | bash - PH4WSL1 Script: There is a popular community project called Pi-Hole for WSL1 that automates the setup, including firewall rules and auto-start tasks, which makes the process much faster.
Important Networking Considerations
- Static IP: Ensure your Windows 11 machine has a static IP (assigned via your router’s DHCP reservations). If the Windows IP changes, your entire network will lose internet access until you update the DNS settings.
- Sleep Mode: If your Windows machine goes to sleep, Pi-hole goes to sleep. You must set the PC to “Never” sleep in Power Settings.
- The 127.0.0.1 Trap: When configuring your router’s DNS, do not use
127.0.0.1. You must use the actual LAN IP of your Windows machine (e.g.,192.168.1.50).