Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ syncthing/config/
portainer/data/
filebrowser/database/
filebrowser/config/
.env.dev
.dev/
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,17 @@ ssh john@<tailscale-ip>

See [docs/tailscale.md](docs/tailscale.md) for security recommendations and managing device access.

## Diagnosing issues

If something breaks after a deploy, collect logs from all running services:

```bash
./scripts/collect-logs.sh # all services
./scripts/collect-logs.sh jellyfin # one service
```

The script outputs container status, recent errors, and the last 75 lines per service — useful context for debugging or sharing with Claude.

## Updating

After pulling changes, run the update script to provision any new directories, pull fresh images, and restart only changed containers:
Expand Down Expand Up @@ -187,7 +198,8 @@ home-network/
├── scripts/
│ ├── setup.sh # initial setup
│ ├── update.sh # pull changes and redeploy
│ └── post-setup.sh # grab API keys after first run
│ ├── post-setup.sh # grab API keys after first run
│ └── collect-logs.sh # collect logs for debugging
├── pihole/
│ └── etc-dnsmasq.d/
│ └── 02-local-dns.conf # wildcard DNS for *.woggles.work
Expand Down
32 changes: 32 additions & 0 deletions scripts/collect-logs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
# collect-logs.sh — capture diagnostic info from the running stack
#
# Paste the output into Claude to diagnose deployment issues.
#
# Usage:
# ./scripts/collect-logs.sh # all services
# ./scripts/collect-logs.sh jellyfin # one service

set -uo pipefail

LINES=75
FILTER="${1:-}"

section() { printf "\n\n### %s\n\n" "$1"; }

section "Stack status"
docker compose ps

section "Recent errors (all services)"
docker compose logs --tail=300 --no-color 2>&1 \
| grep -iE '\b(err(or)?|warn(ing)?|fatal|panic|exception|failed)\b' \
| tail -60 \
|| echo "(none found)"

section "Service logs"
services=(traefik homepage jellyfin portainer filebrowser syncthing wallabag pihole)
for svc in "${services[@]}"; do
[[ -n "$FILTER" && "$FILTER" != "$svc" ]] && continue
printf "\n#### %s (last %d lines)\n\n" "$svc" "$LINES"
docker compose logs --tail="$LINES" --no-color "$svc" 2>&1 || true
done
Empty file.
Loading