---
title: "Deploy n8n — Queue Mode, Workers, Webhooks & Task Runners"
description: "Production-ready n8n with Redis queue, workers, webhooks, and task runners"
category: "Automation"
url: https://railway.com/deploy/n8n-scalable-queue-mode-workers-webhooks
---

# Deploy n8n — Queue Mode, Workers, Webhooks & Task Runners

Production-ready n8n with Redis queue, workers, webhooks, and task runners

**[Deploy n8n — Queue Mode, Workers, Webhooks & Task Runners on Railway](https://railway.com/template/n8n-scalable-queue-mode-workers-webhooks)**

- **Creator:** Vamos Automatizar
- **Category:** Automation
- **Total deploys:** 20

## Template content

### n8n-webhook https://raw.githubusercontent.com/lobehub/lobe-icons/refs/heads/master/packages/static-png/dark/n8n-color.png

- **Image:** n8nio/n8n:latest
- **Start command:** `n8n webhook`

### n8n-editor https://raw.githubusercontent.com/lobehub/lobe-icons/refs/heads/master/packages/static-png/dark/n8n-color.png

- **Image:** n8nio/n8n:latest
- **Start command:** `n8n`
- **Health check:** /healthz
- **Public domain:** Yes

### n8n-worker https://raw.githubusercontent.com/lobehub/lobe-icons/refs/heads/master/packages/static-png/dark/n8n-color.png

- **Image:** n8nio/n8n:latest
- **Start command:** `n8n worker`

### n8n-runner https://raw.githubusercontent.com/lobehub/lobe-icons/refs/heads/master/packages/static-png/dark/n8n-color.png

- **Image:** n8nio/runners:latest

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2.1
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:17

## Documentation

# Deploy and Host n8n on Railway

**n8n** is an open-source workflow automation platform that enables you to connect apps, automate business processes, and build AI-powered workflows with full flexibility. It combines the ease of no-code tools with the power of custom code, making it ideal for developers and teams who need scalable automation.

This template deploys a **production-ready, scalable n8n architecture** on Railway, including queue mode, workers, webhooks, and external task runners.

Official documentation:  
https://docs.n8n.io/

---

## About Hosting

Hosting n8n gives you complete control over your automation infrastructure while maintaining flexibility and scalability. You can run workflows with custom logic, integrate with hundreds of services, and extend functionality using code nodes or community packages.

This template deploys n8n using a **distributed architecture** designed for production workloads:

- Editor service (main UI & API)
- Worker service (execution processing)
- Webhook service (high-performance triggers)
- External Task Runners (isolated code execution)

Running n8n on Railway allows you to leverage managed infrastructure, automatic networking, and persistent storage without managing servers manually.

---

## Why Deploy

Deploying n8n on Railway combines the power of open-source automation with the simplicity of managed infrastructure.

Benefits include:

- Managed PostgreSQL and Redis support
- Persistent volumes for workflow data
- Automatic networking between services
- Easy scaling of workers and runners
- Built-in monitoring and logs
- Simple environment variable management
- Production-ready deployment in minutes

This makes Railway an excellent platform for teams, agencies, startups, and enterprises that need reliable automation infrastructure.

---

## Architecture Overview

This template includes a scalable multi-service deployment:

- **Editor** — Main n8n interface and API
- **Worker** — Executes workflows in queue mode
- **Webhook** — Dedicated service for incoming triggers
- **Task Runners** — External isolated execution for Code nodes (JS & Python)
- **PostgreSQL** — Workflow database
- **Redis** — Queue and execution broker

Queue mode ensures high performance and reliability under heavy workloads.

---

## Common Use Cases

### Business Automation
Automate repetitive processes across tools like CRMs, databases, and SaaS platforms.

### AI-Powered Workflows
Integrate LLMs, AI agents, embeddings, and automation pipelines.

### Marketing Automation
Automate campaigns, lead capture, segmentation, and customer journeys.

### Sales & CRM
Sync data between systems, automate follow-ups, and manage pipelines.

### Customer Support
Trigger workflows from helpdesk events and automate responses.

### DevOps & IT Automation
Automate deployments, monitoring alerts, and infrastructure tasks.

### Data Integration & ETL
Move and transform data between APIs, databases, and analytics tools.

---

## Dependencies for

This template requires the following core capabilities:

- Workflow orchestration and execution
- Persistent database storage
- Queue system for distributed processing
- External execution environment for isolated code tasks

### Deployment Dependencies

#### PostgreSQL
Primary database for workflows, credentials, and execution data.

#### Redis
Queue backend for distributed workflow execution and task coordination.

---

## Task Runners (External Execution)

This template includes **external task runners**, which provide:

- Isolated execution for Code nodes
- Support for JavaScript and Python tasks
- Better scalability
- Improved security
- Reduced load on main services

External runners are recommended for production deployments.

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

---

## License

n8n is distributed under the **Sustainable Use License**.

This license allows free usage for personal and internal business automation while protecting the project from being offered as a competing SaaS product.

More details:  
https://docs.n8n.io/reference/license/

---

## Documentation

Official Documentation  
https://docs.n8n.io/

Deployment & Architecture  
https://docs.n8n.io/hosting/

AI & Advanced Usage  
https://docs.n8n.io/advanced-ai/

---

## Production Ready Template

This Railway template is designed for:

- High availability
- Scalability
- AI workloads
- Automation agencies
- Enterprise automation
- Developers building automation platforms

---

## Need Help?

If you encounter issues, consult the official documentation or community resources:

- https://docs.n8n.io/
- https://community.n8n.io/

## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Build a WhatsApp automation platform with Evolution API, n8n & Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/n8n-scalable-queue-mode-workers-webhooks
