[PR #1029] feat: add n8n queue mode template (scalable workers) #16337

Open
opened 2026-07-14 23:19:41 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Dokploy/templates/pull/1029
Author: @Siumauricio
Created: 7/14/2026
Status: 🔄 Open

Base: canaryHead: feat/n8n-queue


📝 Commits (1)

  • fe94f4c feat: add n8n queue mode template

📊 Changes

5 files changed (+199 additions, -0 deletions)

View changed files

blueprints/n8n-queue/docker-compose.yml (+124 -0)
blueprints/n8n-queue/instructions.md (+24 -0)
blueprints/n8n-queue/meta.json (+18 -0)
blueprints/n8n-queue/n8n.png (+0 -0)
blueprints/n8n-queue/template.toml (+33 -0)

📄 Description

Summary

Adds a new n8n Queue Mode template (blueprints/n8n-queue) implementing n8n's official queue mode for high-throughput production workloads:

  • n8n (main, n8nio/n8n:2.30.4 — current stable/latest): editor UI + webhooks, publishes executions to the queue (EXECUTIONS_MODE=queue, OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS=true).
  • n8n-worker (command: worker): scalable worker pool, deploy.replicas driven by the N8N_WORKER_REPLICAS env var (default 2) — users scale by changing one env var in Dokploy and redeploying (same pattern as the windmill/erpnext templates).
  • redis:7-alpine: Bull queue broker, password-protected (--requirepass), healthchecked.
  • postgres:17-alpine: shared database, healthchecked.
  • Shared auto-generated N8N_ENCRYPTION_KEY, healthchecks on every service (/healthz on main and workers via QUEUE_HEALTH_CHECK_ACTIVE=true), workers start only after the main instance is healthy (migrations done).
  • instructions.md documents how to scale workers and how to add optional dedicated webhook processors.

Note: the Clevermation repo referenced in the issue (autoscaler/monitor images) no longer exists on GitHub, so this template follows the official n8n queue-mode documentation with the official n8nio/n8n image instead, pinned to the current stable release. Config was tuned against 2.30.4's deprecation warnings (N8N_WEBHOOK_URL instead of WEBHOOK_URL, no obsolete N8N_RUNNERS_ENABLED).

Test evidence

Local end-to-end (docker compose, fresh volumes):

  • All 5 containers healthy (postgres, redis, n8n main, 2 workers).
  • Workers log n8n worker is now ready (concurrency 10) and connect to Redis.
  • Created the owner account, created + activated a webhook workflow, fired the production webhook 3 times → all three executions succeeded and were distributed across both workers:
    • n8n-worker-1: Worker started execution 2 (job 2)Worker finished execution 2 (job 2)
    • n8n-worker-2: Worker started execution 1 (job 1) / Worker started execution 3 (job 3) → both finished
    • /rest/executions: 3× success, mode webhook.
  • Env-driven scaling verified: changing N8N_WORKER_REPLICAS changes the number of worker replicas.

Deployed on a Dokploy demo instance from this exact blueprint (template import API):

  • composeStatus: done in 175s; all 5 containers running (n8n, n8n-worker x2, redis, postgres).
  • UI: HTTP 200 on the generated domain — «n8n.io - Workflow Automation» (owner setup page).
  • Both remote workers log n8n worker is now ready (Version: 2.30.4, Concurrency: 10) after connecting to Redis, with no config-related deprecation warnings.

node build-scripts/generate-meta.js --check passes (490 templates validated).

Closes #455

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Dokploy/templates/pull/1029 **Author:** [@Siumauricio](https://github.com/Siumauricio) **Created:** 7/14/2026 **Status:** 🔄 Open **Base:** `canary` ← **Head:** `feat/n8n-queue` --- ### 📝 Commits (1) - [`fe94f4c`](https://github.com/Dokploy/templates/commit/fe94f4ce0b30f049a329736fcb4cc971e71c0861) feat: add n8n queue mode template ### 📊 Changes **5 files changed** (+199 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `blueprints/n8n-queue/docker-compose.yml` (+124 -0) ➕ `blueprints/n8n-queue/instructions.md` (+24 -0) ➕ `blueprints/n8n-queue/meta.json` (+18 -0) ➕ `blueprints/n8n-queue/n8n.png` (+0 -0) ➕ `blueprints/n8n-queue/template.toml` (+33 -0) </details> ### 📄 Description ## Summary Adds a new **n8n Queue Mode** template (`blueprints/n8n-queue`) implementing [n8n's official queue mode](https://docs.n8n.io/hosting/scaling/queue-mode/) for high-throughput production workloads: - **n8n** (main, `n8nio/n8n:2.30.4` — current `stable`/`latest`): editor UI + webhooks, publishes executions to the queue (`EXECUTIONS_MODE=queue`, `OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS=true`). - **n8n-worker** (`command: worker`): scalable worker pool, `deploy.replicas` driven by the `N8N_WORKER_REPLICAS` env var (default `2`) — users scale by changing one env var in Dokploy and redeploying (same pattern as the windmill/erpnext templates). - **redis:7-alpine**: Bull queue broker, password-protected (`--requirepass`), healthchecked. - **postgres:17-alpine**: shared database, healthchecked. - Shared auto-generated `N8N_ENCRYPTION_KEY`, healthchecks on every service (`/healthz` on main and workers via `QUEUE_HEALTH_CHECK_ACTIVE=true`), workers start only after the main instance is healthy (migrations done). - `instructions.md` documents how to scale workers and how to add optional dedicated webhook processors. Note: the Clevermation repo referenced in the issue (autoscaler/monitor images) no longer exists on GitHub, so this template follows the official n8n queue-mode documentation with the official `n8nio/n8n` image instead, pinned to the current stable release. Config was tuned against 2.30.4's deprecation warnings (`N8N_WEBHOOK_URL` instead of `WEBHOOK_URL`, no obsolete `N8N_RUNNERS_ENABLED`). ## Test evidence Local end-to-end (docker compose, fresh volumes): - All 5 containers healthy (postgres, redis, n8n main, 2 workers). - Workers log `n8n worker is now ready` (concurrency 10) and connect to Redis. - Created the owner account, created + activated a webhook workflow, fired the production webhook 3 times → all three executions succeeded **and were distributed across both workers**: - `n8n-worker-1`: `Worker started execution 2 (job 2)` → `Worker finished execution 2 (job 2)` - `n8n-worker-2`: `Worker started execution 1 (job 1)` / `Worker started execution 3 (job 3)` → both finished - `/rest/executions`: 3× `success`, mode `webhook`. - Env-driven scaling verified: changing `N8N_WORKER_REPLICAS` changes the number of worker replicas. Deployed on a Dokploy demo instance from this exact blueprint (template import API): - `composeStatus: done` in 175s; all 5 containers running (`n8n`, `n8n-worker` x2, `redis`, `postgres`). - UI: HTTP 200 on the generated domain — «n8n.io - Workflow Automation» (owner setup page). - Both remote workers log `n8n worker is now ready` (`Version: 2.30.4`, `Concurrency: 10`) after connecting to Redis, with no config-related deprecation warnings. `node build-scripts/generate-meta.js --check` passes (490 templates validated). Closes #455 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-14 23:19:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/templates#16337