• Stars
    star
    299
  • Rank 139,269 (Top 3 %)
  • Language
    Shell
  • License
    MIT License
  • Created almost 7 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Pi-hole is a Linux network-level advertisement and Internet tracker blocking application.

balena-pihole

If you're looking for a way to quickly and easily get up and running with a Pi-hole device for your home network, this is the project for you.

This project is a balenaCloud stack with the following services:

balenaCloud is a free service to remotely manage and update your Raspberry Pi through an online dashboard interface, as well as providing remote access to the Pi-hole web interface without any additional configuration.

Hardware required

  • Raspberry Pi 2/3/4 (Note: this project will not work with the Pi Zero), balenaFin, or NanoPi Neo Air
  • 16GB Micro-SD Card (we recommend Sandisk Extreme Pro SD cards)
  • Display (any Raspberry Pi display will work for this project)
  • Micro-USB cable
  • Power supply
  • Case (optional)

Getting Started

You can one-click-deploy this project to balena using the button below:

deploy button

Manual Deployment

Alternatively, deployment can be carried out by manually creating a balenaCloud account and application, flashing a device, downloading the project and pushing it via the balena CLI.

Device Variables

Device Variables apply to all services within the application, and can be applied fleet-wide to apply to multiple devices. If you used the one-click-deploy method, the default environment variables will already be added for you to customize as needed.

Name Default Purpose
TZ UTC The timezone in your location. Find a list of all timezone values here.
WEBPASSWORD balena Password for accessing the web-based interface of Pi-hole - you won’t be able to access the admin panel without defining a password here.
PIHOLE_DNS_ 1.1.1.1;1.0.0.1 Tell Pi-hole where to forward DNS requests that aren’t blocked. We’re using Cloudflare by default but you can specify your own using IPs delimited by semi-colons.
SET_HOSTNAME pihole Set a custom device hostname on application start.

Additional supported environment variables can be found here.

Usage

Pi-hole

Check out our blog post on how to deploy network-wide ad-blocking with Pi-hole:

https://www.balena.io/blog/deploy-network-wide-ad-blocking-with-pi-hole-and-a-raspberry-pi/

Once your device joins the fleet you'll need to allow some time for it to download the application and download blocklists.

When it's done you should be able to access the access the app at http://pihole.local with a default password of balena.

On your router or DHCP server assign a static IP reservation (if possible) to your Pi-hole device, and set your clients DNS to the same IP address.

Documentation for Pi-hole can be found at https://docs.pi-hole.net/

PADD

Note that this project uses the fbcp block.

The PiTFT LCD screens from Adafruit (and others) are supported.

In order to use these displays you're required to add additional configuration by setting the FBCP_DISPLAY variable within the dashboard. This variable should be set to one of the values below:

  • adafruit-hx8357d-pitft
  • adafruit-ili9341-pitft
  • freeplaytech-waveshare32b
  • waveshare35b-ili9486
  • tontec-mz61581
  • waveshare-st7789vw-hat
  • waveshare-st7735s-hat
  • kedei-v63-mpi3501
  • dtoverlay (requires BALENA_HOST_CONFIG_dtoverlay to be set)

Configuring HDMI and TFT display sizes

The following Device Configuration variables might be required for proper scaling and resolutions:

Name Value
BALENA_HOST_CONFIG_hdmi_cvt 480 320 60 1 0 0 0
BALENA_HOST_CONFIG_hdmi_force_hotplug 1
BALENA_HOST_CONFIG_hdmi_group 2
BALENA_HOST_CONFIG_hdmi_mode 87
BALENA_HOST_CONFIG_rotate_screen 1

FONTFACE and FONTSIZE

Use the environment variables FONTFACE and FONTSIZE to control the PADD text size on your display.

Valid font faces are:

  • VGA (sizes 8x8, 8x14, 8x16, 16x28 and 16x32)
  • Terminus (sizes 6x12, 8x14, 8x16, 10x20, 12x24, 14x28 and 16x32)
  • TerminusBold (sizes 8x14, 8x16, 10x20, 12x24, 14x28 and 16x32)
  • TerminusBoldVGA (sizes 8x14 and 8x16)
  • Fixed (sizes 8x13, 8x14, 8x15, 8x16 and 8x18)

From: https://manpages.debian.org/bullseye/console-setup/console-setup.5.en.html

Unbound

This project includes an Unbound service providing recursive DNS, but it is not used by default.

