{"id":15071010,"url":"https://github.com/mrrti/pi-hole_unbound_compose","last_synced_at":"2025-10-05T09:31:01.748Z","repository":{"id":153226781,"uuid":"628564010","full_name":"MrRTi/pi-hole_unbound_compose","owner":"MrRTi","description":"pi-hole with unbound and prometheus exporter in docker compose ","archived":true,"fork":false,"pushed_at":"2023-04-29T10:10:49.000Z","size":11,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-30T14:42:19.077Z","etag":null,"topics":["docker","docker-compose","pi-hole","pi-hole-unbound","pihole","prometheus-exporter","unbound"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrRTi.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-16T10:51:55.000Z","updated_at":"2024-01-12T21:25:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"7c778653-ea74-4ac6-84ca-16363e06a0dc","html_url":"https://github.com/MrRTi/pi-hole_unbound_compose","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrRTi%2Fpi-hole_unbound_compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrRTi%2Fpi-hole_unbound_compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrRTi%2Fpi-hole_unbound_compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrRTi%2Fpi-hole_unbound_compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrRTi","download_url":"https://codeload.github.com/MrRTi/pi-hole_unbound_compose/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235383700,"owners_count":18981198,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","pi-hole","pi-hole-unbound","pihole","prometheus-exporter","unbound"],"created_at":"2024-09-25T02:32:46.346Z","updated_at":"2025-10-05T09:31:01.420Z","avatar_url":"https://github.com/MrRTi.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pi-hole with Unbound in docker\n\n## Info\n\n### Pi-hole\n- https://docs.pi-hole.net\n- https://github.com/pi-hole/docker-pi-hole\n\n### Unbound\n- https://docs.pi-hole.net/guides/dns/unbound/\n\n### Prometheus exporter\n- https://github.com/eko/pihole-exporter/\n\nCompose file includes prometheus exporter for pihole metrics. It won't run by default `up` docker command\n\n### Block lists\n- https://firebog.net\n\n\n## Prerequirements\n\nYou need the following software to be installed on your system:\n\n- [Docker](https://docs.docker.com/get-docker/)\n- [Docker Compose](https://docs.docker.com/compose/)\n- [Git](https://gitlab.com/help/topics/git/index.md)\n\n## How to use\n\n### Prepare\n\nDownload this setup to your host. Change `~/pi-hole_unbound_compose` to the path you needed\n\n```\ngit clone https://github.com/MrRTi/pi-hole_unbound_compose.git ~/pi-hole_unbound_compose\n```\n\nGo into cloned folder\n\nCopy the `.env.template` into `.env` and set you variables in `.env` file\n\n```bash\ncp .env.template .env\n```\n\nYou will need to setup\n- `PIHOLE_DOMAIN_NAME` - donain name used in compose setup for pihole service \n- `PIHOLE_WEBPASSWORD` - password for pihole web interface\n- `REV_SERVER_DOMAIN` - If conditional forwarding is enabled, set the domain of the local network router\n- `PIHOLE_API_TOKEN` - Used by prometheus exporter, could be set up after pi-hole run \n\nYou could add additional variables supported by Pihole docker image. \nCheck https://github.com/pi-hole/docker-pi-hole for the list of available variables\n\nImage version are controlled by variables:\n- `PIHOLE_VERSION`\n- `PIHOLE_EXPORTER_VERSION`\n\n### Build image\n\n```bash\ndocker compose build\ndocker-compose build # for old docker compose versions\n```\n\n### Run Pi-hole\n\n```bash\ndocker compose up\ndocker-compose up # for old docker compose versions\n```\n\nUse `-d` flag to run detached\n\nYou could access pi-hole at `http://localhost:PIHOLE_WEBPORT/admin/login.php` or `http://localhost/admin/login.php` if you didn't change the variable\n\nPi-hole will run using unbound, no additional setup needed.\n\nContainer will start if your host reboots. You could change this setting in docker-compose file\n- https://docs.docker.com/compose/compose-file/compose-file-v3/#restart\n\nYou could change config files in config folder if you need.\n\nAt this point you could proceed with pihole setup at your network as described in pi-hole documentation\n\n### Run pihole with prometheus exporter\n\n```bash\ndocker compose --profile prometheus up\ndocker-compose --profile prometheus up # for old docker compose versions\n```\n\n### Stop pi-hole\n\n```bash\ndocker compose stop\ndocker-compose stop # for old docker compose versions\n```\n\n### Stop pi-hole with prometheus exporter \n\n```bash\ndocker compose --profile stop\ndocker-compose --profile stop # for old docker compose versions\n```\n\n## Fresh start\n\nPihole data stored in docker volume and will be consistent between runs\n\nIf you want to remove everything and setup from scrath, run\n\n```bash\ndocker compose --profile prometheus down --volumes\ndocker-compose --profile prometheus down --volumes # for old docker compose versions\n```\n\n## Logs\n\nLogs are mapped to your host machine and will be saved at logs folder\n- `./log/lighttpd`\n- `./log/pihole`\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrrti%2Fpi-hole_unbound_compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrrti%2Fpi-hole_unbound_compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrrti%2Fpi-hole_unbound_compose/lists"}