{"id":15148385,"url":"https://github.com/valendrew/pihole-wireguard-gen","last_synced_at":"2026-01-20T11:02:49.047Z","repository":{"id":214765110,"uuid":"737297191","full_name":"Valendrew/pihole-wireguard-gen","owner":"Valendrew","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-07T13:28:57.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T02:47:25.386Z","etag":null,"topics":["docker","pi-gen","pi-hole","raspberry-pi","raspberry-pi-os","wg-easy","wireguard"],"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/Valendrew.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-30T14:21:14.000Z","updated_at":"2023-12-30T15:27:48.000Z","dependencies_parsed_at":"2023-12-30T16:22:32.697Z","dependency_job_id":"a11f8951-fb29-43a6-a8b7-748eca8e755a","html_url":"https://github.com/Valendrew/pihole-wireguard-gen","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":"0.16666666666666663","last_synced_commit":"bf26aa4d05de950fe0d8c26cdf148b77637d11f6"},"previous_names":["valendrew/pihole-wireguard-gen"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valendrew%2Fpihole-wireguard-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valendrew%2Fpihole-wireguard-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valendrew%2Fpihole-wireguard-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valendrew%2Fpihole-wireguard-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Valendrew","download_url":"https://codeload.github.com/Valendrew/pihole-wireguard-gen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247584061,"owners_count":20962071,"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","pi-gen","pi-hole","raspberry-pi","raspberry-pi-os","wg-easy","wireguard"],"created_at":"2024-09-26T13:03:27.339Z","updated_at":"2026-01-20T11:02:49.014Z","avatar_url":"https://github.com/Valendrew.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Improved compatibility of back to top link: See: https://github.com/othneildrew/Best-README-Template/pull/73 --\u003e\n\u003ca name=\"readme-top\"\u003e\u003c/a\u003e\n\u003c!--\n*** Thanks for checking out the Best-README-Template. If you have a suggestion\n*** that would make this better, please fork the repo and create a pull request\n*** or simply open an issue with the tag \"enhancement\".\n*** Don't forget to give the project a star!\n*** Thanks again! Now go create something AMAZING! :D\n--\u003e\n\n\n\n\u003c!-- PROJECT SHIELDS --\u003e\n\u003c!--\n*** I'm using markdown \"reference style\" links for readability.\n*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).\n*** See the bottom of this document for the declaration of the reference variables\n*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.\n*** https://www.markdownguide.org/basic-syntax/#reference-style-links\n--\u003e\n\u003cdiv align=\"center\"\u003e\n\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n\n\u003c/div\u003e\n\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Valendrew/pihole-wireguard-gen\"\u003e\n    \u003cimg src=\"images/logo.png\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e\n\n\u003ch3 align=\"center\"\u003ePi-hole + Wireguard \u003c/h3\u003e\n\n\u003c/div\u003e\n\n\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n    \u003csummary\u003eTable of Contents\u003c/summary\u003e\n    \u003col\u003e\n        \u003cli\u003e\n        \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n        \u003cul\u003e\n            \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n        \u003c/li\u003e\n        \u003cli\u003e\n        \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n        \u003cul\u003e\n            \u003cli\u003e\u003ca href=\"#containers-configuration\"\u003eContainers configuration\u003c/a\u003e\u003c/li\u003e\n            \u003cli\u003e\u003ca href=\"#pi-gen-configuration\"\u003epi-gen configuration\u003c/a\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n        \u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#post-setup\"\u003ePost setup\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#todo\"\u003eTODO\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#acknowledgments\"\u003eAcknowledgments\u003c/a\u003e\u003c/li\u003e\n    \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\n\nTODO\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n### Built With\n\n* [![Pihole][Pihole]][Pihole-url]\n* [![Wireguard][Wireguard]][Wireguard-url]\n* [![Pigen][Pigen]][Pigen-url]\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\nTo get a local copy up and running follow these example steps.\n\n* Clone\n  ```sh\n  git clone --recurse-submodules URL\n  ```\n\n### Containers configuration\n\nCreate a `.env` file at `stage2-custom/00-docker/files`, with a structure as follows:\n\n| Variable           | Description                                     |\n| ------------------ | ----------------------------------------------- |\n| DEVICE_IP          | IP address of the device                        |\n| WIREGUARD_HOST     | The public hostname of the VPN server[[1]](#1)  |\n| WIREGUARD_PASSWORD | Password for the WireGuard Web UI[[1]](#1)      |\n| WIREGUARD_PORT     | The host public UDP port for WireGuard[[1]](#1) |\n| PIHOLE_PASSWORD    | Password for Pi-hole Web UI[[2]](#2)            |\n| PIHOLE_PORT        | Port for Pi-hole Web UI[[2]](#2)                |\n| PIHOLE_API_KEY     | API key for Pi-hole[[2]](#2)                    |\n| HOMEPAGE_PORT      | Port for the homepage WEB UI[[3]](#3)           |\n\n\u003ca id=\"1\"\u003e[1]\u003c/a\u003e: [Wireguard options](https://github.com/wg-easy/wg-easy?tab=readme-ov-file#options).\n\n\u003ca id=\"2\"\u003e[2]\u003c/a\u003e : [Pi-hole options](https://github.com/pi-hole/docker-pi-hole?tab=readme-ov-file#environment-variables).\n\n\u003ca id=\"3\"\u003e[3]\u003c/a\u003e : [Homepage options](https://gethomepage.dev/latest/installation/docker/).\n\nNote: The variable `PIHOLE_API_KEY` is set only after containers have been created, by generating the key at `Pi-hole WEB UI -\u003e Settings -\u003e API -\u003e Show API token`.\n\n### pi-gen configuration\n\nCreate a `.config` file in the root directory, with a structure as explained in the [Pi-gen documentation](https://github.com/RPi-Distro/pi-gen)\n\nNote: A configuration file example is provided in the root directory as `.config.example`, which can be renamed to `.config`, and used as is after editing the empty variables.\n\n| Variable              | Description                 |\n| --------------------- | --------------------------- |\n| PUBKEY_SSH_FIRST_USER | SSH public key for the user |\n| SSH_PORT              | SSH port                    |\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n\nCreate the image\n```sh\n   ./build-image.sh\n```\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\nFlash the image to an SD card using a tool such as [Raspberry Pi Imager](https://www.raspberrypi.org/software/) or [balenaEtcher](https://www.balena.io/etcher/) and insert it into the Raspberry Pi.\n\n## Post setup\n\n- Router configuration\n  - Set device IP to `DEVICE_IP` as static\n  - Port forward the `DEVICE_IP` in your router to access Wireguard for an external network.\n- RaspberryPi configuration\n  - You will be prompted to configure the keyboard layout, user and password on first boot.\n  - ~~Edit the SSH port by running `sudo nano /etc/ssh/sshd_config` and changing the line `#Port 22` to `Port SSH_PORT`.~~\n- Create the containers\n  - Run `docker compose up -d` in `~/project/docker` to create the containers.\n  - Generate the API key for Pi-hole at `Pi-hole WEB UI -\u003e Settings -\u003e API -\u003e Show API token` and set it in the `.env` file.\n  - Restart the containers by running `docker compose restart` in `~/project/docker` to apply the changes.\n\nAccess at the homepage at `http://DEVICE_IP:HOMEPAGE_PORT`, from where you can access the Pi-hole and Wireguard WEB UIs.\n\n\u003c!-- ROADMAP --\u003e\n## TODO\n\n- [x] Edit SSH port directly in `stage2-custom` instead of post setup\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the MIT License. See `LICENSE.txt` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nContact me for any questions or suggestions at [LinkedIn](www.linkedin.com/in/andrea-valente-9b07b4139)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- ACKNOWLEDGMENTS --\u003e\n## Acknowledgments\n\n* []() Logo designed by Hopstarter from Flaticon\n* []() Pi-hole, Wireguard and pi-gen\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#readme-top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[stars-shield]: https://img.shields.io/github/stars/Valendrew/pihole-wireguard-gen.svg?style=for-the-badge\n[stars-url]: https://github.com/Valendrew/pihole-wireguard-gen/stargazers\n[issues-shield]: https://img.shields.io/github/issues/Valendrew/pihole-wireguard-gen.svg?style=for-the-badge\n[issues-url]: https://github.com/Valendrew/pihole-wireguard-gen/issues\n[license-shield]: https://img.shields.io/github/license/Valendrew/pihole-wireguard-gen.svg?style=for-the-badge\n[license-url]: https://github.com/Valendrew/pihole-wireguard-gen/blob/master/LICENSE.txt\n\n[Pihole]: https://img.shields.io/badge/Pi%E2%80%93Hole-5c5c5c?style=for-the-badge\u0026logo=pihole\u0026logoColor=white\n[Pihole-url]: https://pi-hole.net/\n[Wireguard]: https://img.shields.io/badge/wg%E2%80%93easy-88171a?style=for-the-badge\u0026logo=pihole\u0026logoColor=white\n[Wireguard-url]: https://github.com/wg-easy/wg-easy\n[Pigen]: https://img.shields.io/badge/pi%E2%80%93gen-8cc04b?style=for-the-badge\u0026logo=raspberrypi\u0026logoColor=white\n[Pigen-url]: https://github.com/RPi-Distro/pi-gen","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalendrew%2Fpihole-wireguard-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalendrew%2Fpihole-wireguard-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalendrew%2Fpihole-wireguard-gen/lists"}