From 21bc176d01e2dae327e3ba80222e600ef8bfb6a0 Mon Sep 17 00:00:00 2001 From: rufusking Date: Sun, 26 Jul 2026 22:14:54 -0400 Subject: [PATCH] Update server_nas16.md --- server_nas16.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/server_nas16.md b/server_nas16.md index d073144..8fb5a11 100644 --- a/server_nas16.md +++ b/server_nas16.md @@ -4,7 +4,7 @@ Hostname: **NAS16** IP Address: **192.168.150.40** VLAN: **50 β€” Lab / Servers** -Last Updated: 2026-06-24 +Last Updated: 2026-07-26 --- @@ -13,7 +13,7 @@ NAS16 is the **dedicated LAMP stack and database server** for the KingDezigns ne It runs **OpenMediaVault (OMV)** as its base OS, which manages nginx as the web GUI frontend. It provides backend services, web hosting, and database support for internal applications, development environments, and externally accessible virtual host websites. -In addition to its LAMP role, NAS16 hosts the **CrowdSec external notification system** β€” a pair of scripts that poll the CrowdSec LAPI on HAS and deliver split email alerts based on ban origin. +In addition to its LAMP role, NAS16 hosts the **CrowdSec external notification system** β€” a pair of scripts that poll the CrowdSec LAPI on HAS and deliver split email alerts based on ban origin β€” and, as of 2026-07-26, **Forgejo**, the self-hosted Git server for the KingDezigns network. This system is designed for: - Web application hosting (internal and external) @@ -22,6 +22,7 @@ This system is designed for: - Lightweight administrative tools (Webmin via OMV) - External virtual host websites proxied through HAS (NPM) - CrowdSec email notification delivery (local attack alerts + CAPI daily digest) +- Self-hosted Git version control for network-wide scripts and project files (Forgejo) NAS16 operates entirely within VLAN 50 and benefits from the strict containment rules that prevent lateral movement into trusted networks. @@ -166,6 +167,22 @@ Port 8080 must be exposed on HAS's host network interface. Configured in the Cro --- +## πŸ”§ Forgejo β€” Self-Hosted Git Server (added 2026-07-26) + +NAS16 hosts **Forgejo**, the self-hosted Git server providing version control and a web UI for editing/browsing scripts and project files across the KingDezigns network. Chosen for placement on NAS16 specifically because it has the most spare RAM/CPU headroom of any host in the fleet β€” the same reasoning previously used to place the CrowdSec notifier scripts here instead of on HAS. + +- **Container:** `forgejo` (Docker, image `codeberg.org/forgejo/forgejo:10`), Compose-managed via OMV +- **Web UI:** `http://192.168.150.40:3000` internally, public at `https://forgejo.kingdezigns.com/` (proxied via NPM on HAS, Force SSL) +- **SSH git access:** `ssh://git@192.168.150.40:2222/...` β€” LAN-only, no external port-forward configured +- **Database:** SQLite β€” no separate DB container +- **Data path:** `/opt/forgejo/data` (bind-mounted, not a Docker volume) β€” folded into the existing `nas16-backup.sh` scheduled backup job +- **Organizations:** `NAS08`, `NAS16`, `PLEX32` β€” one repo per org (`-scripts`), mirroring the `07 - Projects/` folder structure on NAS16's own NFS share +- **Registration:** disabled β€” accounts are admin-created only + +Full configuration, troubleshooting history, and operational details are documented separately in `server_forgejo.md`. + +--- + ## πŸ—‚οΈ Shared Permissions β€” NFS + rsync Backup NAS16 receives rsync backups from NAS08 via `nas08_to_nas16_sync.sh` every 2 days. To ensure rsync can write files on the destination without errors, NAS16 uses the same `ncshare` group configuration as NAS08. @@ -335,6 +352,7 @@ This ensures internal VLAN 50 devices (including HAS) are never banned regardles - CAPI cloud ban digest sent daily at midnight β€” single Python call handles 10,000+ decisions efficiently. - CrowdSec API key stored in Vaultwarden under `CrowdSec NAS16-notifier`. - **Gotcha:** when piping data into `python3 -` with a heredoc, the heredoc replaces stdin β€” pass data as an inline variable instead. +- **Forgejo (added 2026-07-26):** Self-hosted Git server, Docker container `forgejo`, public at `https://forgejo.kingdezigns.com/` via NPM, SSH git access LAN-only on port 2222, SQLite DB, data at `/opt/forgejo/data` (folded into `nas16-backup.sh`). Hosts version control for `07 - Projects/NAS08`, `/NAS16`, `/PLEX32` β€” one Forgejo org per host, one `-scripts` repo per org. See `server_forgejo.md` for full detail. - **Shared permissions:** `ncshare` group (GID 1001) shared by `www-data` and `rufusking` β€” must match NAS08 GID for rsync compatibility. - Default ACLs on `/export/kingdezignsnas-16/Public` ensure all rsync-written files inherit `ncshare` group permissions. - **NAS08β†’NAS16 sync script self-heals destination permissions on every run** β€” checks for `www-data:ncshare` ownership, runs `chown`/`chmod`/`setfacl` automatically if wrong. Flagged in email subject and body if it fires. @@ -343,4 +361,4 @@ This ensures internal VLAN 50 devices (including HAS) are never banned regardles --- -# βœ”οΈ End of File +# βœ”οΈ End of File \ No newline at end of file