{"id":21428969,"url":"https://github.com/notcoffee418/pihole-doh-docker","last_synced_at":"2025-08-08T21:08:40.861Z","repository":{"id":189481061,"uuid":"680735112","full_name":"NotCoffee418/pihole-doh-docker","owner":"NotCoffee418","description":"Setup for Pi-Hole with DoH using Docker for Linux.","archived":false,"fork":false,"pushed_at":"2023-08-20T10:38:14.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T08:16:17.525Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NotCoffee418.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-20T08:17:13.000Z","updated_at":"2023-08-20T10:38:49.000Z","dependencies_parsed_at":"2023-08-20T11:26:58.350Z","dependency_job_id":"8ccdaef1-c6a0-4274-b797-e170f33ffde0","html_url":"https://github.com/NotCoffee418/pihole-doh-docker","commit_stats":null,"previous_names":["notcoffee418/pihole-doh-docker"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotCoffee418%2Fpihole-doh-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotCoffee418%2Fpihole-doh-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotCoffee418%2Fpihole-doh-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotCoffee418%2Fpihole-doh-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotCoffee418","download_url":"https://codeload.github.com/NotCoffee418/pihole-doh-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243940062,"owners_count":20372044,"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":[],"created_at":"2024-11-22T22:15:24.001Z","updated_at":"2025-03-16T21:42:16.739Z","avatar_url":"https://github.com/NotCoffee418.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pihole-doh-docker\nSetup for Pi-Hole with upstream DNS-over-HTTPS using Docker for Linux.\n\nIt uses Traefik as a reverse proxy to access the Pi-Hole dashboard and to handle TLS.\nPi-Hole as the primary DNS server on port 53 for your network devices to connect to.\nCloudflared for upstream DNS over HTTPS.\n\nThis setup is intended for local network usage. You can run it in the cloud but without a DoH proxy for DNS you're still making unencrypted DNS requests to your server and you're better off with a plain Pi-Hole setup.\n\n\n## Prerequisites\n- Static Local IP Address (ideally both IPv4 and IPv6)\n- Domain name pointed to your server (this setup relies on it)\n  This is needed for TLS to work. Traefik also relies on this to access the Pi-Hole dashboard.\n- [Docker](https://docs.docker.com/engine/install/) installed\n\n## Setup\n1. `git clone https://github.com/NotCoffee418/pihole-doh-docker.git`\n2. `cd pihole-doh-docker`\n3. `cp .env.example .env`\n4. `nano .env` and set the variables for your setup.\n5. `sudo ./start.sh` to test config and run the containers\n6. `sudo ./set-password.sh` to set the password for the Pi-Hole dashboard\n7. Access pi-hole at the domain you configured in the .env file\n8. Set router's or computer's DNS to point to your Pi-Hole's IP address\n\n## Usage\n- `sudo ./start.sh` - Starts the containers\n- `sudo ./stop.sh` - Stops the containers\n\n## Troubleshooting\n### Port 53 is already claimed\nIf you have another DNS server running on port 53, you will need to stop it before running this setup.\n\nCheck which process, if any is claiming port 53. If it's empty, you're good to go.\n```bash\nsudo lsof -i :53\n```\n\n**systemd-resolved claimed**\nIf systemd-resolved is claiming port 53, you will need to disable it.\n\n```bash\nsudo nano /etc/systemd/resolved.conf\n```\n\nSet this line (uncomment if needed):\n\n```conf\nDNSStubListener=no\n```\n\n```bash\n# Restart systemd-resolved\nsudo systemctl restart systemd-resolved\n\n# Check if still claimed\nsudo lsof -i :53\n```\n\n### I can't access the Pi-Hole dashboard\nCheck if the containers are running:\n\n```bash\nsudo docker ps\n```\nThere should be 3 containers running:\n- pihole\n- cloudflared\n- traefik\n\nIf they are not running, run `sudo ./start.sh` to start them.\nYou may also need to double-check your .env file.\n\nIf you got your domain very recently, it may take a while for it to be accessible.\n\n### What's the password for the Pi-Hole dashboard?\nYou can set the password by running `sudo ./set-password.sh` and following the instructions.\nBy default, it's a randomly generated password.\n\n### I can't access the internet anymore!\nBecause you're using Pi-Hole as your DNS server, if it goes offline, so does any device that relies on it.\nIf you're having issues with Pi-Hole, you can temporarily disable it by changing your DNS server to something else.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotcoffee418%2Fpihole-doh-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotcoffee418%2Fpihole-doh-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotcoffee418%2Fpihole-doh-docker/lists"}