Deploy n8n Production
Production-ready n8n (Worker + PostgreSQL + Redis) stack for automation
Postgres
railwayapp-templates/postgres-ssl:17
Just deployed
/var/lib/postgresql/data
Redis
railwayapp/redis
Just deployed
/data
n8n Primary Node
n8nio/n8n
Just deployed
n8n Worker Node
n8nio/n8n
Just deployed
Deploy and Host n8n Production on Railway
n8n Production Stack is a scalable, production-ready setup that deploys n8n with PostgreSQL and Redis preconfigured. Designed for reliability, flexibility, and performance, this template gives you a complete automation environment in minutes — ideal for both developers and teams running workflows at scale.
About Hosting n8n Production
This setup combines n8n, PostgreSQL, and Redis into a fully managed, distributed environment optimized for production use.
- PostgreSQL handles workflow data and logs.
- Redis powers the job queue system for distributed executions.
- n8n runs in queue mode with separate worker and UI nodes for scalability and fault tolerance.
Everything comes prelinked using Railway’s built-in environment variables, so you can deploy instantly without manual configuration. If you love tinkering (or just like pretending you know what’s happening under the hood), we’ve left a few knobs for you to twist:
- Execution pruning (
EXECUTIONS_DATA_PRUNE
/EXECUTIONS_DATA_PRUNE_MAX_COUNT
) — how long to keep old workflow runs - Node memory limits (
NODE_OPTIONS
) — for those massive workflow dreams - And a handful of others you can tweak depending on your use case
Common Use Cases
-
Marketing Automation Pipelines
Automatically pull leads from web forms, CRM tools, or email campaigns, clean/transform the data, and update your database — all without manual intervention. -
E-commerce Order & Inventory Workflows
Sync orders between your store, warehouse, and accounting system. Trigger notifications, update stock in real-time, and handle fulfillment workflows reliably. -
Data Integration & ETL Tasks
Aggregate data from APIs, transform it, and store it in PostgreSQL for analytics or dashboards. Perfect for teams that need lightweight, flexible ETL without heavy infrastructure. -
Internal Business Process Automation
Streamline approvals, notifications, or reporting across teams. For example, automatically generate weekly reports from your database and email them to stakeholders. -
Trading & Financial Data Pipelines
Collect real-time stock or crypto market data, store it in PostgreSQL, and trigger alerts or automated trading workflows. Ideal for monitoring portfolios, generating analytics, or running backtests.
Dependencies for n8n Production Hosting
- PostgreSQL – stores workflows, logs, and execution data
- Redis – manages job queues and inter-node communication
Deployment Dependencies
Implementation Details
Each n8n node (Primary and Worker) connects via internal networking.
Queue mode ensures all heavy executions are offloaded to workers for stability.
Environment variables for Redis and PostgreSQL are automatically injected by Railway.
Why Deploy n8n Production 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 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