PROXMOX LXC & SOVEREIGN GIT FORGEJO V17 / DEBIAN 13 / SYSTEMD 1.5 OK

Self-Hosted Git Server (Forgejo v17) on Proxmox LXC: 123.9 MiB RAM, 5.3 GB Repos & systemd 1.5 OK Hardening

Cloud Git hosts throttle or reject repositories once assets cross the 100 MB ceiling. We provisioned Forgejo v17.0.2 inside an unprivileged Debian 13 (trixie) Proxmox LXC container (CT 104) in 43 seconds, pushed 7 private repositories totaling 5.3 GB over 2.5GbE SSH, measured just 123.9 MiB RAM under load, and tightened systemd-analyze security from 9.6 UNSAFE down to 1.5 OK.

Dark OLED engineering workstation showing Forgejo v17 Dark OLED web UI, Proxmox VE LXC telemetry at 123.9 MiB RAM, and systemd-analyze security score 1.5 OK beside a Mini PC homelab node
Affiliate Disclosure: SpecInfo Lab operates with zero paid vendor sponsorships. As an Amazon Associate I earn from qualifying purchases. All container timings, cgroup RAM numbers, SSH transfer benchmarks, and systemd hardening profiles below come straight from our production Proxmox VE lab.
🔬 SPECINFO PROXMOX CT 104 LIVE PRODUCTION TELEMETRY

Zero-Cloud Private Git Vault Under 125 MiB RAM—With Full 3-2-1 Snapshot Protection

Measured on an unprivileged Debian 13 (trixie) LXC container (2 vCPU, 1024 MB RAM cap, 0 MB swap, 20 GB sparse local-btrfs, onboot: 1) over 2.5GbE LAN.

01 // PROVISIONING SPEED

43 Seconds End-to-End

Unpacking the 528 MiB Debian 13 template on NVMe took 10 s at 334 MiB/s, with full SHA-256 Forgejo setup done in 43 s.

02 // CGROUP FOOTPRINT

106.7 → 123.9 MiB RAM

SQLite WAL + Bleve indexer stay at 0.38% of a 32 GB Proxmox host while serving web pages in 2–24 ms (Dark OLED UI).

03 // 5.3 GB SSH PUSH

No 100 MB Cloud Wall

Compressed ~6.1 GB raw .git folders to 4.5 GB bare repos (5.5 GB entire container) and pushed 5.3 GB in 6 min 41 s.

04 // SYSTEMD SANDBOX

9.6 UNSAFE → 1.5 OK

Strict kernel, filesystem, syscall, and capability locks drop exposure to 1.5 OK :-) without breaking Git over SSH or HTTP.

⚡ VERIFIED LAB HARDWARE — SOVEREIGN GIT & 3-2-1 BACKUP STACK

Proxmox Mini PC Nodes, DRAM NVMe Primary Storage, SATA Backup SSDs & FIDO2 Keys

Everything needed to host an ultra-quiet Forgejo LXC vault on NVMe, isolate weekly vzdump snapshots onto a separate physical SATA SSD, and protect admin logins with hardware keys. Links route automatically to your regional Amazon store (UK / US / PL).

1. Why Self-Host Forgejo v17 in an Unprivileged Proxmox LXC (Not Docker on Root)

Every developer eventually hits the same friction with hosted Git: hard 100 MB per-file caps, push timeouts on multi-gigabyte print or media repositories, silent rate limits, and third-party AI training policies hovering over private codebases. Hosting your own Git server solves all four problems in one afternoon—provided you do not bloat it with a 4 GB Java stack or an exposed Docker socket.

Forgejo v17.0.2 compiles down to a single static Go runtime binary with zero external runtime dependencies. Paired with SQLite in WAL mode and Forgejo's native Bleve repository search index inside an unprivileged Debian 13 (trixie) LXC container, it boots cleanly alongside your existing Proxmox stack while keeping the host kernel isolated via UID/GID namespace mapping.

