services:n8n
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| services:n8n [2026/02/06 23:46] – external edit 127.0.0.1 | services:n8n [2026/02/08 08:34] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== n8n ====== | ====== n8n ====== | ||
| - | Workflow | + | Workflow |
| - | ===== Access | + | ===== Details |
| - | ^ Item ^ Value ^ | + | ^ Key ^ Value ^ |
| - | | URL | [[https:// | + | |
| - | | Internal | [[https:// | + | |
| | Container | CT 111 | | | Container | CT 111 | | ||
| - | | IP | 10.100.161.111:5678 | | + | | IP | 10.100.161.111 |
| + | | Port | 5678 | | ||
| + | | RAM | 1 GB | | ||
| + | | URL | https:// | ||
| - | ===== Installation | + | ===== Features |
| - | <code bash> | + | * Visual Workflow Builder |
| - | # Container erstellen | + | |
| - | pct create 111 local: | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | --net0 name=eth0, | + | |
| - | --features nesting=1 \ | + | |
| - | --unprivileged 1 \ | + | |
| - | --start 1 | + | |
| - | # Node.js installieren | + | ===== Datenbank ===== |
| - | pct exec 111 -- bash -c ' | + | |
| - | apt update && apt install -y curl | + | |
| - | curl -fsSL https:// | + | |
| - | apt install -y nodejs | + | |
| - | ' | + | |
| - | # n8n installieren | + | * **Host:** 10.100.161.110 (PostgreSQL) |
| - | pct exec 111 -- npm install -g n8n | + | * **Database: |
| + | * **User: | ||
| - | # PostgreSQL-Datenbank anlegen (auf CT 110) | + | ===== Konfiguration ===== |
| - | pct exec 110 -- su - postgres -c " | + | |
| - | CREATE USER n8n WITH PASSWORD ' | + | |
| - | CREATE DATABASE n8n OWNER n8n; | + | |
| - | SQL | + | |
| - | # Systemd Service erstellen | + | < |
| - | pct exec 111 -- tee /etc/ | + | /opt/n8n/ |
| - | [Unit] | + | ├── .n8n/ # Data directory |
| - | Description=n8n | + | └── |
| - | After=network.target | + | </ |
| - | [Service] | + | Wichtige Env-Variablen: |
| - | Type=simple | + | < |
| - | User=root | + | N8N_HOST=0.0.0.0 |
| - | Environment=N8N_HOST=0.0.0.0 | + | N8N_PORT=5678 |
| - | Environment=N8N_PORT=5678 | + | N8N_PROTOCOL=https |
| - | Environment=N8N_PROTOCOL=https | + | WEBHOOK_URL=https:// |
| - | Environment=WEBHOOK_URL=https:// | + | DB_TYPE=postgresdb |
| - | Environment=DB_TYPE=postgresdb | + | DB_POSTGRESDB_HOST=10.100.161.110 |
| - | Environment=DB_POSTGRESDB_HOST=10.100.161.110 | + | </code> |
| - | Environment=DB_POSTGRESDB_PORT=5432 | + | |
| - | Environment=DB_POSTGRESDB_DATABASE=n8n | + | |
| - | Environment=DB_POSTGRESDB_USER=n8n | + | |
| - | Environment=DB_POSTGRESDB_PASSWORD=DB_PASSWORD | + | |
| - | Environment=N8N_ENCRYPTION_KEY=ENCRYPTION_KEY | + | |
| - | ExecStart=/usr/ | + | |
| - | Restart=always | + | |
| - | [Install] | + | ===== Service ===== |
| - | WantedBy=multi-user.target | + | |
| - | SERVICE | + | |
| - | pct exec 111 -- systemctl | + | <code bash> |
| - | pct exec 111 -- systemctl enable --now n8n | + | systemctl |
| + | journalctl | ||
| </ | </ | ||
| - | ===== Configuration ===== | + | ===== Ansible |
| - | + | ||
| - | ^ Variable ^ Description ^ | + | |
| - | | N8N_ENCRYPTION_KEY | Für Credential-Verschlüsselung (einmal setzen, nie ändern!) | | + | |
| - | | WEBHOOK_URL | Externe URL für Webhooks | | + | |
| - | | DB_* | PostgreSQL-Verbindung | | + | |
| - | + | ||
| - | Encryption Key in Vaultwarden gespeichert. | + | |
| - | + | ||
| - | ===== Management | + | |
| <code bash> | <code bash> | ||
| - | # Status | + | ansible-playbook site.yml |
| - | pct exec 111 -- systemctl status n8n | + | |
| - | + | ||
| - | # Logs | + | |
| - | pct exec 111 -- journalctl -u n8n -f | + | |
| - | + | ||
| - | # Restart | + | |
| - | pct exec 111 -- systemctl restart | + | |
| </ | </ | ||
| - | ===== Backup ===== | + | ===== Links ===== |
| - | + | ||
| - | Daten in PostgreSQL — siehe [[services: | + | |
| - | + | ||
| - | ===== Related | + | |
| - | * [[services:postgresql|PostgreSQL]] - Database | + | * [[https:// |
| - | * [[services:traefik|Traefik]] - Reverse proxy | + | * [[https:// |
| - | * [[infrastructure: | + | |
services/n8n.1770421583.txt.gz · Last modified: by 127.0.0.1
