my-homelab-configs/infra/rpi-services/README.md

42 lines
1.4 KiB
Markdown

# RPi Services
This stack runs lightweight always-on services on the Raspberry Pi outside the
Kubernetes cluster:
- Pi-hole on DNS port `53` and web port `8081`
- Unbound as Pi-hole's first upstream resolver
- Uptime Kuma on port `3001`
Pi-hole also keeps public fallback upstreams in its config, so DNS can continue
to resolve through `1.1.1.1` and `9.9.9.9` if the Unbound container stops.
The bootstrap script prefers Docker data under `/nvme-storage/docker` only when
that path is an active mount point and writable. If the NVMe is missing or
reset, it rewrites Docker's `data-root` to `/var/lib/docker` and restarts
Docker, allowing the services to come up from the SD/root filesystem instead.
Service config lives under `/opt/homelab-rpi-services/data` by default. Backup
storage is intentionally not placed on the NVMe until the disk has proven
stable.
Deploy from the Debian homelab server:
```bash
./jeannie rpi-services
```
Useful overrides:
```bash
LAB_RPI_HOST=192.168.100.89 ./jeannie rpi-services
PIHOLE_WEBPASSWORD='<password>' ./jeannie rpi-services
PIHOLE_WEB_PORT=8081 UPTIME_KUMA_PORT=3001 ./jeannie rpi-services
LAB_RPI_STOP_LEGACY_PIHOLE=false ./jeannie rpi-services
```
If `PIHOLE_WEBPASSWORD` is not provided, the bootstrap generates one and keeps
it in `/opt/homelab-rpi-services/.env` for future runs.
Managed Pi-hole adlists are stored in `adlists.txt`. The bootstrap inserts them
without deleting existing manual Pi-hole lists.