Unprivileged LXC • CT 104

43-Second NVMe Provisioning

Unpacking the 528 MiB Debian 13 template on local-btrfs finishes in 10 seconds at 334 MiB/s. Allocated 2 vCPU, 1024 MB RAM cap, 0 MB swap, and a 20 GB sparse disk with onboot: 1.

SQLite WAL + Bleve

123.9 MiB RAM & 2–24 ms UI

Measured directly from cgroup memory.current: 106.7 MiB (111,984,640 B) idle, rising to just 123.9 MiB (129,982,464 B) after indexing 7 private repositories up to 5.3 GB.

Pack Compression

6.1 GB → 4.5 GB Bare Repos

Workstation .git directories totaling ~6.1 GB compacted down to 4.5 GB inside /var/lib/forgejo/repositories, keeping the entire OS + binary + 7 repos at 5.5 GB on disk.

Proxmox VE Host Provisioning & SHA-256 Binary Verification (43s Build)
# 1. Create unprivileged Debian 13 (trixie) container on Proxmox VE host
pct create 104 local:vztmpl/debian-13-standard_13.6-1_amd64.tar.zst \
  --hostname forgejo-git --arch amd64 --ostype debian \
  --unprivileged 1 --features nesting=1 \
  --cores 2 --memory 1024 --swap 0 --rootfs local-btrfs:20 \
  --net0 name=eth0,bridge=vmbr0,ip=192.168.0.254/23,gw=192.168.0.1,type=veth \
  --nameserver "1.1.1.1 9.9.9.9" --onboot 1 --start 1

# 2. Inside CT 104: verify Forgejo v17.0.2 binary (Go runtime) via SHA-256
cd /tmp
curl -fsSLO https://codeberg.org/forgejo/forgejo/releases/download/v17.0.2/forgejo-17.0.2-linux-amd64.xz
curl -fsSLO https://codeberg.org/forgejo/forgejo/releases/download/v17.0.2/forgejo-17.0.2-linux-amd64.sha256
xz -df forgejo-17.0.2-linux-amd64.xz
sha256sum -c forgejo-17.0.2-linux-amd64.sha256
install -m 0755 forgejo-17.0.2-linux-amd64 /usr/local/bin/forgejo

2. Measured Telemetry & 2.5GbE SSH Push Benchmarks (Including a 5.3 GB Repo)

Instead of quoting synthetic microbenchmarks, we pushed 7 real-world private repositories from our workstation over 2.5GbE Ethernet using Ed25519 SSH keys and timed both the client push and server-side index-pack delta resolution. Even the heaviest 5.3 GB 300 DPI print archive—which GitHub rejects outright under its 100 MB file and push ceilings—completed cleanly without touching swap or triggering OOM.

Idle → 7-Repo RAM
106.7 → 123.9 MiB
0.38% of a 32 GB Proxmox host
LXC Provisioning Time
43 sec
528 MiB template unpacked in 10 s (334 MiB/s)
Web UI Render Speed
2–24 ms
SQLite WAL + Bleve + Dark OLED theme
Whole Container Footprint
5.5 GB
~6.1 GB .git → 4.5 GB bare packs
Anonymized Repository Local .git Size 2.5GbE SSH git push + index-pack Workload & Engineering Notes
repo-oem-tools 852 KB 0.79 s OEM component lookup tables and spreadsheet exporter scripts.
repo-docs-kb 9.1 MB 1.32 s 282 Markdown architecture runbooks and automation scripts.
repo-static-site 27 MB 2.58 s 73 static HTML pages, vector graphics, and build helpers.
repo-legal-portal 52 MB 4.46 s 72 client-side tools and sub-modules across 59 commits.
repo-engineering-hub 131 MB 7.40 s 4-language engineering portal and diagnostics suite across 153 commits.
repo-media-showcase 568 MB 26.45 s (~21.5 MB/s) Static storefront with compressed WebP and PDF preview assets.
repo-print-assets-300dpi 5.3 GB 401.69 s (6 min 41 s) 93 commits of 300 DPI print masters—rejected by GitHub's 100 MB limit, ingested cleanly over SSH on Forgejo.

3. Hardening systemd from 9.6 UNSAFE Down to 1.5 OK :-)

Default service units installed from generic tutorials usually run with an exposure score around 9.6 UNSAFE in systemd-analyze security: the web process can read kernel tunables, inspect other processes in /proc, invoke arbitrary syscalls, and hold writable access outside its data path. Even adding basic ProtectSystem=strict flags only improves the score to 6.2 MEDIUM.

Because Forgejo is compiled with the native Go runtime (no JIT code generation required), we can enable MemoryDenyWriteExecute=yes, drop every Linux capability, isolate /proc to the service's own PID, and restrict syscalls to @system-service—achieving a production score of 1.5 OK :-) while keeping SSH pushes, HTTP UI rendering, and Bleve indexing 100% functional.

/etc/systemd/system/forgejo.service — Production 1.5 OK Unit
[Unit]
Description=Forgejo Sovereign Git Server
After=syslog.target network.target

[Service]
Type=notify
User=git
Group=git
UMask=0027
WorkingDirectory=/var/lib/forgejo
Environment=USER=git HOME=/var/lib/forgejo FORGEJO_WORK_DIR=/var/lib/forgejo
ExecStart=/usr/local/bin/forgejo web --config /etc/forgejo/app.ini
Restart=always
RestartSec=3s
TimeoutStopSec=30s

# Systemd Sandboxing (systemd-analyze security: 9.6 UNSAFE -> 6.2 MEDIUM -> 1.5 OK)
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
ProtectSystem=strict
ProtectHome=yes
ProtectHostname=yes
ProtectClock=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectKernelLogs=yes
ProtectControlGroups=yes
ProtectProc=invisible
ProcSubset=pid
CapabilityBoundingSet=
AmbientCapabilities=
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
LockPersonality=yes
MemoryDenyWriteExecute=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
SystemCallErrorNumber=EPERM
ReadWritePaths=/var/lib/forgejo /etc/forgejo

[Install]
WantedBy=multi-user.target

Notice one subtle detail inside [Service]: we grant ReadWritePaths=/var/lib/forgejo /etc/forgejo only while setting UMask=0027. Once your initial secrets (SECRET_KEY, INTERNAL_TOKEN, JWT_SECRET, LFS_JWT_SECRET) and INSTALL_LOCK = true are written into /etc/forgejo/app.ini, even a compromised web handler cannot touch system binaries, other user directories, kernel devices, or raw sockets.

4. Three Live Debian 13 LXC & Forgejo v17 Production Traps Caught in the Lab

Real Lab Traps • Fixed Live on CT 104
  1. systemctl reload ssh Crashes With status=255/EXCEPTION (fatal: Cannot bind any address): On Debian 13 (trixie), OpenSSH runs alongside ssh.socket systemd socket activation. Sending SIGHUP via systemctl reload ssh triggers a bind collision on port ::22 and drops your SSH daemon. Always apply /etc/ssh/sshd_config.d/forgejo.conf changes with systemctl restart ssh instead of reload.
  2. adduser --system --disabled-password Silently Locks Out OpenSSH Keys: Creating the git service account with --disabled-password writes an exclamation mark (!) into /etc/shadow. In hardened OpenSSH setups with PasswordAuthentication no and without PAM password bypass, OpenSSH treats ! as a locked account and refuses Ed25519 public-key login. Fix it cleanly with usermod -p '*' git—this unlocks key-based SSH while keeping password authentication impossible.
  3. Deprecated [server] LFS_CONTENT_PATH Warning in Forgejo v17 /admin/config: Older Gitea tutorials place LFS_CONTENT_PATH inside the [server] block, which raises a red deprecation alert in Forgejo v17's Admin Configuration audit. Move it to a dedicated [lfs] section using PATH = /var/lib/forgejo/data/lfs (while keeping LFS_START_SERVER = true under [server]) so /admin/config reports zero configuration warnings.

