{"id":26579622,"url":"https://github.com/adrianocng/pihole-telegram-bot","last_synced_at":"2026-04-16T06:05:11.157Z","repository":{"id":283830417,"uuid":"953010054","full_name":"AdrianoCng/pihole-telegram-bot","owner":"AdrianoCng","description":"Control your pihole with this telegram bot","archived":false,"fork":false,"pushed_at":"2025-03-22T14:31:03.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T15:28:26.275Z","etag":null,"topics":["pihole","pihole-admin-bot","pihole-bot","pihole-control","pihole-management","pihole-monitoring","pihole-remote","pihole-statistics-bot","pihole-telegram-bot","pihole-telegram-control","pihole-telegram-interface","remote-pihole","telegraf","telegram","telegram-bot","telegram-pihole"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AdrianoCng.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-22T11:09:16.000Z","updated_at":"2025-03-22T14:31:06.000Z","dependencies_parsed_at":"2025-03-22T15:29:01.561Z","dependency_job_id":null,"html_url":"https://github.com/AdrianoCng/pihole-telegram-bot","commit_stats":null,"previous_names":["adrianocng/pi-hole-telegram-bot","adrianocng/pihole-telegram-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdrianoCng%2Fpihole-telegram-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdrianoCng%2Fpihole-telegram-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdrianoCng%2Fpihole-telegram-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdrianoCng%2Fpihole-telegram-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdrianoCng","download_url":"https://codeload.github.com/AdrianoCng/pihole-telegram-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245061635,"owners_count":20554613,"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":["pihole","pihole-admin-bot","pihole-bot","pihole-control","pihole-management","pihole-monitoring","pihole-remote","pihole-statistics-bot","pihole-telegram-bot","pihole-telegram-control","pihole-telegram-interface","remote-pihole","telegraf","telegram","telegram-bot","telegram-pihole"],"created_at":"2025-03-23T06:18:14.216Z","updated_at":"2025-12-31T01:06:47.024Z","avatar_url":"https://github.com/AdrianoCng.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pihole Telegram Bot\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Telegram Bot](https://img.shields.io/badge/Telegram-Bot-blue)](https://core.telegram.org/bots)\n[![Pi-hole](https://img.shields.io/badge/Pi--hole-Integration-red)](https://pi-hole.net/)\n\nA Telegram bot to remotely control and monitor your Pi-hole setup from anywhere.\n\n## 📑 Table of Contents\n\n- [✨ Features](#-features)\n- [📋 Prerequisites](#-prerequisites)\n- [🛠️ Installation](#️-installation)\n- [🚀 Running the Bot](#-running-the-bot)\n- [📱 Usage](#-usage)\n- [🔐 Security](#-security)\n- [📄 License](#-license)\n- [🙏 Acknowledgements](#-acknowledgements)\n\n## ✨ Features\n\n- 🔐 User authentication\n- 🚫 Enable/disable Pi-hole blocking\n- 📊 Monitor Pi-hole status and view system messages\n- 🔍 Check Pi-hole version information\n- 🔄 Update Pi-hole subsystems and blocklists\n- 🔒 Secure access limited to authorized users\n- 🔌 Reboot Raspberry Pi remotely\n\n## 📋 Prerequisites\n\n- Raspberry Pi with Pi-hole installed\n- Telegram account\n- Node.js and npm installed on your Raspberry Pi - Installation instructions [here](https://nodesource.com/products/distributions)\n\n## 🛠️ Installation\n\n1. Clone this repository to your Raspberry Pi:\n\n   ```bash\n   git clone https://github.com/AdrianoCng/pihole-telegram-bot.git\n   cd pihole-telegram-bot\n   ```\n\n2. Install dependencies on your Raspberry Pi:\n\n   ```bash\n   npm install\n   ```\n\n3. Create a Telegram bot:\n\n   - Open Telegram and search for [@BotFather](https://t.me/botfather)\n   - Send `/newbot` and follow the instructions\n   - Copy the bot token provided by BotFather\n\n4. Get your Telegram user ID:\n\n   - Search for [@userinfobot](https://t.me/userinfobot) on Telegram\n   - Start a conversation and it will display your ID\n\n5. Create a `.env` file in the project directory on your Raspberry Pi with the following variables:\n\n   ```\n   BOT_TOKEN=your_telegram_bot_token_here\n   PIHOLE_PASSWORD=your_pihole_admin_password_here\n   PIHOLE_IP=your_pihole_ip_address_here\n   ALLOWED_USER=your_telegram_user_id_here\n   ```\n\n   Example:\n\n   ```\n   BOT_TOKEN=\"1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789\"\n   PIHOLE_PASSWORD=\"YourPiholePasswordHere\"\n   PIHOLE_IP=\"http://192.168.1.100\"\n   ALLOWED_USER=\"123456789\"\n   ```\n\n## 🚀 Running the Bot\n\n\u003e **NOTE:** These commands must be run on your Raspberry Pi.\n\n### Manual Start\n\n```bash\nnode index.js\n```\n\nOr using npm:\n\n```bash\nnpm start\n```\n\n### Using PM2 (Recommended)\n\n1. Install PM2 globally on your Raspberry Pi:\n\n   ```bash\n   npm install -g pm2\n   ```\n\n2. Start the bot with PM2 on your Raspberry Pi:\n\n   ```bash\n   pm2 start index.js --name pi-hole-telegram-bot\n   ```\n\n   Or using npm:\n\n   ```bash\n   npm run start:prod\n   ```\n\n3. Configure PM2 to start on boot (on your Raspberry Pi):\n   ```bash\n   pm2 startup\n   pm2 save\n   ```\n\n## 📱 Usage\n\n1. Start a conversation with your bot on Telegram (from any device)\n2. Use the available commands to control your Pi-hole:\n   - `/authorize` or `/a` - Authorize the bot\n   - `/logout` or `/logoff` - Logout the bot\n   - `/messages` or `/m` - Show messages from Pi-hole\n   - `/status` or `/s` - Display the running status of Pi-hole subsystems\n   - `/enable` or `/e` - Enable Pi-hole subsystems\n   - `/disable` or `/d` - Disable Pi-hole subsystems\n   - `/version` or `/v` - Show installed version of Pi-hole, Web Interface \u0026 FTL\n   - `/update` or `/up` - Update Pi-hole subsystems\n   - `/upgravity` or `/g` - Update the list of ad-serving domains\n   - `/upgrade` or `/upg` - Upgrade host system\n   - `/reboot` or `/r` - Reboot the Raspberry Pi\n   - `/bot` or `/bv` - Show the version of the bot\n   - `/help` - Show available commands and descriptions\n\n## 🔐 Security\n\nThis bot restricts access to the authorized Telegram user ID specified in the `.env` file.\nOnly user with ID listed in `ALLOWED_USER` can interact with the bot.\n\n## 📄 License\n\nMIT\n\n## 🙏 Acknowledgements\n\n- [Pi-hole](https://pi-hole.net/) - Network-wide ad blocking\n- [Telegraf](https://telegraf.js.org/) - Telegram Bot Framework for Node.js\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianocng%2Fpihole-telegram-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrianocng%2Fpihole-telegram-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianocng%2Fpihole-telegram-bot/lists"}