Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Docker setup for Raspberry Pi with Pi-hole, Unbound, Nginx, Cloudflare Tunnel, and Glances

Notifications You must be signed in to change notification settings

joao-reis/rpi-docker-stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raspberry Pi Docker Stack

Docker setup for Pi-hole + Unbound, Nginx, Cloudflare Tunnel, and Glances on Raspberry Pi.

Quick Start

git clone https://github.com/joao-reis/rpi-docker-stack.git
cd rpi-docker-stack

# Configure environment files
cp .env.example pihole/.env && cp .env.example cloudflared/.env
# Edit .env files with your values

# Create directories and start all services
mkdir -p pihole/data/etc-pihole pihole/data/etc-dnsmasq.d
docker compose up -d

Services

Service Port Description
Pi-hole 53, 80 Ad blocking DNS + DHCP
Unbound 5335 Recursive DNS (no 3rd party)
Nginx 8080 Static web server
Cloudflared - Tunnel to expose services
Glances 61208 System monitoring

Structure

rpi-docker-stack/
├── docker-compose.yml    # Unified (start all at once)
├── pihole/               # Pi-hole + Unbound
├── cloudflared/          # Cloudflare Tunnel
├── webserver/            # Nginx
└── glances/              # Monitoring

Configuration

Pi-hole (pihole/.env)

TZ=Europe/Lisbon
WEBPASSWORD=changeme
PIHOLE_DNS_=127.0.0.1#5335

Cloudflare Tunnel (cloudflared/.env)

TUNNEL_TOKEN=your_token_from_zero_trust_dashboard

Webserver

Just add files to webserver/www/

Commands

# Start/stop all
docker compose up -d
docker compose down

# Start/stop individual service
cd pihole && docker compose up -d
cd cloudflared && docker compose up -d

# Logs
docker logs -f pihole
docker logs -f cloudflared

# Pi-hole specific
docker exec pihole pihole -g              # Update blocklists
docker exec pihole pihole setpassword 'x' # Change password

Troubleshooting

# Test DNS
dig @127.0.0.1 -p 5335 google.com
docker exec pihole pihole status

# Check tunnel
docker logs cloudflared

License

MIT

About

Docker setup for Raspberry Pi with Pi-hole, Unbound, Nginx, Cloudflare Tunnel, and Glances

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages