n8n-self-hosting
Ce qu’il fait
Cette skill guide un agent IA pour installer n8n auto-hébergé sur un serveur Linux neuf via SSH, avec Docker Compose et Caddy pour un accès web sécurisé. Elle s'adresse aux personnes qui veulent faire tourner n8n sur leur propre serveur ou VPS.
Quand l’utiliser
- ✓Quand vous voulez héberger n8n vous-même sur un serveur cloud ou un VPS.
- ✓Quand vous devez choisir entre une configuration simple à un seul processus et une configuration en file d'attente avec des workers.
- ✓Quand vous devez mettre à jour ou sauvegarder une installation n8n auto-hébergée existante.
Lien du skill
https://github.com/czlonkowski/n8n-mcp/blob/main/data/skills/n8n-self-hosting/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Je voudrais installer n8n sur mon nouveau serveur Ubuntu, avec HTTPS automatique.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
La skill vérifie le serveur, installe Docker, met en place les fichiers du projet et les secrets, démarre n8n derrière Caddy, puis vérifie que la connexion sécurisée fonctionne.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis 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.
Questions fréquentes
Est-ce pour n8n Cloud ?
Non. C'est pour n8n auto-hébergé sur Docker, et non pour le service hébergé n8n Cloud.
Quel mode choisir ?
La skill pose d'abord la question. Le mode simple convient à la plupart des petites installations, tandis que le mode file d'attente ajoute Redis et Postgres pour une charge plus lourde.
Quel accès faut-il sur le serveur ?
Elle attend un accès SSH root ou sudo sur une machine Ubuntu ou Debian neuve.
Détails
Description originale de l’auteur
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
Popularité
- Étoiles GitHub
- 23k
- Position au classement
- #10130
- Licence
- MIT
- Mis à jour
- 02/11/2026
Commentaires
- …
Autres skills de ce dépôt
n8n-agents
23kApprend à votre agent à bien concevoir des agents IA n8n, avec le bon modèle, les bons outils, la mémoire et le bon format de sortie.
n8n-binary-and-data
23kApprend à votre agent à traiter dans les workflows n8n des fichiers comme les PDF et les images, sans les perdre en cours de route.
n8n-code-tool
23kApprend à votre agent à écrire du JavaScript ou du Python pour un Custom Code Tool de n8n, que l'agent IA peut appeler.
n8n-error-handling
23kApprend à votre agent à configurer les workflows n8n pour que les échecs soient clairs, structurés et récupérables, au lieu de passer inaperçus.
Skills similaires
openclaw-update
394kAide votre agent à mettre à jour une passerelle OpenClaw existante, en choisissant la méthode adaptée à son installation et en gardant votre session active.
diagnose-gateway
394kAide votre agent à trouver pourquoi votre passerelle OpenClaw échoue, en vérifiant les paramètres, les canaux et les ports sans rien modifier.
crabbox-apps
394kAide votre agent à ouvrir et exécuter une application sur une machine cloud temporaire, puis à afficher sa vue dans le panneau latéral de votre chat.