Dashboards, data sources, and visualization practices.
Grafana is a visualization platform for time-series metrics and logs. I use it to monitor my homelab (Proxmox, LXC containers, Pi-hole, Jellyfin) with dashboards and alerts.
Prometheus is my primary data source; Grafana connects to it on the LAN and serves dashboards internally without public exposure.
Debian 12 LXC with a reserved/static IP recommended. Grafana listens on port 3000 by default and runs as a systemd service inside the container.
sudo apt update && sudo apt install -y curl gnupg2 ca-certificates
curl -fsSL https://packages.grafana.com/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/grafana.gpg
echo "deb [signed-by=/usr/share/keyrings/grafana.gpg] https://packages.grafana.com/oss/deb stable main" | sudo tee /etc/apt/sources.list.d/grafana.list
sudo apt update && sudo apt install -y grafana
sudo systemctl enable --now grafana-server
systemctl status grafana-server --no-pager
ss -lntp | grep 3000 || true
curl -I http://127.0.0.1:3000 || true
journalctl -u grafana-server -n 50 --no-pager
Access: http://<container-ip>:3000 (default admin/admin → you will be prompted to set a new password on first login).
Main paths:
Common tweaks in /etc/grafana/grafana.ini → [server]: set http_port, domain, and if reverse proxying, root_url (e.g. https://grafana.example.com/), then restart.
sudo systemctl restart grafana-server
# On your reverse proxy host
server {
listen 80;
server_name grafana.example.com;
location / {
proxy_pass http://<grafana-lxc-ip>:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Then set root_url = https://grafana.example.com/ in Grafana to match.
In Grafana UI → Connections → Data sources → Add new:
sudo apt update && sudo apt install -y grafana
sudo systemctl restart grafana-server
Major version jumps can include breaking changes—review release notes before upgrading.
sudo systemctl stop grafana-server
sudo apt purge -y grafana
sudo rm -f /etc/apt/sources.list.d/grafana.list /usr/share/keyrings/grafana.gpg
# Optional: remove data/config (this deletes dashboards/users!)
sudo rm -rf /etc/grafana /var/lib/grafana