No description
  • Go 67.9%
  • Svelte 28.8%
  • CSS 1.2%
  • JavaScript 1%
  • Dockerfile 0.7%
  • Other 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Manfred 2598266356
fix(div): proxmox disk use, default netbird location and custom card order
Signed-off-by: Manfred <6306372+manfredbjorlin@users.noreply.github.com>
2026-10-20 10:36:57 +02:00
cmd fix(div): proxmox disk use, default netbird location and custom card order 2026-10-20 10:36:57 +02:00
internal fix(div): proxmox disk use, default netbird location and custom card order 2026-10-20 10:36:57 +02:00
web feat(yes): no 2026-10-19 10:39:45 +02:00
.dockerignore feat(al): and everything 2026-10-19 10:25:45 +02:00
.env.example fix(div): proxmox disk use, default netbird location and custom card order 2026-10-20 10:36:57 +02:00
.gitignore feat(al): and everything 2026-10-19 10:25:45 +02:00
docker-compose.local.yml feat(al): and everything 2026-10-19 10:25:45 +02:00
docker-compose.yml fix(port): web port 80 2026-10-19 10:43:41 +02:00
Dockerfile feat(al): and everything 2026-10-19 10:25:45 +02:00
go.mod feat(al): and everything 2026-10-19 10:25:45 +02:00
go.sum feat(al): and everything 2026-10-19 10:25:45 +02:00
LICENSE Initial commit 2026-10-19 08:13:02 +02:00
README.md docs(.env): added .env.example 2026-10-20 09:10:43 +02:00

LocalMonitor ("The herd valley")

One-glance status page for TrueNAS, Proxmox, UniFi, NetBird, Syncthing, Kubernetes and misc servers. Go backend + Svelte frontend, SQLite history, all graphics rendered as SVG.

Architecture

  • cmd/collector: polls all sources every POLL_INTERVAL seconds, writes to SQLite. Runs independently of the website.
  • cmd/server: serves /api/overview, /api/history/{id}?hours=N from the DB, plus the built frontend.
  • web/: Svelte 5 + Vite. Polls the API every 15s; gauges, graphs and the peer map are SVG built in components.
  • Both containers share one SQLite file (WAL mode) in DATA_DIR. Keep it on a local disk, not NFS.

Configuration

All URLs and keys live in .env (gitignored). WEB_PORT sets the public port (default 80), DATA_DIR the host path of the database.

Deploy in a Proxmox LXC container

On the Proxmox node (pick a free container id, e.g. 110):

pveam update && pveam available --section system | grep debian-13
pveam download local <template>
pct create 110 local:vztmpl/<template> --hostname localmonitor --unprivileged 1 \
  --cores 2 --memory 2048 --swap 512 --rootfs local-lvm:12 \
  --mp0 local-lvm:5,mp=/data --net0 name=eth0,bridge=vmbr0,ip=dhcp \
  --features nesting=1,keyctl=1 --onboot 1
pct start 110

Inside the container:

apt update && apt install -y git curl
curl -fsSL https://get.docker.com | sh
git clone https://code.manfred.no/manfred/LocalMonitor.git /opt/localmonitor
# copy your .env to /opt/localmonitor/.env, then set DATA_DIR=/data and WEB_PORT=80
cd /opt/localmonitor && docker compose up -d --build

Update: git pull && docker compose up -d --build.

Develop locally

Rootless podman/docker without bridge networking: use the host-network override (site on port 1337).

podman-compose -f docker-compose.yml -f docker-compose.local.yml up -d --build

Or run the parts directly:

go run ./cmd/collector   # DB_PATH=./monitor.db plus .env values
go run ./cmd/server      # DB_PATH=./monitor.db STATIC_DIR=web/dist LISTEN_ADDR=:8080
cd web && npm install && npm run dev