n8n-self-hosting
Was er macht
Dieser Skill führt einen KI-Agenten über SSH durch die Einrichtung von selbst gehostetem n8n auf einem frischen Linux-Server, mit Docker Compose und Caddy für sicheren Webzugriff. Er ist für Menschen, die n8n auf dem eigenen Server oder einem VPS betreiben wollen.
Wann du ihn nutzt
- ✓Wenn du n8n selbst auf einem Cloud-Server oder VPS hosten willst.
- ✓Wenn du zwischen einer einfachen Einzelprozess-Einrichtung und einer Queue-Einrichtung mit Workern wählen musst.
- ✓Wenn du eine bestehende selbst gehostete n8n-Instanz aktualisieren oder sichern musst.
Link zum Skill
https://github.com/czlonkowski/n8n-mcp/blob/main/data/skills/n8n-self-hosting/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Richte n8n auf meinem neuen Ubuntu-Server mit automatischem HTTPS ein.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Skill prüft den Server, installiert Docker, richtet die Projektdateien und Geheimnisse ein, startet n8n hinter Caddy und prüft, ob die sichere Verbindung funktioniert.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Deploying self-hosted n8n
This skill takes a fresh Linux VM (Ubuntu/Debian, root or sudo SSH) to a running, HTTPS, production n8n via Docker Compose behind Caddy (automatic Let's Encrypt TLS). It is for self-hosted n8n on Docker — not n8n Cloud, and not for building workflows (that's the rest of this pack).
Two deployment modes. The architectures differ, so pick the mode before doing anything.
You drive this end-to-end over SSH: preflight → install Docker → lay down the project →
generate secrets → launch → verify TLS → hand off. The template files live in assets/;
the per-mode and security depth live in the reference files named below.
Rule 0 — choose the mode (ask the user)
Do not guess. Ask, then commit to one:
| Single / regular | Queue | |
|---|---|---|
| Processes | one n8n | main + N workers |
| Extra services | none (SQLite) | Redis (queue) + Postgres (DB) |
| Executes workflows | in the main process | on workers, in parallel |
| Good for | 1 user, light/moderate load, simplest ops | high volume, heavy/long executions, horizontal scale |
| Compose | assets/docker-compose.single.yml |
assets/docker-compose.queue.yml |
| Deep dive | SINGLE_MODE.md |
QUEUE_MODE.md |
If unsure, start single — it's the simplest correct thing and covers most needs. Moving to queue later means swapping the compose file and migrating SQLite→Postgres, so if the user already expects real volume, start queue.
Rule 1 — secret hygiene (non-negotiable)
A misstep here leaks client credentials. Be diligent:
- Generate every secret fresh, on the target box. Never copy an encryption key, DB
password, or
.envfrom another n8n instance into this one. SeeSECURITY.mdfor theopensslcommands. - Secrets live only in
.env(mode 600), referenced by the compose as${VAR}. Never inline a secret intodocker-compose.yml, the Caddyfile, or anything you commit. - The
N8N_ENCRYPTION_KEYis sacred. It encrypts every stored credential. If it's lost or changes, all saved credentials become undecryptable. Set it explicitly, and tell the user to back it up off the box. Don't echo it into long-lived logs or chat history beyond what's needed to hand it over. - Never expose internal services. Only Caddy (80/443) is public. n8n (5678), Postgres (5432), Redis (6379) stay on the private Docker network — the templates already omit their host port mappings. Don't add them.
.envand Caddy'scaddy_datavolume (the issued certs + ACME account key) are not artifacts to share. If you're working inside a git repo, confirm.envis git-ignored before any commit.
Inputs to collect up front
- SSH target —
user@hostand how you authenticate (key path or the user confirms the agent already has access). Root or a sudo user. - Domain — the full hostname n8n will live at, e.g.
n8n.example.com(→SUBDOMAIN=n8n,DOMAIN_NAME=example.com). The user must control its DNS. - TLS email — for Let's Encrypt (
SSL_EMAIL). - Timezone — IANA name for Schedule/Cron nodes (e.g.
Europe/Warsaw), elseEtc/UTC. - Mode — single or queue (Rule 0). Queue → confirm the box has enough RAM (rough floor ~4 GB; each worker wants ~1–2 GB).
- Optional modules — some features (currently Agents) are backend modules that stay off
unless listed in
N8N_ENABLED_MODULES. Ask only if the user brings one up; if they do, read the modules section ofQUEUE_MODE.mdbefore enabling it, because in queue mode it has to reach the workers as well.
The deploy flow
Work through these in order. SINGLE_MODE.md / QUEUE_MODE.md give the mode-specific command
detail; SECURITY.md covers secret generation and hardening; DAY2.md covers update/backup/restore.
1. Preflight (the cheapest failure is the one you catch here)
- SSH in; confirm the OS is Debian/Ubuntu-like (
. /etc/os-release). - DNS must already point at the box. Compare the box's public IP (
curl -s ifconfig.me) withdig +short <fqdn>(run it from the box AND ideally your laptop). If they don't match, stop — Caddy's ACME challenge will fail. Have the user create the A record, wait for it to propagate, then continue. - Ports 80 and 443 must be reachable from the internet. Check the host firewall AND any cloud security group / network firewall (Hetzner Cloud, AWS SG, etc.) — these are outside the box and a common silent blocker.
Häufige Fragen
Ist das für n8n Cloud?
Nein. Es ist für selbst gehostetes n8n auf Docker, nicht für den gehosteten Dienst n8n Cloud.
Welchen Modus soll ich wählen?
Der Skill fragt zuerst. Der Single-Modus ist am einfachsten und passt zu den meisten kleinen Setups, der Queue-Modus fügt Redis und Postgres für höhere Last hinzu.
Welchen Zugriff braucht er auf dem Server?
Er erwartet root- oder sudo-SSH-Zugriff auf eine frische Ubuntu- oder Debian-Maschine.
Details
Originalbeschreibung des Autors
Deploy a production self-hosted n8n end-to-end to a fresh Linux VM over SSH, using Docker Compose behind a Caddy reverse proxy with automatic HTTPS. Use whenever the user wants to self-host, install, set up, provision, or deploy n8n on their own server/VPS/box (Hetzner, DigitalOcean, AWS EC2, bare metal, etc.) — in either single/regular mode or queue mode with workers — or to update, back up, restore, or harden such an instance. This is for SELF-HOSTED n8n (Docker), not n8n Cloud and not building workflows. The skill makes the agent ask single-vs-queue first, collect the domain/SSH/timezone in
repo: czlonkowski/n8n-mcp
Beliebtheit
- GitHub-Sterne
- 23k
- Platz im Ranking
- #10130
- Lizenz
- MIT
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
n8n-agents
23kBringt deinem Agenten bei, KI-Agenten in n8n gut zu entwerfen, mit dem richtigen Modell, passenden Werkzeugen, Speicher und Ausgabeformat.
n8n-binary-and-data
23kBringt deinem Agenten bei, Dateien wie PDFs und Bilder in n8n-Workflows zu verarbeiten, ohne sie unterwegs zu verlieren.
n8n-code-tool
23kBringt deinem Agenten bei, JavaScript oder Python für ein Custom Code Tool in n8n zu schreiben, das ein KI-Agent aufrufen kann.
n8n-error-handling
23kBringt deinem Agenten bei, n8n-Workflows so aufzubauen, dass Fehler klar, strukturiert und behebbar sind statt stillschweigend zu passieren.
Ähnliche Skills
openclaw-update
394kHilft deinem Agenten, ein bestehendes OpenClaw-Gateway zu aktualisieren, mit der Methode, die zu deiner Installation passt, während deine Sitzung weiterläuft.
diagnose-gateway
394kHilft deinem Agenten herauszufinden, warum dein OpenClaw-Gateway fehlschlägt, indem er Einstellungen, Kanäle und Ports prüft, ohne etwas zu ändern.
crabbox-apps
394kHilft deinem Agenten, eine App auf einer temporären Cloud-Maschine zu öffnen und auszuführen und ihre Ansicht in deinem Chat-Seitenpanel zu zeigen.