docs: README überarbeiten und BEDIENUNGSANLEITUNG.md hinzufügen
README auf wesentliche Infos gestrafft, Link zur Bedienungsanleitung. BEDIENUNGSANLEITUNG deckt täglichen Betrieb, Update, Backup, Import/Export, User-Management und Troubleshooting ab. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3ea23beb74
commit
897b1ccf3d
2 changed files with 259 additions and 92 deletions
123
README.md
123
README.md
|
|
@ -1,6 +1,6 @@
|
|||
# n8n Stack
|
||||
|
||||
Produktionsnaher n8n-Stack auf Docker Compose mit PostgreSQL, Redis und Queue-Mode.
|
||||
Produktionsnaher n8n-Stack auf Docker Compose mit PostgreSQL 16, Redis 7 und Queue-Mode.
|
||||
|
||||
## Architektur
|
||||
|
||||
|
|
@ -14,127 +14,66 @@ Internet → n8n.linix.de:443
|
|||
← n8n-worker (n8n-stack-n8n-worker-1)
|
||||
```
|
||||
|
||||
YunoHost-SSOwat-Bypass: `my_webapp` als registrierter Platzhalter, nginx-Proxy-Block in
|
||||
`/etc/nginx/conf.d/n8n.linix.de.d/my_webapp.conf` (wird durch Hook `99-n8n-proxy`
|
||||
nach Upgrades automatisch wiederhergestellt).
|
||||
|
||||
## Verzeichnisstruktur
|
||||
|
||||
```
|
||||
n8n_stack/
|
||||
├── compose/docker-compose.yml # Stack-Definition
|
||||
├── .env # Secrets (600, nie committen!)
|
||||
├── .env.example # Vorlage
|
||||
├── scripts/ # Hilfsskripte (700)
|
||||
├── data/ # Docker-Volumes (gitignoriert)
|
||||
│ ├── n8n/
|
||||
│ ├── postgres/
|
||||
│ └── redis/
|
||||
├── backups/ # Backups, max. 2 (gitignoriert)
|
||||
├── imports/workflows/ # Workflow-JSONs zum Importieren
|
||||
├── imports/credentials/ # Credentials-Exporte (unverschlüsselt!)
|
||||
├── local-files/ # Dateien für n8n-Container (/files)
|
||||
└── docs/ # nginx-Configs, Runbooks
|
||||
├── compose/docker-compose.yml # Stack-Definition
|
||||
├── .env # Secrets (600, nie committen!)
|
||||
├── .env.example # Vorlage
|
||||
├── scripts/ # Hilfsskripte (700)
|
||||
│ └── yunohost-hook-restore-n8n-proxy.sh # Hook-Vorlage für YunoHost
|
||||
├── data/ # Docker-Volumes (gitignoriert)
|
||||
├── backups/ # Backups, max. 2 (gitignoriert)
|
||||
├── imports/workflows/ # Workflow-JSONs zum Importieren
|
||||
├── imports/credentials/ # Credential-Exporte (unverschlüsselt!)
|
||||
├── local-files/ # Dateien für n8n-Container (/files)
|
||||
└── docs/ # nginx-Configs, Runbooks
|
||||
```
|
||||
|
||||
## Start / Stop / Status
|
||||
## Schnellstart
|
||||
|
||||
```bash
|
||||
# Start
|
||||
# Stack starten
|
||||
docker compose -f compose/docker-compose.yml up -d
|
||||
|
||||
# Stop
|
||||
docker compose -f compose/docker-compose.yml down
|
||||
|
||||
# Status
|
||||
# Status prüfen
|
||||
docker compose -f compose/docker-compose.yml ps
|
||||
|
||||
# Logs
|
||||
docker compose -f compose/docker-compose.yml logs -f n8n
|
||||
|
||||
# Worker skalieren (z.B. auf 2)
|
||||
docker compose -f compose/docker-compose.yml up -d --scale n8n-worker=2
|
||||
```
|
||||
|
||||
## Update
|
||||
|
||||
```bash
|
||||
bash scripts/update-n8n.sh
|
||||
```
|
||||
|
||||
Führt automatisch ein Backup aus, zieht neue Images und startet den Stack neu.
|
||||
|
||||
## Backup / Restore
|
||||
|
||||
```bash
|
||||
# Backup erstellen (behält immer die letzten 2)
|
||||
bash scripts/backup-n8n.sh
|
||||
|
||||
# Restore aus Backup-Verzeichnis
|
||||
bash scripts/restore-n8n.sh backups/backup_20240101_120000
|
||||
```
|
||||
|
||||
## Import / Export von Workflows
|
||||
|
||||
```bash
|
||||
# Einzelne Workflow-JSON importieren
|
||||
bash scripts/import-workflow.sh imports/workflows/mein-workflow.json
|
||||
|
||||
# Ganzes Verzeichnis importieren
|
||||
bash scripts/import-workflow.sh imports/workflows/
|
||||
|
||||
# Alle Workflows exportieren
|
||||
bash scripts/export-workflows.sh
|
||||
```
|
||||
|
||||
## Import / Export von Credentials
|
||||
|
||||
```bash
|
||||
# Credentials importieren
|
||||
bash scripts/import-credentials.sh imports/credentials/creds.json
|
||||
|
||||
# Credentials exportieren (UNVERSCHLÜSSELT — sicher aufbewahren!)
|
||||
bash scripts/export-credentials.sh
|
||||
```
|
||||
|
||||
**Wichtig:** Credential-Exporte enthalten alle Secrets im Klartext. Export-Dateien nach Gebrauch löschen.
|
||||
|
||||
## Übernahme fremder n8n-Projekte
|
||||
|
||||
1. Workflow-JSON-Dateien nach `imports/workflows/` kopieren
|
||||
2. `bash scripts/import-workflow.sh imports/workflows/<datei>.json`
|
||||
3. Falls Credentials mitgeliefert: `bash scripts/import-credentials.sh <datei.json>`
|
||||
4. In der n8n-UI: Credentials der importierten Workflows prüfen und neu verknüpfen
|
||||
|
||||
Bei Voll-Exporten (`.zip` mit mehreren JSONs): entpacken, dann Verzeichnis übergeben.
|
||||
Ausführliche Bedienungsanleitung: [BEDIENUNGSANLEITUNG.md](BEDIENUNGSANLEITUNG.md)
|
||||
|
||||
## Deployment auf neuem Host
|
||||
|
||||
1. Repo klonen
|
||||
2. `.env.example` → `.env` kopieren, alle Werte ausfüllen
|
||||
3. Neuen `N8N_ENCRYPTION_KEY` generieren: `openssl rand -base64 32`
|
||||
4. `N8N_HOST` und `WEBHOOK_URL` auf die neue Domain anpassen
|
||||
5. nginx-Config aus `docs/nginx-local-n8n.conf` anpassen und aktivieren
|
||||
6. YunoHost-Config aus `docs/yunohost-nginx-n8n.conf` anpassen und installieren
|
||||
7. `docker compose -f compose/docker-compose.yml up -d`
|
||||
4. `N8N_HOST` und `WEBHOOK_URL` auf neue Domain anpassen
|
||||
5. Lokale nginx-Config aus `docs/nginx-local-n8n.conf` aktivieren (Port 8088)
|
||||
6. Auf YunoHost: `my_webapp` installieren, nginx-Config durch Proxy ersetzen (siehe `docs/yunohost-nginx-n8n.conf`)
|
||||
7. YunoHost-Hook deployen: `scripts/yunohost-hook-restore-n8n-proxy.sh` → `/etc/yunohost/hooks.d/post_app_upgrade/99-n8n-proxy`
|
||||
8. `docker compose -f compose/docker-compose.yml up -d`
|
||||
|
||||
## Kritische Hinweise
|
||||
|
||||
- **`N8N_ENCRYPTION_KEY`** darf nach dem ersten Start **nie geändert** werden — eine Änderung macht alle gespeicherten Credentials unbrauchbar. Key steht in `.env`.
|
||||
- **`N8N_ENCRYPTION_KEY`** darf nach dem ersten Start **nie geändert** werden — macht alle gespeicherten Credentials unbrauchbar.
|
||||
- **`.env`** nie committen (steht in `.gitignore`).
|
||||
- Backup vor jedem Update läuft automatisch via `update-n8n.sh`.
|
||||
- Credential-Exporte enthalten Secrets im **Klartext** — nach Gebrauch löschen.
|
||||
- Backup läuft automatisch vor jedem Update via `update-n8n.sh`.
|
||||
|
||||
## URLs und Zugangspfade
|
||||
## URLs
|
||||
|
||||
| Was | Wert |
|
||||
|---|---|
|
||||
| n8n Web-UI | https://n8n.linix.de |
|
||||
| Erster Login | Beim ersten Aufruf Owner-Account anlegen |
|
||||
| Secrets-Datei | `./.env` (Rechte 600) |
|
||||
| Backup-Verzeichnis | `./backups/` |
|
||||
| nginx lokal | `/etc/nginx/sites-available/n8n` (Port 8088) |
|
||||
| YunoHost nginx | `/etc/nginx/conf.d/n8n.linix.de.conf` |
|
||||
|
||||
## Setup-Status
|
||||
|
||||
- [x] DNS: `n8n.linix.de` → `92.50.108.218`
|
||||
- [x] YunoHost: Domain + Let's Encrypt
|
||||
- [x] YunoHost: `my_webapp` als SSOwat-Shim installiert, nginx-Proxy auf 192.168.179.124:8088
|
||||
- [x] SMTP-Credentials in `.env` eingetragen
|
||||
- [x] Owner-Account angelegt
|
||||
| YunoHost nginx | `/etc/nginx/conf.d/n8n.linix.de.d/my_webapp.conf` |
|
||||
| YunoHost Hook | `/etc/yunohost/hooks.d/post_app_upgrade/99-n8n-proxy` |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue