Self-hosted monitoring for homelabs: host and container metrics and uptime checks from all your machines in one dashboard, with an optional AI agent that diagnoses incidents and suggests fixes.
Python ai-agentsaiopsdashboarddockerfastapihomelabincident-managementllmmonitoringopenaireactroot-cause-analysisself-hosteduptime-monitoring
# Every setting Infradeck reads from .env, with no values filled in.
# Copy it next to the compose file and fill in what you need:
# cp example.env .env
#
# Lines marked REQUIRED must have a value or the stack refuses to start. Every other line can stay
# empty: an empty value means the default written in its comment. Never commit your filled-in .env.
#
# Which compose file reads a setting:
# both compose.yml (laptop / development) and docker-compose.server.yml (server behind a reverse proxy)
# server docker-compose.server.yml only
# dev compose.yml only
# traefik deploy/traefik.yml only (added on top of the server file)
# Remote machines added with "Connect a server" need none of this; see the last sections.
# =============================================================================
# Which compose file to use
# =============================================================================
# On a server set this to the server file, plus your proxy's file from deploy/ if there is one:
# docker-compose.server.yml:deploy/traefik.yml (Traefik)
# docker-compose.server.yml (any other reverse proxy)
# Then a plain `docker compose ...` uses them. Left empty, Compose picks compose.yml (the development
# stack) and would replace your server containers with ones that serve the collector endpoints publicly.
COMPOSE_FILE=
# =============================================================================
# Required
# =============================================================================
# REQUIRED (both). Password for the bundled PostgreSQL database. Use a long random string:
# openssl rand -hex 32
POSTGRES_PASSWORD=
# REQUIRED (both). Password for Redis, which holds the sign-in sessions and rate-limit counters.
# Letters and digits only, because it is put into a URL:
# openssl rand -hex 24
REDIS_PASSWORD=
# REQUIRED (server). The domain the dashboard is served on, without https:// and without a slash,
# for example infradeck.example.com. Used for the default CORS_ORIGINS and the Traefik router.
DASHBOARD_DOMAIN=
# =============================================================================
# Database
# =============================================================================
# (both) Name of the database and of its user. Default: infradeck
# Installs from before the rename to Infradeck can set both to homelab instead of renaming the
# database; see SETUP_DATABASES.md.
POSTGRES_DB=
POSTGRES_USER=
# =============================================================================
# Stored secrets (two-factor, notifications, incident agent)
# =============================================================================
# (both) Key that encrypts secrets the app must read back, such as two-factor secrets, notification addresses
# and the incident agent's API key. Without it two-factor sign-in can't be set up and is not enforced, and the
# agent's API key can't be saved. Keep it out of database backups. Generate one with:
# docker compose run --rm backend python -m src.backend.secrets_box
# To rotate, put the new key first and keep the old one after a comma: <new>,<old>
SECRETS_KEY=
# =============================================================================
# Reverse proxy (both)
# =============================================================================
# (both) The address or network of the reverse proxy in front of the dashboard (Traefik, Caddy, nginx,
# HAProxy, a tunnel connector...), so sign-in and registration limits count each client by its real address.
# Only these addresses may say who the client is (X-Forwarded-For); anyone else could pretend to be a new
# client on every request. Several values are separated by commas, e.g. <proxy-subnet>,<proxy-address>
# - Proxy in Docker (Traefik, Caddy, ...): the subnet of the network it shares with the dashboard:
# docker network inspect <network> --format '{{range .IPAM.Config}}{{.Subnet}}{{end}}'
# - Proxy on the host itself: the gateway of the dashboard's network (traffic from the host arrives from it):
# docker network inspect <project>_front --format '{{range .IPAM.Config}}{{.Gateway}}{{end}}'
# Not sure? Sign in through the proxy and open Account > Sessions: the address shown is the proxy's.
# Empty (default): nobody is trusted, and every client behind a proxy shares the proxy's address and limits.
TRUSTED_PROXIES=
# =============================================================================
# Traefik (traefik)
# =============================================================================
# (traefik) Names from your Traefik setup: the HTTPS entrypoint and certificate resolver from Traefik's
# static configuration (entryPoints / certificatesResolvers), and the Docker network Traefik is on
# (docker network ls, or: docker inspect <traefik-container> --format '{{json .NetworkSettings.Networks}}').
# Defaults: websecure, letsencrypt, traefik_default
TRAEFIK_ENTRYPOINT=
TRAEFIK_CERT_RESOLVER=
TRAEFIK_NETWORK=
# (traefik) Name of this dashboard's Traefik router and service. Change it only if it clashes with
# another one. Default: infradeck
TRAEFIK_ROUTER=
# =============================================================================
# HTTPS without Traefik (dev, optional Caddy profile)
# =============================================================================
# (dev) Domain for `docker compose --profile https up -d`. Its DNS must point at this machine and
# ports 80 and 443 must be open. Default: localhost
DOMAIN=
# =============================================================================
# Accounts and sign-in
# =============================================================================
# (both) Let anyone who can reach the dashboard create an account. Only the exact value "true" turns it on.
# Default: false (only the first account can be created)
ALLOW_REGISTRATION=
# (both) Setup token for the very first account, which becomes the admin. Leave empty and the backend
# makes one up and prints it in its log until the first account exists:
# docker compose logs backend | grep 'setup token'
ADMIN_BOOTSTRAP_TOKEN=
# (both) Send the sign-in cookie over HTTPS only. Must be true when the dashboard is served over HTTPS,
# and false when you open it over plain HTTP, or you can't stay signed in.
# Default: true (an empty value too); the dev compose file sets false
SESSION_COOKIE_SECURE=
# (both) How long a sign-in lasts without "Remember me", in seconds. Default: 86400 (24 hours)
SESSION_TTL_SECONDS=
# (both) Name of the sign-in cookie. Change it only if it clashes with another app on the same domain.
# Default: homie_session
SESSION_COOKIE_NAME=
# (both) Address(es) the dashboard is opened from, comma-separated, with https:// and no trailing slash.
# Requests from other origins are refused.
# Default: http://localhost:5173 (dev), https://<DASHBOARD_DOMAIN> (server)
CORS_ORIGINS=
# =============================================================================
# Rate limits (brute-force protection)
# =============================================================================
# (both) Failed sign-in attempts allowed per window, counted per IP address and per email.
# Defaults: 5 attempts per 60 seconds
LOGIN_RATE_LIMIT=
LOGIN_RATE_WINDOW_SECONDS=
# (both) Registration attempts allowed per IP address per window.
# Defaults: 3 attempts per 3600 seconds
REGISTER_RATE_LIMIT=
REGISTER_RATE_WINDOW_SECONDS=
# =============================================================================
# Limits on collectors
# =============================================================================
# (both) The most servers this install holds, however they are added. Default: 200
MAX_SERVERS=
# (both) A check-in must arrive at least this share of the server's check interval after the previous
# one; faster ones are refused. 0 switches the limit off. Default: 0.25
INGEST_MIN_SPACING_RATIO=
# (both) Enrollments with the enrollment key per address per hour (twice that per key). Raise it if many
# collectors reach the dashboard from one address, for example behind NAT. Default: 30
ENROLL_RATE_LIMIT=
# (both) How long a token from "Connect a server" stays valid, in seconds. Default: 900
JOIN_TOKEN_TTL_SECONDS=
# =============================================================================
# Connecting remote servers
# =============================================================================
# (server) Where the collector gate is published. Bind it to your VPN address only (for OpenVPN the
# server's tun address): Docker's published ports bypass ufw and similar firewalls.
# Defaults: 127.0.0.1 and 8081
COLLECTOR_BIND=
COLLECTOR_PORT=
# (both) The address "Connect a server" tells new machines to report to, e.g. http://<vpn-address>:8081/api
COLLECTOR_PUBLIC_URL=
# (both) Images remote machines install, pinned by digest. Push a version tag (git tag v0.1.0 &&
# git push origin v0.1.0); the "Publish images" workflow prints these lines in its summary. The GHCR
# packages must be public so machines can pull them without credentials. "Connect a server" needs both.
COLLECTOR_IMAGE=
DOCKER_PROXY_IMAGE=
# =============================================================================
# Collector on this machine (monitors the machine running the stack)
# =============================================================================
# (both) Enrollment key (dashboard: Connect a server → Advanced) that approves this machine
# automatically. Empty: it appears under "New servers detected" and you click Add.
INFRADECK_ENROLL_KEY=
# (both) Name shown on the dashboard for this machine. Default: its hostname
INFRADECK_SERVER_NAME=
# (server) How often the collector reports at first, in seconds (minimum 15); the dashboard setting
# replaces it once the server is added. Default: 60
INFRADECK_CHECK_INTERVAL_SECONDS=
# (server) Unique ID of this machine. Default: /etc/machine-id of the host.
# Set it only if several machines share one machine-id (cloned VMs) and show up as one server.
INFRADECK_MACHINE_ID=
# (both) Optional internet check, off when empty: comma-separated host:port targets (at most 5) this
# collector tries to reach. It only opens a TCP connection and looks the name up. Example: 1.1.1.1:443,9.9.9.9:443
INFRADECK_CONNECTIVITY_TARGETS=
# =============================================================================
# Ports and the dashboard
# =============================================================================
# (both) Address and port of the dashboard's plain-HTTP port on this machine. 127.0.0.1 keeps it
# reachable only from here (a proxy in Docker can still reach it over the Docker network); 0.0.0.0 allows LAN/VPN.
# Defaults: 0.0.0.0 (dev), 127.0.0.1 (server); port 5173
FRONTEND_BIND=
FRONTEND_PORT=
# (dev) Host port, on 127.0.0.1, where the backend is published for debugging. Default: 8060
BACKEND_PORT=
# (server) How often live graphs refresh, in seconds (minimum 1). Built into the frontend image, so
# rebuild after changing it: docker compose up -d --build frontend. Default: 3
LIVE_GRAPH_REFRESH_INTERVAL_SECONDS=
# =============================================================================
# Notifications (optional)
# =============================================================================
# (both) Email for incident notifications (Account → Notifications). Email is off unless SMTP_HOST
# and SMTP_FROM are set. Defaults: port 587, STARTTLS true
SMTP_HOST=
SMTP_PORT=
SMTP_STARTTLS=
SMTP_USER=
SMTP_PASSWORD=
SMTP_FROM=
# =============================================================================
# Optional, rarely needed
# =============================================================================
# (both) Serve the interactive API documentation at /api/docs. Leave off on a public install.
# Default: false
ENABLE_API_DOCS=
# =============================================================================
# Collector-only install (collector-compose.yml on a machine without the dashboard)
# =============================================================================
# REQUIRED for collector-compose.yml. The dashboard's API address, e.g. http://<vpn-address>:8081/api
INFRADECK_API_URL=
# Image to run instead of building one locally. Default: infradeck-collector:latest
INFRADECK_COLLECTOR_IMAGE=
# =============================================================================
# Running the backend without Docker (development only)
# =============================================================================
# The compose files set these to match their own containers, so inside Docker they are ignored.
# Set them only when you run the backend straight from Python (see docs/development.md).
# Default: postgresql+psycopg://infradeck:infradeck_dev@localhost:5432/infradeck
DATABASE_URL=
# Default: redis://localhost:6379/0
REDIS_URL=
# Folder with the assistant's prompt files. Default: src/agent
PROMPTS_DIR=