logo
icon

N8N v2 with Worker & Task Runners

N8N v2 workflow automation with worker and external task runners for secure code execution

template cover
Deployed586 times
Publisherglasschan
Created2025-03-04
Services
service icon
service icon
service icon
service icon
service icon
service icon
Tags
AutomationWorkflowN8N v2Task RunnersCode Execution

N8N v2 with Worker & Task Runners (create by SEAFOODHOLDHAND)

N8N with Worker

N8N v2 is a powerful workflow automation platform that helps you connect different services and automate tasks. This template includes:

  • N8N v2 main instance for workflow management (latest version)
  • N8N worker for processing background tasks
  • External Task Runners for secure Code node execution (production-ready setup)
  • PostgreSQL database for data storage
  • Redis for queue management

Why External Task Runners?

This template uses external task runners - N8N's recommended production setup for executing code in Code nodes:

  • 🔒 Enhanced Security: Code runs in isolated containers, separate from your main N8N instance
  • ⚡ Better Performance: Task runners can scale independently based on workload
  • 🛡️ Sandboxed Execution: JavaScript and Python code execute in controlled environments
  • 🔄 Auto-Shutdown: Idle runners automatically shut down after 15 seconds to save resources
  • 📊 Production Ready: Follows N8N's best practices for production deployments

With N8N v2, you can:

  • Create automated workflows with the visual editor
  • Connect to hundreds of services and APIs
  • Execute custom JavaScript and Python code securely in Code nodes
  • Process data and automate tasks with reliable background workers
  • Handle webhook-triggered workflows efficiently

The worker + task runner setup ensures your automation tasks are processed reliably and securely.

Update Log

2026-03-24

  • Fixed Code node timeout: Task runner broker URIs were using hardcoded service names (http://N8N:5679, http://Worker:5679) which don't resolve on Zeabur's internal network. Changed to use ${CONTAINER_HOSTNAME} via exposed variables (N8N_BROKER_HOST, WORKER_BROKER_HOST), matching the pattern already used for PostgreSQL and Redis connections
  • Added QUEUE_HEALTH_CHECK_ACTIVE=true to N8N and Worker services (from official docker-compose)

2026-03-23

  • Fixed service dependencies placement to comply with Zeabur template schema (moved from inside spec to service level)
  • Removed deprecated N8N_RUNNERS_ENABLED environment variable
  • Fixed task runner architecture: Split single Runners into N8N-Runners and Worker-Runners, matching the official n8n docker-compose setup

2025-12-28

  • Template updated for N8N v2 compatibility
  • Upgraded to external task runners (N8N_RUNNERS_MODE=external)
  • Added TASK_RUNNERS_AUTH_TOKEN for secure broker-runner authentication
  • Added OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS=true for future compatibility

2025-03-17

  • Fixed N8N_ENCRYPTION_KEY mismatch between n8n main instance and worker
  • Added ability to manually set N8N_ENCRYPTION_KEY for both main instance and workers

Learn more about task runners: https://docs.n8n.io/hosting/configuration/task-runners/

If you encounter any issues during deployment, please let me know via GitHub issues: https://github.com/glasschan/seafoodholdhand-zeabur-templates