🦉 CRUMBCONNECT: RKL DEPLOYMENT

"Der letzte Regentropfen im Prisma des Sonnenlichts"
Nachhaltig. Autark. Autonom. #krabbenschutz #localfirst


📦 DATEIEN-ÜBERSICHT

kruemel-stack/
├── debian-setup.sh          # Debian Server Komplett-Setup
├── freebsd-Makefile         # FreeBSD Jails mit Makefile
├── gentoo-make.conf         # Gentoo USE-Flags Profil
├── gentoo-package.use       # Gentoo Package-spezifische Flags
├── wald-netz-konzept.md     # Netzwerk-Topologie & Philosophie
├── kruemel-api.go           # Backend in Go
├── kruemel-api.py           # Backend in Python/FastAPI
└── README.md                # Diese Datei

🎯 LERNPFAD

Level 1: KRÜMEL (Kids starten hier) 🍓

Hardware:
- Raspberry Pi 4/5 (4GB+ RAM)
- 32GB+ MicroSD oder USB-SSD

Setup:

# Raspberry Pi OS Lite installieren
# https://www.raspberrypi.com/software/

# Nach Boot:
sudo apt update && sudo apt upgrade -y
sudo apt install -y python3 python3-pip git vim

# Erstes Programm
echo 'print("WUHUUUU! 🦉")' > hello.py
python3 hello.py

Was Kids hier lernen:
- Shell-Kommandos (ls, cd, mkdir)
- Python-Grundlagen
- Git-Basics
- SSH-Verbindung zum Server


Level 2: BÄUME (Production Server) 🌲

Hardware:
- x86_64 Server (4GB+ RAM, 50GB+ Storage)
- Dedizierte Hardware oder VM

Setup:

# Debian Trixie/Bookworm installieren

# Download Setup-Skript
wget https://raw.githubusercontent.com/.../debian-setup.sh
chmod +x debian-setup.sh

# Als root ausführen
sudo ./debian-setup.sh

# Nach Setup:
# 1. Gitea konfigurieren: http://<server-ip>:3000
# 2. Ollama Modell laden: ollama pull llama3.2
# 3. SSL: certbot --nginx -d deine-domain.de

