Giter Club home page Giter Club logo

pihole-manager's Introduction

pihole-manager

Simple web interface for managing two Pi-hole instances

piholemanager

Contents

pihole grabber

The pihole grabber is a program to fetch data from the two Pi-hole instances and save it to json files. A systemctl service file is included too.

web interface

The web interface needs putting behind a web server of some kind. An nginx docker container is probably the most convenient.

Instructions

git clone https://github.com/tjeffree/pihole-manager.git
cd pihole-manager

Set up .env

Copy the example.env to .env and update it with your two Pi-hole details.

cp example.env .env

nano .env

There is no attention to security here, it's assumed your Pi-holes are on your internal network and not exposed to the world.

Full docker

Install docker and docker compose

Hit up docker.io

Run

docker-compose up -d

That's it, you're done. The dashboard will be available at http://[address-of-server]:8080


Python daemon setup

Install dependancies

pip3 install --no-cache-dir -r requirements.txt

Test it

python3 ./piholegrabber.py

Should see a bit of output showing the Pis that are being monitored. It'll wait for you to ctrl+c to quit.

Set up service

Modify piholemanage.service with the location of piholegrabber.py then:

sudo cp piholemanage.service /etc/systemd/system/
sudo chown root:root /etc/systemd/system/piholemanage.service
sudo chmod 644 /etc/systemd/system/piholemanage.service

sudo systemctl enable piholemanage
sudo systemctl start piholemanage

Check it's running with:

sudo systemctl status piholemanage

You should also find a new data directory in the pihole-manager directory.

Web interface setup

Install docker

Hit up docker.io

Start container

docker run --name pihole-manage -v `pwd`:/usr/share/nginx/html -p 8080:80 -d nginx

Now you should be able to hit http://[address-of-server]:8080

I used 8080 in case you are running this on the same server as Pi-hole which already uses port 80 but change as you like

pihole-manager's People

Contributors

mwoolweaver avatar tjeffree avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.