Deploy n8n Production Setup with Workers

Production-ready latest n8n with workers, Redis & Postgres - Nov 2026

Deploy n8n Production Setup with Workers

Just deployed

Just deployed

/home/node/.n8n

redis for n8n

redis:8.2.11

Just deployed

/data

Just deployed

/var/lib/postgresql/data

Deploy and Host n8n Production Setup with Workers on Railway

n8n Production Setup with Workers is a production deployment of n8n on Railway using queue mode: a main instance for the editor, API and webhooks, dedicated worker services that execute workflows, Redis for the queue, and PostgreSQL for workflows, credentials and execution history. It is built for automations that need to keep running when one of them is slow.

About Hosting n8n Production Setup with Workers

In queue mode, the work of running a workflow is separated from the instance you interact with.

The main service, named n8n admin, serves the editor UI, authentication, the REST API and webhook endpoints, and decides what needs to run. The n8n worker service pulls jobs from Redis and executes them, so a long-running workflow never blocks the editor or delays a webhook. Redis carries the queue, and PostgreSQL stores workflows, credentials and execution data.

Everything the deploy needs is generated for you: the Postgres and Redis passwords, and the n8n encryption key that protects stored credentials. The worker reads that same key from the main service, which is what lets it decrypt the credentials a workflow uses, and it is also the value to keep a copy of if you ever migrate the stack elsewhere.

Volumes are attached to Postgres, Redis and the main n8n instance, so workflows, queued jobs and local n8n state survive redeploys. Execution history is pruned automatically: the defaults keep 14 days or 10,000 executions, whichever comes first, which stops the database growing without limit on a busy instance.

Common Use Cases

  • AI agents and assistants: orchestrate LLM calls, tools and human approval steps, with the queue absorbing slow model responses
  • Webhook processing at scale: receive and process webhooks without the main instance blocking while a workflow runs
  • Scheduled ETL and system integrations: move data between systems on a schedule, retrying what fails
  • Agents with a knowledge base: pair with the Vector Knowledge Base API template, deployed into this same project. An HTTP Request tool node reaches it over the private network, giving an agent semantic search over your own documents with no embedding provider key and nothing exposed publicly

Dependencies for n8n Production Setup with Workers Hosting

This template includes everything it needs:

  • n8n main instance and a worker, on a pinned image rather than a floating tag
  • PostgreSQL with a volume
  • Redis with a volume and a password
  • Persistent storage for n8n's own state

Deployment Dependencies

Implementation Details

After the deploy finishes, open the n8n admin service's domain and create the owner account. That first account is the instance owner, so do it before sharing the URL.

To handle more concurrent executions, raise the replica count on n8n worker rather than making it bigger: every replica pulls from the same Redis queue. n8n admin stays at one replica: running several main instances needs n8n's multi-main setup.

Both n8n services run the same pinned image and share the same database, Redis and encryption key, so when you upgrade, change the image tag on both together.

Useful variables on n8n admin:

  • EXECUTIONS_DATA_MAX_AGE and EXECUTIONS_DATA_PRUNE_MAX_COUNT control how much execution history is kept
  • EXECUTIONS_TIMEOUT and EXECUTIONS_TIMEOUT_MAX cap how long a single execution may run
  • N8N_WEBHOOK_URL and N8N_EDITOR_BASE_URL are already pointed at the Railway domain, and need updating only if you put a custom domain in front

Why Deploy n8n Production Setup with Workers on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying n8n Production Setup with Workers on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
N8N Main + Worker
Deploy and Host N8N with Inactive worker.

jakemerson
121
View Template
Evolution API with n8n
Automate WhatsApp workflows with Evolution API, n8n, and Postgres.

codestorm
113
View Template
Postgres Backup
Cron-based PostgreSQL backup to bucket storage

Railway Templates
866