{"id":21010601,"url":"https://github.com/geoffdutton/node-pi-hole-api","last_synced_at":"2026-04-18T10:03:18.045Z","repository":{"id":48889591,"uuid":"163531529","full_name":"geoffdutton/node-pi-hole-api","owner":"geoffdutton","description":null,"archived":false,"fork":false,"pushed_at":"2021-07-06T23:21:50.000Z","size":219,"stargazers_count":0,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-01-20T11:13:00.373Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geoffdutton.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}},"created_at":"2018-12-29T18:13:44.000Z","updated_at":"2019-04-24T02:59:52.000Z","dependencies_parsed_at":"2022-09-16T04:31:30.185Z","dependency_job_id":null,"html_url":"https://github.com/geoffdutton/node-pi-hole-api","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/geoffdutton%2Fnode-pi-hole-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoffdutton%2Fnode-pi-hole-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoffdutton%2Fnode-pi-hole-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoffdutton%2Fnode-pi-hole-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geoffdutton","download_url":"https://codeload.github.com/geoffdutton/node-pi-hole-api/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243437512,"owners_count":20290857,"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-19T09:21:38.176Z","updated_at":"2025-12-29T10:17:07.001Z","avatar_url":"https://github.com/geoffdutton.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-pi-hole-api\n[![Build Status](https://travis-ci.org/geoffdutton/node-pi-hole-api.svg?branch=develop)](https://travis-ci.org/geoffdutton/node-pi-hole-api)\n[![Coverage Status](https://coveralls.io/repos/github/geoffdutton/node-pi-hole-api/badge.svg?branch=develop)](https://coveralls.io/github/geoffdutton/node-pi-hole-api?branch=develop)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n[![Dependencies](https://david-dm.org/geoffdutton/node-pi-hole-api.svg)](https://david-dm.org/geoffdutton/node-pi-hole-api)\n\n[Pi-hole](https://github.com/pi-hole/pi-hole) An updated API server written with Node.JS\n\n## Install\n\n- Install Node 8+\n  - https://github.com/creationix/nvm\n\n- `curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash`\n- `nvm install 8`\n- `npm install --production`\n    - or use `yarn` becuase it is much faster\n- `npm start`\n- A local server will be started on port 3000\n  - `curl http://localhost:3000/admin/api.php?summary` to get summary\n\n## Integrate with existing pi-hole admin panel\n\nFollow [this guide](https://github.com/pi-hole/pi-hole/wiki/Nginx-configuration-instead-of-the-default-lighttpd-and-php-cgi-option) to setup nginx server\nand use this nginx config in order to proxy requests to `/admin/api.php` to our node server\n\n```\nserver {\n  listen 80 default_server;\n  listen [::]:80 default_server;\n  root /var/www/html;\n  index index.html index.htm index.php;\n  server_name _;\n  autoindex off;\n  location / {\n    expires max;\n    return 204 'pixel';\n  }\n  location /admin {\n    root   /var/www/html;\n    index index.php;\n    auth_basic \"Restricted\"; #For Basic Auth\n    auth_basic_user_file /etc/nginx/.htpasswd;  #For Basic Auth\n  }\n    location /api {\n    proxy_pass http://localhost:3000;\n  }\n\n  location = /admin/api.php {\n    proxy_pass http://localhost:3000;\n  }\n\n  location ~ \\.php$ {\n    include snippets/fastcgi-php.conf;\n    fastcgi_pass unix:/var/run/php5-fpm.sock;\n  }\n}\n```\n\n## Why\n\nI wanted to take a crack at porting the pi-hole PHP server side code to Node JS.\nMajor credit goes to: [xlc/pi-hole-api](https://github.com/xlc/pi-hole-api). This is an updated version of that.\n\n## Development Tips\n\nIf you have the `pihole-FTL` service running on your Raspberry-PI, you can forward that port via SSH:\n```bash\nssh -L 4711:localhost:4711 user@ssh-host\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoffdutton%2Fnode-pi-hole-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeoffdutton%2Fnode-pi-hole-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoffdutton%2Fnode-pi-hole-api/lists"}