Skip to content

Instantly share code, notes, and snippets.

@kevin-smets
Last active July 9, 2024 19:49
Show Gist options
  • Save kevin-smets/4f5eb71382340e0f27bbf389394973cd to your computer and use it in GitHub Desktop.
Save kevin-smets/4f5eb71382340e0f27bbf389394973cd to your computer and use it in GitHub Desktop.
Local Pi-hole in Docker [MacOS]

Prerequisites

  • Docker
  • Docker Compose

If you don't have these, run

brew install docker docker-compose

Copy the docker compose example code from here: https://github.com/pi-hole/docker-pi-hole

In the folder where you stored the docker-compose.yml, run the following:

docker-compose up -d
networksetup -setdnsservers Wi-Fi 127.0.0.1

Check your dashboard @ 127.0.0.1/admin

You'll find the password to login in the console logging of your container. If you want / need to change it, simply run:

docker exec -it <pihole_container_name> pihole -a -p <new password>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment