Self-hosted homelab inventory, changelog and topology manager
  • TypeScript 98.2%
  • CSS 1.3%
  • Shell 0.3%
  • JavaScript 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
debe 54dbf0edfe
Some checks failed
CI / test (push) Failing after 50s
Build & publish container image / publish (push) Successful in 1m18s
Update registry domain to git.majlis7.net
2026-08-27 21:05:01 +03:00
.forgejo Update registry domain to git.majlis7.net 2026-08-27 21:05:01 +03:00
prisma Fix migration ordering and add schema drift check to CI 2026-08-27 20:30:11 +03:00
public chore: initial release v0.1.0 2026-08-22 19:37:47 +03:00
scripts Fix migration ordering and add schema drift check to CI 2026-08-27 20:30:11 +03:00
src Draw network map as device boxes with interfaces inside 2026-08-26 20:49:11 +03:00
.dockerignore chore: initial release v0.1.0 2026-08-22 19:37:47 +03:00
.env.example chore: initial release v0.1.0 2026-08-22 19:37:47 +03:00
.gitignore chore: initial release v0.1.0 2026-08-22 19:37:47 +03:00
.nvmrc ci: upgrade to Node 24 LTS (docker + CI + .nvmrc) 2026-08-22 20:07:30 +03:00
AGENTS.md chore: initial release v0.1.0 2026-08-22 19:37:47 +03:00
CHANGELOG.md Publish Docker image to registry; compose pulls prebuilt image 2026-08-27 20:57:18 +03:00
CLAUDE.md chore: initial release v0.1.0 2026-08-22 19:37:47 +03:00
docker-compose.yml Update registry domain to git.majlis7.net 2026-08-27 21:05:01 +03:00
Dockerfile docs: translate all remaining files to English (README, Dockerfile, compose, entrypoint) 2026-08-22 20:12:13 +03:00
eslint.config.mjs chore: initial release v0.1.0 2026-08-22 19:37:47 +03:00
next.config.ts chore: initial release v0.1.0 2026-08-22 19:37:47 +03:00
package-lock.json Publish Docker image to registry; compose pulls prebuilt image 2026-08-27 20:57:18 +03:00
package.json Publish Docker image to registry; compose pulls prebuilt image 2026-08-27 20:57:18 +03:00
postcss.config.mjs chore: initial release v0.1.0 2026-08-22 19:37:47 +03:00
README.md Update registry domain to git.majlis7.net 2026-08-27 21:05:01 +03:00
tsconfig.json chore: initial release v0.1.0 2026-08-22 19:37:47 +03:00

Homelab Hub

A self-hosted web app for managing a homelab: a central inventory and changelog instead of scattered notes.

Features

  • Networks / IPAM — zones (WAN/GREEN/BLUE/ORANGE) with a color-coded IP map per subnet (gateway / used / reserved / free).
  • Hosts — Proxmox servers, routers, firewalls — with a hypervisor field (proxmox / esxi / kvm / docker / none).
  • VMs / Containers — with IP, zone, project, status and expiry date.
  • Projects — group resources and track cleanup.
  • Credentials — stored with AES-256-GCM encryption, revealed on demand.
  • Changelog — every mutation is logged automatically (before/after) + manual entries.
  • Services — catalog of URLs and ports.
  • DNS & Domains — internal/external domains and DNS records.
  • Exposures — how services are reached from the internet (reverse proxy / port forward / tunnel).
  • Zone policy — firewall access matrix between zones.
  • Topology — interfaces and links with per-service "path to internet" tracing.
  • Proxmox sync — import VMs/containers and IPs from the Proxmox API.
  • Global search, sample data, and an onboarding guide.

Tech stack

Next.js 16 (App Router) · TypeScript · Prisma + SQLite · Tailwind v4 · AES-256-GCM.

Run locally (development)

npm install
cp .env.example .env        # fill in the values (or generate them below)
npx prisma migrate dev      # creates the database and runs the seed
npm run dev                 # http://localhost:3000

Generate secrets:

openssl rand -hex 32   # for SESSION_SECRET and ENCRYPTION_KEY

Deploy

Option 1: Docker Compose (easiest)

openssl rand -hex 32   # twice (SESSION_SECRET + ENCRYPTION_KEY)
# edit docker-compose.yml and fill in the values
docker compose pull    # pulls git.majlis7.net/debe/homelab-hub:latest
docker compose up -d

Opens on http://<ip>:3000. The database is persisted in ./data. The image is built and published automatically by the CI on every push to main and on every version tag.

Option 2: LXC / systemd

npm ci
npm run build
# create a systemd unit running:
#   npx prisma migrate deploy && npx prisma db seed && npm run start

Example homelab-hub.service:

[Unit]
Description=Homelab Hub
After=network.target

[Service]
WorkingDirectory=/opt/homelab-hub
EnvironmentFile=/opt/homelab-hub/.env
ExecStart=/usr/bin/npm run start
Restart=always

[Install]
WantedBy=multi-user.target

Proxmox sync

  1. In Proxmox: Datacenter → Permissions → API Tokens → Add (e.g. homelab@pam!sync).
  2. Copy the secret.
  3. In the app: Hosts → edit a Proxmox node → fill in:
    • API URL: https://<node-ip>:8006
    • Token ID: homelab@pam!sync
    • Token Secret: (encrypted automatically)
  4. Settings → Hypervisor sync → Sync now.

Note: the host name must match the Proxmox node name.

Environment variables

Variable Description
DATABASE_URL SQLite path (relative to prisma/ or absolute like file:/data/homelab.db)
SESSION_SECRET Session signing secret (64 hex)
ENCRYPTION_KEY AES-256-GCM key for credentials (64 hex)
ADMIN_USERNAME / ADMIN_PASSWORD Initial admin account (used on first seed)

Backup

Back up the database file and the secret key:

  • Local: prisma/homelab.db + data/encryption.key (if present) + .env
  • Docker: ./data + the env vars (ENCRYPTION_KEY / SESSION_SECRET)

⚠️ Losing ENCRYPTION_KEY means permanently losing access to stored credentials — keep a safe copy.

CI

Forgejo Actions runs the QA suite (npm run test:qa) and the production build on every push. See .forgejo/workflows/ci.yml.