{"id":15148271,"url":"https://github.com/c00ldude1oo/npm2pihole","last_synced_at":"2025-08-02T04:39:58.060Z","repository":{"id":253012510,"uuid":"681069938","full_name":"c00ldude1oo/npm2pihole","owner":"c00ldude1oo","description":"A shell script to add domains from nginx proxy manager to pihole local dns records","archived":false,"fork":false,"pushed_at":"2025-01-29T06:32:09.000Z","size":79,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-30T22:42:22.194Z","etag":null,"topics":["bash-script","docker","docker-compose","nginx-proxy","nginx-proxy-manager","npm","npm2pihole","pihole"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/c00ldude1oo.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-08-21T07:41:15.000Z","updated_at":"2025-01-29T06:32:09.000Z","dependencies_parsed_at":"2024-08-14T00:29:25.452Z","dependency_job_id":"1878fbea-e0fa-4b86-a133-d21846fffc2d","html_url":"https://github.com/c00ldude1oo/npm2pihole","commit_stats":null,"previous_names":["c00ldude1oo/npm2pihole"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c00ldude1oo%2Fnpm2pihole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c00ldude1oo%2Fnpm2pihole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c00ldude1oo%2Fnpm2pihole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c00ldude1oo%2Fnpm2pihole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c00ldude1oo","download_url":"https://codeload.github.com/c00ldude1oo/npm2pihole/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237910078,"owners_count":19385829,"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":["bash-script","docker","docker-compose","nginx-proxy","nginx-proxy-manager","npm","npm2pihole","pihole"],"created_at":"2024-09-26T13:02:00.337Z","updated_at":"2025-02-09T05:31:33.651Z","avatar_url":"https://github.com/c00ldude1oo.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NPM2Pihole\n\nA bash script in a docker container that will check nginx proxy manager for configured domains and will add them to pihole's local DNS automatically\n\n## PREREQUISITES\n\nNginx Proxy Manager (NPM) *\\*NPM2Pihole must be on same host as NPM*\n\npihole *remote or local host is supported\n\n## INSTALL\n\n1 Setup docker-compose.yml\n\n```yaml\nservices:\n  npm2pihole:\n    image: ghcr.io/c00ldude1oo/npm2pihole:latest\n    env_file: config.env\n    restart: unless-stopped\n    volumes:\n        # Path to Nginx Proxy Mangers data/nginx/proxy_host folder.\n      - /path/to/npm/data/nginx/proxy_host/:/app/npm/:ro\n        # PiHole's /etc/pihole/custom.list file. comment if remote pihole\n#      - /path/to/piholes/data/custom.list:/app/custom.list\n        # SSH key(s) for sftp. comment if unused\n      - ./ssh/:/root/.ssh/\n\n```\n\n2 Setup configs `config.env`\n\nCheck below and set up the configs\n\n3 Start docker\n\n```sh\ndocker compose up\n```\n\nAfter first run you can quit and add the -d flag\n\n## CONFIGS\n\n### config.env\n\n`NPM_IP=192.168.0.0`\nThis is set to the IP of the nginx proxy manager\n\n`USE_SFTP=true/false`\nThis is to enable/disable use of SFTP to use a remote pihole\n\n`SFTP_IP=192.168.0.0`\nThis is set to the IP of the remote pihole\n\n### docker-compose.yml\n\nThe docker volumes need to be configured\n\n#### `/app/data:ro`\n\nThis needs to be set to the full path of NPMs proxy_hosts folder\nE.g. `path/to/npm/data/nignx/proxy_host:/app/data:ro`\n\n#### `/app/custom.list`\n\nThis needs to be set to the full path of pihole's custom DNS list file. *\\*only if pihole is on same host*\n\nE.g. `path/to/pihole/etc-pihole/custom.list:/app/custom.list`\n\n#### `/root/.ssh`\n\nIf you're not using a remote pihole this can be committed out\n\nE.g. `/home/docker_user/.ssh:/root/.ssh`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc00ldude1oo%2Fnpm2pihole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc00ldude1oo%2Fnpm2pihole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc00ldude1oo%2Fnpm2pihole/lists"}