OldPCGuy
Homelab

How to run Pi-hole on an old PC instead of a Raspberry Pi

Cartoon of Brandon in headphones and a dark blazer, high-fiving a smiling cloud next to a server, router, and a handful of network cables

Pi-hole blocks ads and trackers for every device in the house, including phones and smart TVs. It's famous for running on a Raspberry Pi, but an old PC or laptop you already own does the job just as well. For the record, I run AdGuard Home for this on my Proxmox cluster. It does the same thing, and I'll cover how the two compare.

By Brandon Sheley 8 min read

What you'll do

  • Install Debian (no desktop needed) on the old PC and plug it into your router with a cable.
  • Give it a fixed IP address with a DHCP reservation on your router.
  • Run Pi-hole's one-line installer, then open http://<its-ip>/admin/.
  • Set your router's DNS server to the PC's address, so every device uses it.

What Pi-hole does (and doesn't)

Every time a device on your network opens a website or app, it first asks a DNS server to turn a name like example.com into an address. Pi-hole becomes that DNS server for your house. When a device asks for a known ad or tracking domain, Pi-hole answers "nothing here," and the ad never loads.

Because it works at the network level, it covers devices you can't install an ad blocker on: phones, tablets, smart TVs, streaming sticks, and game consoles. It also makes pages load a little faster and gives you a dashboard of what every device is talking to.

What it won't do:

  • Block YouTube ads, mostly. They come from the same servers as the videos.
  • Protect you away from home, unless you connect back through a VPN like WireGuard or Tailscale.
  • Replace an ad blocker in the browser. Browser extensions can hide ads that come from the same site as the page. Use both if you like.

Which old PC to use

Pi-hole is tiny. Its documentation asks for 512 MB of memory and 2 GB of free disk space (4 GB recommended). Almost any 64-bit PC from the last 15 years is overkill for it, which is the point. Good candidates:

  • A mini PC like a Lenovo M720q or Dell OptiPlex Micro. Quiet, and about 12 to 15 watts running around the clock.
  • An old laptop. Low power, and the battery acts like a small backup power supply. Plug it into the router with a cable rather than using Wi-Fi.
  • An old desktop tower. It works fine, but an older tower can draw 40 to 60 watts all day. That's $55 to $85 a year at Kansas rates, so a smaller box pays for itself. My tiny PC guide has the math.
  • A PC that's already your home server. Pi-hole happily shares a machine with other things. See Docker and Proxmox below.

Compared with a Raspberry Pi, an old PC costs nothing if you already have it, runs from a real SSD or hard drive instead of an SD card, and needs no extra case or power supply.

Install it, step by step

  1. Install Debian. Download the Debian installer, write it to a USB stick with balenaEtcher or Rufus, and install it on the old PC. At the Software selection screen, uncheck the desktop environment and check SSH server and standard system utilities. You'll manage it from another computer. Ubuntu Server works too.
  2. Give it a fixed address. In your router's settings, find the device list or DHCP settings and create a DHCP reservation (sometimes called "fixed IP" or "address reservation") for the PC. Note the address, like 192.168.1.50.
  3. Connect to it. From another computer, open Terminal or PowerShell and run ssh yourname@192.168.1.50 with the username you created.
  4. Run the installer. Pi-hole's official one-line install is:
curl -sSL https://install.pi-hole.net | bash

If curl isn't installed, run sudo apt install curl first. Piping a script straight into bash means running code you haven't read, and Pi-hole's own docs point that out. If you'd rather look first, download it, read it, then run it:

curl -sSL https://install.pi-hole.net -o basic-install.sh
sudo bash basic-install.sh
  1. Answer the installer's questions. Pick an upstream DNS provider (Quad9 and Cloudflare are common choices), keep the suggested blocklist, and leave the web interface and query logging on.
  2. Set your admin password with pihole setpassword.
  3. Open the dashboard in a browser at http://192.168.1.50/admin/ (with your PC's address) and sign in.

Nothing is blocked yet, because nothing is using it yet. That's the next step.

Point your network at it

The cleanest way is to have your router hand out the Pi-hole as the DNS server to every device:

  1. Log in to your router and find the LAN or DHCP settings. Look for DNS server.
  2. Set the primary DNS to the Pi-hole's address. If there's a secondary DNS field, leave it empty or set it to the same address. If you put a public DNS like 8.8.8.8 there, devices will use it and skip the blocking.
  3. Save, then restart a device or reconnect it to Wi-Fi so it picks up the change.
  4. Open the Pi-hole dashboard. Within a few minutes you should see queries and a "blocked" percentage climbing.

Some internet provider routers don't let you change the DNS server. In that case you can turn off the router's DHCP and let Pi-hole hand out addresses instead (it's under Settings > DHCP in the dashboard), or set the DNS on each device by hand.

Keeping it running

  • Update it now and then with pihole -up, and keep Debian updated with sudo apt update && sudo apt upgrade.
  • If a site or app breaks, open the Query Log, find the blocked domain, and add it to the allowlist. You can also pause blocking for a few minutes from the dashboard to test.
  • If the PC goes down, the internet seems to go down for every device using it. Keep it on a PC that stays on. If it dies, switch your router's DNS back to automatic until it's fixed. Some people run a second Pi-hole on another machine for that reason.
  • On a laptop, set it to keep running with the lid closed. The steps are in my CasaOS on a laptop section and work the same for Pi-hole.

Docker, Proxmox, and other ways to run it

If the old PC already does other jobs, Pi-hole doesn't need a machine of its own:

  • Docker: Pi-hole publishes an official container image. It's a good fit on a PC already running Docker apps or CasaOS.
  • Proxmox: run it in a small Debian LXC container with 512 MB to 1 GB of memory. I run AdGuard Home for DNS and ad blocking on my Proxmox cluster.
  • As part of a bigger home server: my old PC home server guide covers what else the same box can do.

Pi-hole vs AdGuard Home

The two are more alike than different:

FeaturePi-holeAdGuard Home
CostFree, open sourceFree, open source
BlockingBlocklists of domainsBlocklists of domains, plus some finer-grained filter rules
Encrypted DNSUsually added with a separate toolBuilt in, both upstream and for your devices
Per-device settingsYes, with groupsYes, including SafeSearch and parental filters
Community and guidesHugeLarge

If you're starting out, Pi-hole has more tutorials and forum answers. If you want encrypted DNS or parental controls without extra pieces, AdGuard Home is the simpler path. Both run fine on an old PC, and you point your router at either one the same way.

Pi-hole questions

Can I run Pi-hole without a Raspberry Pi?

Yes. Pi-hole runs on any 64-bit PC with Debian, Ubuntu, Fedora, or another supported Linux, and it only needs 512 MB of memory and a few GB of disk space. An old desktop, laptop, or mini PC works fine.

What are the Pi-hole system requirements?

Pi-hole's documentation lists 512 MB of RAM and at least 2 GB of free disk space (4 GB recommended), on a supported Linux like Debian, Ubuntu, Fedora, or Raspberry Pi OS. It also needs a fixed IP address, and a DHCP reservation on your router counts.

Does Pi-hole block YouTube ads?

Mostly no. YouTube serves its ads from the same servers as the videos, so blocking them by domain would block the videos too. Pi-hole is great for ads and trackers on websites, apps, and smart TVs.

What happens if the Pi-hole computer turns off?

Devices that use it for DNS can't look up websites, so the internet seems down. Run it on a PC that stays on, and if it goes down, switch your router's DNS back to the default until it's fixed.

Is AdGuard Home better than Pi-hole?

They do the same job. AdGuard Home has encrypted DNS and per-device filtering built in. Pi-hole has a very large community and more guides. Either one is a good choice on an old PC.

Keep reading