n8n-self-hosting
यह क्या करती है
यह AI एजेंट को SSH से एक नए Linux सर्वर पर self-hosted n8n सेट करने के चरणों में ले जाती है, जिसमें सुरक्षित web access के लिए Docker Compose और Caddy इस्तेमाल होते हैं। यह उन लोगों के लिए है जो n8n अपने सर्वर या VPS पर चलाना चाहते हैं।
कब इस्तेमाल करें
- ✓जब आप n8n को किसी cloud सर्वर या VPS पर खुद होस्ट करना चाहें।
- ✓जब आपको सरल single-process सेटअप और workers वाले queue सेटअप में से चुनना हो।
- ✓जब किसी मौजूदा self-hosted n8n को अपडेट या बैक-अप करना हो।
Skill का लिंक
https://github.com/czlonkowski/n8n-mcp/blob/main/data/skills/n8n-self-hosting/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे नए Ubuntu सर्वर पर अपने-आप HTTPS के साथ n8n सेट कीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल सर्वर जाँचती है, Docker इंस्टॉल करती है, प्रोजेक्ट फ़ाइलें और secrets सेट करती है, Caddy के पीछे n8n शुरू करती है, और जाँचती है कि सुरक्षित connection काम कर रहा है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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.
अक्सर पूछे जाने वाले सवाल
क्या यह n8n Cloud के लिए है?
नहीं। यह Docker पर self-hosted n8n के लिए है, होस्ट की गई n8n Cloud सेवा के लिए नहीं।
मुझे कौन सा mode चुनना चाहिए?
स्किल पहले पूछती है। Single mode सबसे सरल है और ज़्यादातर छोटे सेटअप के लिए ठीक है, जबकि queue mode भारी लोड के लिए Redis और Postgres जोड़ता है।
सर्वर पर किस तरह की पहुँच चाहिए?
एक नई Ubuntu या Debian मशीन पर root या sudo SSH पहुँच।
जानकारी
लेखक का मूल विवरण
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
लोकप्रियता
- GitHub स्टार
- 23k
- रैंकिंग में स्थान
- #10130
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
n8n-agents
23kआपके एजेंट को n8n AI एजेंट्स सही तरीके से डिज़ाइन करना सिखाती है, सही model, tools, memory और output format के साथ।
n8n-binary-and-data
23kआपके एजेंट को n8n workflows में PDF और images जैसी फ़ाइलें बिना खोए संभालना सिखाती है।
n8n-code-tool
23kआपके एजेंट को n8n के Custom Code Tool के लिए JavaScript या Python लिखना सिखाती है, जिसे AI एजेंट बुला सके।
n8n-error-handling
23kआपके एजेंट को n8n workflows ऐसे सेट करना सिखाती है कि विफलताएँ चुपचाप न हों, बल्कि साफ़, संरचित और ठीक करने योग्य हों।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।