5. Private Access (Zero Public Registration) + 3-2-1 Proxmox Backup Integration

A self-hosted Git vault holding private infrastructure code and proprietary assets should never expose sign-up forms or repository listings to unauthenticated visitors. Inside /etc/forgejo/app.ini, lock the instance down with four settings: DISABLE_REGISTRATION = true, REQUIRE_SIGNIN_VIEW = true, FORCE_PRIVATE = true, and DEFAULT_THEME = forgejo-dark (for a clean Dark OLED UI that renders in 2–24 ms).

Keep the Forgejo HTTP port (3000) and SSH port (22) bound strictly to your internal LAN and private Tailscale Subnet Router—never forward them to the public internet. For physical disaster resilience, integrate CT 104 directly into a layered 3-2-1-1-0 air-gapped Restic & rclone backup architecture:

🛡️ Interactive Forgejo Proxmox LXC & systemd 1.5 OK Builder (100% In-RAM)

Select your repository workload, database backend, and systemd isolation level to compute exact Proxmox LXC sizing and generate copy-ready forgejo.service, app.ini privacy/LFS blocks, and pct create commands.

Recommended LXC Sizing
—
Expected Forgejo RSS
—
systemd-analyze Target
—
Privacy & LFS Layout
—
📋 Generated Proxmox LXC + forgejo.service + /etc/forgejo/app.ini Blueprint

            

6. Trap-Free Hardware Stack for Proxmox Git Vaults & Secondary Backups

Running Forgejo 24/7 inside an unprivileged container requires very little compute, yet storage endurance and backup separation matter enormously. Pair an energy-efficient Mini PC with a DRAM-cached NVMe boot/container drive, a physically separate 2.5" SATA SSD for vzdump snapshots, and hardware FIDO2 keys for administrative protection.

Proxmox VE Host Node

Mini PC for Proxmox LXC (Minisforum / GMKtec)

Dual 2.5GbE • M.2 NVMe + SATA Bay • Quiet 24/7 Cooling

Hosts CT 104 alongside Tailscale and monitoring containers at a fraction of a desktop tower's wall draw while saturating 2.5GbE on multi-gigabyte Git pushes. Compare compact nodes in our Proxmox Mini PC hierarchy and sub-15W server tuning guide.

View on Amazon ↗
Primary LXC & Git Pack Drive

NVMe SSD with DRAM Cache (TLC Endurance)

Hardware DRAM Cache • 3D TLC NAND • Fast git index-pack

SQLite WAL commits and multi-gigabyte git index-pack delta compression generate random small-block writes. Using a true TLC NVMe drive with onboard DRAM cache avoids DRAM-less HMB latency spikes and sustains fast container unpacks (334 MiB/s).

View on Amazon ↗
Physical Fault Isolation

2.5" SATA SSD for Secondary vzdump Backup

Separate Physical Bus • Weekly zstd Snapshots • Local Restic Vault

Never store Proxmox vzdump backups on the same NVMe stick that runs your LXC rootfs. Dedicated SATA SSD storage catches mode=snapshot zstd container archives cleanly so a dead primary M.2 drive never takes your backups with it.

View on Amazon ↗
Phishing-Resistant Admin Auth

YubiKey 5C NFC Hardware Security Key

FIDO2 / WebAuthn • ssh-keygen -t ed25519-sk • USB-C + NFC

Pair Forgejo WebAuthn 2FA and OpenSSH ed25519-sk hardware-touch keys with your Proxmox root login and password manager holding your Restic master key. See our FIDO2 hardware key blueprint for backup key rules.

View on Amazon ↗

7. Related SpecInfo Proxmox, Backup & Linux Hardening Guides