Deploy n8n Queue Mode | (Just Updated) Scalable Workflow Automation, Main + Worker + Redis
n8n with a separate worker, Redis queue and Postgres. Scales out.
postgres
Just deployed
/var/lib/postgresql/data
Just deployed
redis
Just deployed
/data
n8n-worker
Just deployed
Deploy and Host n8n Queue Mode on Railway
n8n is a source-available workflow automation platform with 400+ integrations. This template deploys it in queue mode: a main instance serving the editor, webhooks and API, a separate worker that executes workflows, Redis as the job queue, and Postgres for storage.
About Hosting n8n Queue Mode
Four services are wired together on Railway's private network: n8n (editor, webhooks, scheduler), n8n-worker (runs workflow executions, concurrency 10), redis (Bull job queue, password protected, persisted with AOF) and postgres (workflows, credentials and execution history). The main instance enqueues every execution, including manual runs from the editor, and the worker picks it up, so a heavy workflow never blocks the UI or incoming webhooks. Both n8n services share one generated N8N_ENCRYPTION_KEY, so credentials saved by the editor can be decrypted by the worker. Postgres and Redis each have a volume, so workflows, credentials and queued jobs survive redeploys. The first boot runs database migrations and takes a few minutes. Open the public domain and create the owner account. The first visitor becomes the owner, so do this straight after deploying.
Why Deploy n8n Queue Mode 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 Queue Mode 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.
- Editor stays responsive - executions run on the worker, not the process serving your UI and webhooks.
- Scale by adding workers - duplicate the
n8n-workerservice to raise throughput; no re-architecture. - Preconfigured - database, queue, encryption key, webhook URL and volumes are set; nothing to type at deploy.
- Your data stays yours - workflows and credentials live in your own Postgres.
Common Use Cases
- Webhook-heavy automation - receive bursts of webhooks without dropping or slowing the editor.
- Long-running and AI workflows - run slow LLM, scraping or ETL jobs in the background.
- Team automation hub - one shared n8n for scheduled syncs, notifications and internal tools.
Dependencies for n8n Queue Mode Hosting
- Postgres volume at
/var/lib/postgresql/dataand Redis volume at/data(both included). - Enough memory for the main instance and at least one worker.
Deployment Dependencies
- n8n - upstream workflow automation (Sustainable Use License)
- n8n queue mode docs - how main, workers and Redis fit together
- Postgres and Redis - official images
Template Content