Was du bekommst:
- ✓ Nginx (Webserver)
- ✓ PHP 8.2+ (Backend-Option)
- ✓ PostgreSQL + pgvector (Singe Source of Truth 🌱)
- ✓ Python 3.11+ (Backend-Option)
- ✓ Ollama (Lokale AI, localhost:11434)
- ✓ Gitea (Git-Hosting, Port 3000)
- ✓ WireGuard (CrumbVPN Mesh)
- ✓ Certbot (Let's Encrypt SSL)
- ✓ Security (UFW, fail2ban, Lynis, Chroot)


Level 3: WURZELN (Advanced) 🔱

Option A: FreeBSD + Jails

Setup:

# FreeBSD 14.x installieren

# Makefile kopieren
wget https://raw.githubusercontent.com/.../freebsd-Makefile
mv freebsd-Makefile Makefile

# Alles bauen
make all

# Status prüfen
jls

Vorteile:
- Native Isolation (Jails)
- ZFS (Snapshots, Compression)
- pf-Firewall (legendär stabil)
- Minimalistisch & transparent


Option B: Gentoo + Portage

Setup:

# Gentoo Stage3 installieren
# https://www.gentoo.org/downloads/

# USE-Flags kopieren
wget https://raw.githubusercontent.com/.../gentoo-make.conf
cp gentoo-make.conf /etc/portage/make.conf

wget https://raw.githubusercontent.com/.../gentoo-package.use
mkdir -p /etc/portage/package.use
cp gentoo-package.use /etc/portage/package.use/kruemel

# System bauen
emerge --sync
emerge -avuDN @world

# Services installieren
emerge nginx php postgresql python lynis

Vorteile:
- Totale Kontrolle (USE-Flags)
- Compile from Source
- Minimale Angriffsfläche
- Rolling Release


🔌 BACKEND: AUSTAUSCHBAR

Der Stack unterstützt beliebige Backend-Sprachen:

Go (Empfohlen für Autarkie)

# Build
go build -o kruemel-api kruemel-api.go

# Run
export API_TOKEN="dein-token"
./kruemel-api

Vorteile:
- Single binary (keine Dependencies)
- Fast & efficient
- Cross-compile für FreeBSD/Linux


Python/FastAPI (Empfohlen für Prototyping)

# Setup
python3 -m venv venv
source venv/bin/activate
pip install fastapi uvicorn httpx

# Run
export API_TOKEN="dein-token"
python kruemel-api.py

Vorteile:
- Schnelles Prototyping
- Riesiges AI/ML-Ökosystem
- Ollama-Integration trivial


PHP (Legacy/Webhosting)

<?php
// Nginx + PHP-FPM bereits installiert
// /var/www/html/api.php
header('Content-Type: application/json');
echo json_encode(['status' => 'ok']);
?>

Ruby (Elegant)

gem install sinatra
ruby kruemel-api.rb

Rust (Performance)

cargo build --release
./target/release/kruemel-api

🌐 NETZWERK-KONZEPT (CrumbVPN & Krabbenschutz)

Siehe wald-netz-konzept.md & crumbconnect_rkl_architecture.md für:
- BSI IT-Grundschutz (Syslog, SNMP)
- Das CrumbVPN Mesh (Isolation vom Internet)
- Der #krabbenschutz (Lynis, Wireshark-Proxy)
- Regenbogen-Krümel-Login (RKL) für ESP32
- Daten-Souveränität (Local First)


🔒 SICHERHEIT & COMPLIANCE

Best Practices:

  1. Isolation (CrumbVPN)
    Alle Schnittstellen (Postgres, API, Ollama) binden an das WireGuard-Mesh (10.x.x.x). Keine öffentlichen Ports außer Nginx (80/443).

  2. Audits (Lynis)

# Im debian-setup.sh als Cronjob eingerichtet
/opt/lynis/lynis/lynis audit system
  1. SSH-Keys statt Passwörter
ssh-keygen -t ed25519
ssh-copy-id user@server
  1. Firewall (UFW)
ufw allow 22/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
  1. fail2ban
# Bereits im debian-setup.sh enthalten
systemctl status fail2ban
  1. SSL/TLS
certbot --nginx -d deine-domain.de
  1. Regelmäßige Updates
apt update && apt upgrade -y

🦉 PHILOSOPHIE

Nachhaltig

  • Code der in 10 Jahren noch läuft
  • Stabile Dependencies (PostgreSQL > MySQL/MongoDB)
  • Unix-Philosophy

Autark

  • Keine Cloud-Abhängigkeit (Ollama lokal)
  • Eigene Git-Repos (Gitea)
  • Eigenes VPN-Mesh (WireGuard)

Autonom

  • Du bestimmst Updates
  • Du kontrollierst Daten
  • Du verstehst jeden Layer

🚀 QUICK START

Für Kids (RasPi):

# 1. RasPi OS installieren
# 2. SSH aktivieren
# 3. Erstes Python-Programm schreiben
# 4. Mit Server verbinden

Für Server (Debian):

# 1. Debian installieren
# 2. Setup-Skript ausführen:
sudo ./debian-setup.sh

# 3. Services konfigurieren
# 4. API deployen (Go oder Python)

Für Advanced (FreeBSD/Gentoo):

# FreeBSD:
make all

# Gentoo:
emerge @world

📊 SYSTEM-REQUIREMENTS

Minimum (RasPi):

  • 2GB RAM
  • 16GB Storage
  • Netzwerk

Empfohlen (Debian Server):

  • 4GB+ RAM
  • 50GB+ Storage (SSD)
  • 100Mbit+ Netzwerk

Optimal (Production):

  • 8GB+ RAM
  • 100GB+ Storage (NVMe)
  • Gigabit Netzwerk
  • Backup-Storage

🔧 TROUBLESHOOTING

Service startet nicht:

systemctl status <service>
journalctl -xeu <service>

Firewall blockiert:

ufw status
ufw allow <port>

Ollama lädt nicht:

ollama list
ollama pull llama3.2

PostgreSQL nicht erreichbar:

sudo -u postgres psql -c "\l"
systemctl status postgresql

📚 WEITERE RESSOURCEN

  • Debian: https://www.debian.org/doc/
  • PostgreSQL: https://www.postgresql.org/docs/
  • pgvector: https://github.com/pgvector/pgvector
  • Ollama: https://github.com/ollama/ollama
  • Gitea: https://docs.gitea.io/
  • WireGuard: https://www.wireguard.com/
  • Lynis: https://cisofy.com/lynis/

🦉 SUPPORT

Bei Fragen:
1. Logs prüfen: journalctl -xe
2. Status prüfen: systemctl status <service>
3. Community fragen (Debian, FreeBSD, Gentoo Foren)


"Der Wald wächst, weil jeder Baum seine Wurzeln hat.
Die Krümel lernen, weil das Netz sie trägt."

WUHUUUU! 🦉💙


📋 CHANGELOG

v0.0 – Die erste Wurzel im Wald

  • ✓ Debian Setup-Skript
  • ✓ FreeBSD Makefile
  • ✓ Gentoo Profil
  • ✓ Wald-Netz-Konzept
  • ✓ Backend (Go + Python)
  • ✓ Dokumentation

vX.Y – Der Spaziergang...

  • Coming soon! 🌱