Read more about the reasons for using a recursive DNS with Pi-hole here:

https://docs.pi-hole.net/guides/unbound/

Set the following environment variable in your balenaCloud Dashboard to tell Pi-hole to forward DNS requests that aren’t blocked to the local Unbound DNS resolver service.

  • PIHOLE_DNS_: 127.0.0.1#5053;127.0.0.1#5053

Note: For security and footprint reasons, the Unbound container does not allow shell or terminal access via SSH or the balenaCloud console.

Advanced users can change the Unbound configuration by editing unbound.conf or a-records.conf before pushing the app to balenaCloud.

Tailscale

Included is a Tailscale service in order to access your Pi-hole from anywhere.

https://github.com/klutchell/balena-tailscale

Help

If you're having trouble getting the project running, submit an issue or post on the forums at https://forums.balena.io.

Contributing

Please open an issue or submit a pull request with any features, fixes, or changes.

More Repositories

1

mediaserver

docker-based plex & usenet media server using custom subdomains with tls
Makefile
122
star
2

unbound-docker

unofficial unbound multiarch docker image
Dockerfile
106
star
3

dnscrypt-proxy-docker

dnscrypt-proxy multiarch docker image
Dockerfile
91
star
4

balena-nextcloud

Nextcloud is a safe home for all your data
Shell
48
star
5

balena-adguard

AdGuard Home is a network-wide software for blocking ads & tracking
Shell
43
star
6

unbound

this repo has moved
Dockerfile
38
star
7

balena-wireguard

wireguard stack for balenacloud
Shell
22
star
8

balena-bookstack

bookstack stack for balenaCloud
Dockerfile
19
star
9

balena-homeassistant

homeassistant stack for balenaCloud
Dockerfile
17
star
10

balena-frigate

A complete and local NVR designed for Home Assistant with AI object detection
Dockerfile
12
star
11

hue-bridge-backup

Backup and restore Philips Hue bridge configuration in raw JSON
JavaScript
11
star
12

balena-traefik

traefik stack for balenaCloud to proxy https domains to internal services
Shell
11
star
13

balena-mediaserver

mediaserver stack for balenaCloud
Dockerfile
8
star
14

balena-backup

non-interactive backup utility for balenaCloud managed devices
Shell
8
star
15

balena-zoneminder

ZoneMinder is a full-featured, open source, state-of-the-art video surveillance software system.
Python
7
star
16

balena-pihole-unbound

raspberrypi3 balenaCloud stack with Pi-hole, PADD, & unbound
Shell
6
star
17

nextcloud

docker-compose nextcloud stack with mariadb and traefik
Shell
6
star
18

balenablocks-duplicati

balenablocks/duplicati
6
star
19

balena-tailscale

Run a Tailscale subnet router on balena!
Shell
5
star
20

balena-nginx-proxy-manager

Nginx Proxy Manager stack for balenaCloud
Dockerfile
4
star
21

balena-pihole-aarch64

aarch64 balenaCloud stack for Pi-hole® https://pi-hole.net/
Dockerfile
4
star
22

balena-serge

Run an LLM on your edge device with balena.io
3
star
23

balena-timemachine

Run a Samba server compatible with MacOS Time Machine
3
star
24

balena-homelab

3
star
25

cloudflared

unofficial cloudflared multiarch docker image
Dockerfile
3
star
26

docker-ethminer-cpp

added miner support to ethereum/client-cpp docker image
Shell
2
star
27

docker-caddy

caddy docker images
Makefile
1
star
28

docker-megatools

ubuntu base image with megatools installed from package repository
1
star
29

ssh-docker

docker images with ssh daemon
Makefile
1
star
30

balena-gitea

A painless self-hosted Git service
1
star
31

balena-restic

Rest easy knowing that your application data volumes are automatically and securely backed up to local or cloud storage!
TypeScript
1
star
32

docker-rar

small container to run rar compression utility on files in current working directory
1
star
33

megasnapshot

Utilities to run rsnapshot and megatools docker images to create and upload backups to a mega.nz cloud drive
Shell
1
star
34

balena-syncthing

Shell
1
star
35

compose-motionserver

docker-based motioneye server for rasbian
Nginx
1
star
36

balena-cli-docker

Unofficial Docker images with the balena CLI and Docker-in-Docker
Dockerfile
1
star
37

renovate-config

Shared renovate configuration and GitHub Action
1
star
38

balena-shinobi

shinobi stack for balenaCloud
Dockerfile
1
star