TomSecSECURITY / SYSTEMS
TOMSEC / PUBLIC TERMINAL

READ-ONLY SESSION · CHOOSE A SYSTEM TO INSPECT

~/search
← ~/PROJECTS

TOMSEC / TECHNICAL CASE FILE PUBLIC INFORMATION ONLY

Infrastructure / SecurityPublic project

TomSec Homelab Infrastructure

Operating a Debian homelab means thinking beyond the container: how a service starts, where it writes, who can reach it and what survives a failure.

DebianDocker ComposesystemdNetBirdext4Python
View project on Forgejo ↗

02 / Problem

Problem

File services, an offline library and other applications share one server. An unrestricted upload tree or an absent storage mount could consume space needed by unrelated workloads. Management access also needs a different boundary from public application access.

03 / Objectives

Objectives

Preserve the working services and existing disk layout. Bound application storage, keep administration on a private overlay, and make startup checks explicit enough to reject an unexpected storage state.

04 / ARCHITECTURE

Follow the components.

FRAME / 02 · CONCEPTUAL TOPOLOGY

Public surface. Private control.

EDITORIAL VIEW
NO PRIVATE TELEMETRY
Public surface. Private control. Select a node to inspect its role.TRUST BOUNDARY / SEPARATE ROUTESNODE 01INTERNETNODE 02PUBLIC EDGENODE 03TOMSECNODE 04CLOUD SERVICESNODE 05TRUSTED DEVICENODE 06NETBIRDNODE 07LINUX HOSTNODE 08MEDIA SERVERNODE 09BOUNDED STORAGENODE 10OBSERVABILITY
INSPECT / INTERNET

Visitors reach published applications. This conceptual map makes no live requests to the lab.

05 / Implementation

Implementation

Docker Compose defines application stacks; systemd orders services around their dependencies. Nextcloud’s startup preflight checks the mounted filesystem, project quota and inherited directory flag. Uptime Kuma and Dozzle support health checks and log inspection. Caddy and Cloudflare provide application routing, while NetBird carries private administration.

06 / SECURITY

Security boundaries

  • Public applications and private administration have separate routes.
  • Databases and management interfaces are not published as public applications.
  • Public diagrams describe roles, without addresses, credentials or access policies.

07 / Testing

Testing

The current inspection checked the storage mount, filesystem quota features, directory inheritance, container health and backup timer results. Public HTTPS checks passed for the portfolio, file service and password service. Private SSH responded over the overlay; a full host reboot was not part of this inspection.

08 / Challenges

Challenges

Storage ceilings are not reservations. The capacity model includes existing datasets, application data, local recovery history and an emergency reserve. Inspection also caught a Minecraft backup guard tied to an obsolete disk device name; its repair remains an operational follow-up.

09 / Lessons

Lessons

A healthy application cannot prove that its backups work. Mount identity, backup results and physical capacity each need their own checks. Local recovery snapshots are useful, but an independent physical backup remains future work.

Project README

TomSec | Cybersecurity Homelab Projects

Classroom edition 1.1 - 17 September 2026

A sanitised, GitHub-ready learning pack centred on a hardened homelab, self-hosted services and a custom privacy proxy. It documents the security purpose of each component, provides separate lab examples and shows how to test access controls, failure behaviour and recovery.

Start with the handbook or the project overview.

These are teaching configurations, not an export of the author's servers. Use a fresh VM, your own accounts and disposable data. Real endpoints, private keys, proxy profiles and production configuration are not included.

Projects and security objectives

ProjectSecurity objectiveGuide
Linux and Docker homelabUnderstand privilege, persistence and attack surface01
Self-hosted NetBirdSeparate device enrolment, network access and app login02
Private HTTPS with CaddyEncrypt access and verify the correct server03
VaultwardenClose registration, disable server admin and practise MFA/recovery04
Nextcloud with PostgreSQL and RedisIsolate data services and verify trust, quotas and permissions05
ImmichControl photo-library access and understand its recovery set06
Security monitoring and DNS filteringDetect outages, review logs privately and test DNS policy07
Host and container hardeningKey-based SSH, private administration and exposure reduction08
Custom Xray/REALITY proxySeparate Mullvad internet egress from authorised NetBird destinations09
Ingress and access-control verificationDistinguish public app access from private management10
Backup and restoreRecover a usable service, not just produce an archive11
Safe sharingPublish examples and evidence without operational secrets12

Scope and provenance distinguish reported original work from new classroom hardening measures. The proxy chapter includes server/client configuration templates, selective WireGuard egress, a narrow egress guard, and a connection-failure test matrix. It is not a copy of a live proxy profile.

Begin with the private homelab

Follow chapters 01-03 in order on a fresh Debian lab. The core stack binds HTTPS only to server loopback; reach it using the documented SSH local forward. No paid VPS is needed for this first local exercise. Self-hosted NetBird and the advanced proxy exercise require additional machines/accounts and may incur costs.

From the extracted repository root on the lab server:

python3 scripts/init_env.py
cd labs/core
sudo docker compose config -q
sudo docker compose config --lock-image-digests -o compose.images.yaml
sudo ./lab.sh up -d caddy vaultwarden uptime-kuma

The browser names, CA verification and SSH tunnel in chapter 03 are required. An HTTPS error before those steps is expected. Do not change a binding to 0.0.0.0 merely to make an error disappear.

Security checks without deployment

With Python 3.11 or newer, from the root:

python3 -m unittest discover -s tests -v
python3 scripts/check_proxy.py labs/proxy/server.json.example

These check examples and helper behaviour, not the live security of a server. Run scripts/check_bindings.py against normalised Compose JSON as described in the handbook, not against the YAML file itself. See VALIDATION.md for the exact authoring checks and untested deployment steps.

Repository layout

README.md                  Start here
pdf/                       Revised handbook and overview
docs/                      Editable Markdown chapters
diagrams/                  Mermaid source diagrams
labs/core/                 Private self-hosted application stack
labs/proxy/                Xray, WireGuard, TLS-target and guard templates
labs/hardening/            SSH baseline and narrow management guard
labs/immich/               Matching-release installation notes
scripts/                   Secret generation, checks and encrypted core backup
tests/                     Deterministic safety/configuration tests
SOURCES.md                 Primary technical references and provenance
VALIDATION.md              Checks actually performed
VERSION-RECORD.md          Record YOUR installed versions and results

Privacy, licensing and publication

No production domains, server addresses, account handles, passwords, tokens, private keys, original screenshots or personal media are supplied. Reference URLs belong to upstream projects; illustrative addresses are not the author's. No unauthorised-access exercises, copyrighted media bundles or licensing bypasses are included. Proxy use must comply with the network owner's permission.

Use your own measured results and follow course attribution/assistance rules. New teaching material is MIT-licensed; upstream applications keep their own licenses. No remote repository or live server was changed for this edition.

Rebuild the PDFs

The finished PDFs are included. The optional builder uses Python 3.13, WeasyPrint 68.0 and markdown-it-py 4.2.0, with WeasyPrint's native dependencies and DejaVu system fonts. No font files are bundled.

python3 tools/render_pdfs.py

Review the new PDFs and repeat publication checks after editing.