250 lines
6.0 KiB
Markdown
250 lines
6.0 KiB
Markdown
# Flowise LXC Installer
|
|
|
|
Dieses Script erstellt einen LXC-Container mit Docker, PostgreSQL (mit pgvector) und Flowise.
|
|
|
|
## Was ist Flowise?
|
|
|
|
[Flowise](https://flowiseai.com/) ist ein Open-Source Low-Code Tool zum Erstellen von LLM-Flows und AI-Agenten. Es bietet eine visuelle Drag-and-Drop-Oberfläche zum Erstellen von:
|
|
|
|
- Chatbots
|
|
- RAG (Retrieval Augmented Generation) Pipelines
|
|
- AI-Agenten mit Tools
|
|
- LangChain-basierte Workflows
|
|
|
|
## Voraussetzungen
|
|
|
|
- Proxmox VE mit LXC-Unterstützung
|
|
- Debian 12 Template
|
|
- Netzwerk-Bridge (default: vmbr0)
|
|
- Storage (default: local-zfs)
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
# Minimale Konfiguration
|
|
bash install_flowise.sh
|
|
|
|
# Mit Debug-Ausgabe
|
|
bash install_flowise.sh --debug
|
|
|
|
# Mit benutzerdefinierten Credentials
|
|
bash install_flowise.sh \
|
|
--flowise-user admin \
|
|
--flowise-pass "MeinSicheresPasswort1"
|
|
|
|
# Mit allen Optionen
|
|
bash install_flowise.sh \
|
|
--cores 4 \
|
|
--memory 4096 \
|
|
--disk 50 \
|
|
--base-domain userman.de \
|
|
--flowise-user admin \
|
|
--debug
|
|
```
|
|
|
|
## Parameter
|
|
|
|
### Core-Optionen
|
|
|
|
| Parameter | Beschreibung | Standard |
|
|
|-----------|--------------|----------|
|
|
| `--ctid <id>` | Container ID (optional, wird automatisch generiert) | Auto |
|
|
| `--cores <n>` | CPU-Kerne | 4 |
|
|
| `--memory <mb>` | RAM in MB | 4096 |
|
|
| `--swap <mb>` | Swap in MB | 512 |
|
|
| `--disk <gb>` | Disk in GB | 50 |
|
|
| `--bridge <vmbrX>` | Netzwerk-Bridge | vmbr0 |
|
|
| `--storage <storage>` | Proxmox Storage | local-zfs |
|
|
| `--ip <dhcp\|CIDR>` | IP-Konfiguration | dhcp |
|
|
| `--vlan <id>` | VLAN-Tag | 90 |
|
|
| `--privileged` | Privilegierter Container | unprivileged |
|
|
| `--apt-proxy <url>` | APT-Proxy URL | - |
|
|
|
|
### Flowise-Optionen
|
|
|
|
| Parameter | Beschreibung | Standard |
|
|
|-----------|--------------|----------|
|
|
| `--base-domain <domain>` | Basis-Domain für FQDN | userman.de |
|
|
| `--flowise-user <user>` | Flowise Admin-Benutzername | admin |
|
|
| `--flowise-pass <pass>` | Flowise Admin-Passwort | Auto-generiert |
|
|
| `--debug` | Debug-Modus aktivieren | Aus |
|
|
|
|
## Ausgabe
|
|
|
|
### Normalmodus (ohne --debug)
|
|
|
|
Das Script gibt nur JSON auf stdout aus:
|
|
|
|
```json
|
|
{
|
|
"ctid": 768736637,
|
|
"hostname": "fw-1768736637",
|
|
"fqdn": "fw-1768736637.userman.de",
|
|
"ip": "192.168.45.136",
|
|
"vlan": 90,
|
|
"urls": {
|
|
"flowise_internal": "http://192.168.45.136:3000/",
|
|
"flowise_external": "https://fw-1768736637.userman.de"
|
|
},
|
|
"postgres": {
|
|
"host": "postgres",
|
|
"port": 5432,
|
|
"db": "flowise",
|
|
"user": "flowise",
|
|
"password": "GeneratedPassword1"
|
|
},
|
|
"flowise": {
|
|
"username": "admin",
|
|
"password": "GeneratedPassword2",
|
|
"secret_key": "64-char-hex-key"
|
|
},
|
|
"log_file": "/root/customer-installer/logs/fw-1768736637.log"
|
|
}
|
|
```
|
|
|
|
### Debug-Modus (mit --debug)
|
|
|
|
Zusätzlich werden Logs auf stderr ausgegeben.
|
|
|
|
## Erstellte Komponenten
|
|
|
|
### Docker-Container
|
|
|
|
1. **flowise-postgres** - PostgreSQL 16 mit pgvector Extension
|
|
2. **flowise** - Flowise AI Flow Builder
|
|
|
|
### Verzeichnisstruktur im Container
|
|
|
|
```
|
|
/opt/flowise-stack/
|
|
├── .env # Umgebungsvariablen
|
|
├── docker-compose.yml # Docker Compose Konfiguration
|
|
├── sql/
|
|
│ └── init_pgvector.sql # PostgreSQL Initialisierung
|
|
└── volumes/
|
|
├── postgres/data/ # PostgreSQL Daten
|
|
└── flowise-data/ # Flowise Daten (Flows, Credentials, etc.)
|
|
```
|
|
|
|
## Ports
|
|
|
|
| Service | Interner Port | Externer Port |
|
|
|---------|---------------|---------------|
|
|
| Flowise | 3000 | 3000 |
|
|
| PostgreSQL | 5432 | - (nur intern) |
|
|
|
|
## NGINX Reverse Proxy
|
|
|
|
Nach der Installation kann ein NGINX Reverse Proxy auf OPNsense eingerichtet werden:
|
|
|
|
```bash
|
|
bash setup_nginx_proxy.sh \
|
|
--ctid <CTID> \
|
|
--hostname fw-<TIMESTAMP> \
|
|
--fqdn fw-<TIMESTAMP>.userman.de \
|
|
--backend-ip <CT_IP> \
|
|
--backend-port 3000
|
|
```
|
|
|
|
## Unterschiede zu n8n-Installer
|
|
|
|
| Aspekt | n8n (install.sh) | Flowise (install_flowise.sh) |
|
|
|--------|------------------|------------------------------|
|
|
| Hostname-Präfix | `sb-` | `fw-` |
|
|
| Standard-Port | 5678 | 3000 |
|
|
| Authentifizierung | Email + Passwort | Username + Passwort |
|
|
| Container-Name | n8n | flowise |
|
|
| Datenverzeichnis | /opt/customer-stack | /opt/flowise-stack |
|
|
|
|
## Fehlerbehebung
|
|
|
|
### Container startet nicht
|
|
|
|
```bash
|
|
# Logs prüfen
|
|
pct exec <CTID> -- docker compose -f /opt/flowise-stack/docker-compose.yml logs
|
|
```
|
|
|
|
### Flowise nicht erreichbar
|
|
|
|
```bash
|
|
# Container-Status prüfen
|
|
pct exec <CTID> -- docker compose -f /opt/flowise-stack/docker-compose.yml ps
|
|
|
|
# Flowise-Logs prüfen
|
|
pct exec <CTID> -- docker logs flowise
|
|
```
|
|
|
|
### Datenbank-Verbindungsfehler
|
|
|
|
```bash
|
|
# PostgreSQL-Status prüfen
|
|
pct exec <CTID> -- docker logs flowise-postgres
|
|
```
|
|
|
|
## Account Setup Script
|
|
|
|
Nach der Installation muss der Administrator-Account über die Web-UI oder das Script erstellt werden.
|
|
|
|
### Verwendung
|
|
|
|
```bash
|
|
# Account erstellen
|
|
bash setup_flowise_account.sh \
|
|
--url https://fw-1768829679.userman.de \
|
|
--name "Admin User" \
|
|
--email admin@example.com \
|
|
--password "SecurePass1!"
|
|
|
|
# Mit Debug-Ausgabe
|
|
bash setup_flowise_account.sh --debug \
|
|
--url https://fw-1768829679.userman.de \
|
|
--name "Admin User" \
|
|
--email admin@example.com \
|
|
--password "SecurePass1!"
|
|
```
|
|
|
|
### Parameter
|
|
|
|
| Parameter | Beschreibung | Erforderlich |
|
|
|-----------|--------------|--------------|
|
|
| `--url <url>` | Flowise Base-URL | Ja |
|
|
| `--name <name>` | Administrator-Anzeigename | Ja |
|
|
| `--email <email>` | Administrator-E-Mail (Login) | Ja |
|
|
| `--password <pass>` | Administrator-Passwort | Ja |
|
|
| `--debug` | Debug-Modus aktivieren | Nein |
|
|
|
|
### Passwort-Anforderungen
|
|
|
|
- Mindestens 8 Zeichen
|
|
- Mindestens ein Kleinbuchstabe
|
|
- Mindestens ein Großbuchstabe
|
|
- Mindestens eine Ziffer
|
|
- Mindestens ein Sonderzeichen
|
|
|
|
### Ausgabe
|
|
|
|
```json
|
|
{
|
|
"success": true,
|
|
"url": "https://fw-1768829679.userman.de",
|
|
"email": "admin@example.com",
|
|
"name": "Admin User",
|
|
"message": "Account created successfully"
|
|
}
|
|
```
|
|
|
|
## Versionsverlauf
|
|
|
|
### install_flowise.sh
|
|
|
|
| Version | Änderungen |
|
|
|---------|------------|
|
|
| 1.0.0 | Initiale Version |
|
|
|
|
### setup_flowise_account.sh
|
|
|
|
| Version | Änderungen |
|
|
|---------|------------|
|
|
| 1.0.0 | Initiale Version |
|