Deploy n8n Production Setup with Workers
Production-ready latest n8n with workers, Redis & Postgres - Nov 2026
n8n worker
Just deployed
n8n admin
Just deployed
/home/node/.n8n
redis for n8n
Just deployed
/data
postgres for n8n
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
- n8n queue mode and scaling: https://docs.n8n.io/hosting/scaling/queue-mode/
- n8n environment variables: https://docs.n8n.io/hosting/configuration/environment-variables/
- n8n integrations: https://n8n.io/integrations
- Railway image auto updates: https://docs.railway.com/deployments/image-auto-updates
- Railway documentation: https://docs.railway.com
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_AGEandEXECUTIONS_DATA_PRUNE_MAX_COUNTcontrol how much execution history is keptEXECUTIONS_TIMEOUTandEXECUTIONS_TIMEOUT_MAXcap how long a single execution may runN8N_WEBHOOK_URLandN8N_EDITOR_BASE_URLare 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
n8n worker
n8nio/n8n:2.48.4n8n admin
n8nio/n8n:2.48.4redis for n8n
redis:8.2.11postgres for n8n
ghcr.io/railwayapp-templates/postgres-ssl:18