Skip to content

Instantly share code, notes, and snippets.

@kevin-smets
Last active March 22, 2023 07:39
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • 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