No description
Find a file
2026-11-01 01:11:16 +01:00
.gitattributes Force LF for shell scripts 2026-10-31 22:23:39 +01:00
healthcheck.sh healthcheck: warn when not root, show docker disk use on omv 2026-10-31 23:41:31 +01:00
README.md Merge pull request 'Add read-only security audit script' (#2) from security-audit into main 2026-11-01 01:11:16 +01:00
security-audit.sh Add read-only security audit script 2026-11-01 01:08:14 +01:00

ops

Operational scripts for the homelab. Everything here is read-only unless stated otherwise.

Weekly health check

Run Sunday after the 01:00 backup, as root on pve and on omv:

git -C /root/ops pull -q && bash /root/ops/healthcheck.sh > report.txt 2>&1

Setup per host (once): a read-only deploy key, so the host can pull but never push.

apt install -y git
ssh-keygen -t ed25519 -f /root/.ssh/forgejo_ops -N "" -C "<host> ops read-only"
# add the .pub under repo Settings > Deploy keys, write access unchecked
GIT_SSH_COMMAND="ssh -i /root/.ssh/forgejo_ops" git clone ssh://git@192.168.178.107/homelab/ops.git /root/ops
git -C /root/ops config core.sshCommand "ssh -i /root/.ssh/forgejo_ops"

Paste report.txt into the Home Server project for review.

What to look at:

Section Act when
Disk usage anything listed (>= 80%)
ZFS not "all pools are healthy"; last scrub older than ~5 weeks
LVM thin data above 80%
SMART any Reallocated / Pending / Offline_Uncorrectable above 0, or growing
Failed units anything new
Pending updates high count plus long uptime: plan update + reboot
vzdump tasks any line not OK, or no run in the last week
Containers not Up (omv) anything listed

Security audit

Read-only, prints settings that matter for exposure and access (listening ports, sshd, PVE users and 2FA, LXC privileges, Vaultwarden/Forgejo/Nextcloud/Euro-Office settings, NPM proxy hosts, Docker socket mounts). Secret values are never printed. Run as root on pve and on omv when asked, or after changing what is exposed:

git -C /root/ops pull -q && bash /root/ops/security-audit.sh > audit.txt 2>&1