{"id":22781504,"url":"https://github.com/inushin/dockerpiholewireguard","last_synced_at":"2025-04-15T16:22:24.370Z","repository":{"id":64851749,"uuid":"574614166","full_name":"Inushin/dockerPiholeWireguard","owner":"Inushin","description":"This is a complete stack for running PiHole for AdBlock and WireGuard as VPN, with Docker.","archived":false,"fork":false,"pushed_at":"2024-10-01T21:03:25.000Z","size":17,"stargazers_count":45,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T22:13:05.824Z","etag":null,"topics":["docker","docker-compose","pihole","wireguard"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Inushin.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}},"created_at":"2022-12-05T17:39:37.000Z","updated_at":"2025-03-23T09:08:40.000Z","dependencies_parsed_at":"2023-01-29T16:01:42.536Z","dependency_job_id":null,"html_url":"https://github.com/Inushin/dockerPiholeWireguard","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inushin%2FdockerPiholeWireguard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inushin%2FdockerPiholeWireguard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inushin%2FdockerPiholeWireguard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inushin%2FdockerPiholeWireguard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Inushin","download_url":"https://codeload.github.com/Inushin/dockerPiholeWireguard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249105596,"owners_count":21213573,"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","pihole","wireguard"],"created_at":"2024-12-11T21:07:37.529Z","updated_at":"2025-04-15T16:22:24.351Z","avatar_url":"https://github.com/Inushin.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🐳 Docker + PiHole + WireGuard 🐳\n\n![piholeWireguard](https://user-images.githubusercontent.com/57062736/205506991-0758a87f-c009-4dac-bc47-927ab710cc2a.png)\n\nIf you find this useful, remember about giving a start ⭐ to this repo or share it 🔁\n\n## Description 📋\n\n![docker_facebook_share](https://user-images.githubusercontent.com/57062736/139103227-36f3cb32-c3c1-4158-b99e-25a31e955f44.png)\n\nThis is a complete stack for running PiHole for AdBlock and WireGuard as VPN, with Docker.\n\nIt is composed by 2 containers:\n\n- `pihole`, blocking ads.\n- `wireguard`, personal and free VPN for our server.\n\n## Installation ⌨\n\n![Docker Installation Illustration](https://user-images.githubusercontent.com/57062736/139102730-d6f51d53-ffb3-44bb-be5e-2bdf48d91295.png)\n\n0. You need **Docker** and **Docker Compose** where you are going to launch this so, if you do not have it... click [HERE](https://github.com/Inushin/dockerPiholeWireguard#installing-docker-and-docker-compose-) or go to the end of this `.md` ^^\n\n1. Clone this rep.\n\n2. Edit `wireguard.env` and `pihole.env` with the information you want.\n\n3. Run `docker compose up` 😀.\n\n4. For having our PiHole database updated, run the script `updatePihole` with crontab (set the crontab with the root user). This script will remove and deploy again our PiHole container pulling a new and updated image.\n\n5. Check that the 2 containers are deployed:\n\n```yaml\npihole              \"/s6-init\"          pihole              running (healthy)   53/tcp, 53/udp, 67/tcp, 80/tcp, 443/tcp, 67/udp\nwireguard           \"/init\"             wireguard           running             0.0.0.0:51820-\u003e51820/udp, :::51820-\u003e51820/udp\n```\n\n## Docker's useful commands 📑\n![Docker Commands Illustration](https://user-images.githubusercontent.com/57062736/139102966-25f28be1-f768-49bd-a8a1-915a8465de9e.png)\n\n- Run Docker Compose: `docker compose up -d` / `docker compose up`\n\n- Check Docker Compose's volumens status: `docker compose ps -a` / `docker compose ps`\n\n- Check Docker's images: `docker images -a`\n\n- Remove Docker's images: `docker rmi -f imageID1 imageID2 ...` (-f = force)\n\n- Enter to a Docker's volumen: `docker compose exec VolumenID sh` / `docker compose exec VolumenID bash`\n\n- Copy a file to the docker we want to: `docker cp file docker_id:/dir`\n\n- Remove all dangling (not tagged or associated with a container) containers, volumes, networks and images: `docker system prune`\n\n- Remove all unused containers and images with at least one container associated to them: `docker system prune -a`\n\n- Shows all unused local images: `docker images ls -f dangling=true`\n\n- Shows all unused local volumes: `docker volume ls -f dangling=true`\n\n- Remove all local volumes not used by at least one container: `docker volume prune`\n\n## Installing Docker and Docker Compose 🛠\n![Docker Composer](https://user-images.githubusercontent.com/57062736/141182130-b8ed2d7a-9a68-4387-b838-ba0d44bb4e0e.png)\n\n**Adjust the installation to your OS. Here you have the one for a VPS with Debian 11**\n\n- Docker and Docker Compose installation\n\n1. Update the `apt` package index and install packages to allow `apt` to use a repository over HTTPS:\n\n```yaml\nsudo apt-get update\nsudo apt-get install \\\n    ca-certificates \\\n    curl \\\n    gnupg \\\n    lsb-release\n```\n\n2. Add Docker’s official GPG key:\n\n```yaml\nsudo mkdir -p /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\n```\n\n3. Use the following command to set up the repository:\n\n```yaml\nsudo mkdir -p /etc/apt/keyrings\ncurl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg\n```\n\n\n4. Starts Docker's service each time you run the SO: `chkconfig docker on`\n\n```yaml\nsudo apt-get update\n```\n\n5. Install Docker Engine, containerd, and Docker Compose. This will install the latest version:\n\n```yaml\nsudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin\n```\n\n6. Give permissions to the desired user by adding it the  `docker` group:\n\n```yaml\nusermod -aG docker $USER\n```\n\n7. Check the version and the installation: `docker compose version` `docker --version`\n\n## ⭐ Feedback and bugs 🐞\n\nIf you find any bug or just want to give your feedback (remember the ⭐ ^^), **Feel free to do it**. I am, like you, constantly learning and things change so quickly that... no one knows ^^\n\n## Version control 📝\n\n- [v1.0 - Current](https://github.com/Inushin/dockerPiholeWireguard/tree/v1.0) - Creation of the rep with the config finished - 05/12/2022\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finushin%2Fdockerpiholewireguard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finushin%2Fdockerpiholewireguard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finushin%2Fdockerpiholewireguard/lists"}