---
title: "Deploy n8n v2 (Postgres + Redis + Workers)"
description: "Distributed n8n v2 setup with Postgres, Redis and worker execution"
category: "Automation"
url: https://railway.com/deploy/n8n-v2-postgres-redis-workers
---

# Deploy n8n v2 (Postgres + Redis + Workers)

Distributed n8n v2 setup with Postgres, Redis and worker execution

**[Deploy n8n v2 (Postgres + Redis + Workers) on Railway](https://railway.com/template/n8n-v2-postgres-redis-workers)**

- **Creator:** Mex Delgado
- **Category:** Automation
- **Total deploys:** 20

## Template content

### n8n_primary https://devicons.railway.app/n8n

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

### 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"`

### n8n_worker https://devicons.railway.app/n8n

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

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

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

## Documentation

<img src="https://user-images.githubusercontent.com/65276001/173571060-9f2f6d7b-bac0-43b6-bdb2-001da9694058.png" alt="n8n header" width="100%">

# Deploy and Host n8n v2 (Postgres + Redis + Workers) on Railway

**n8n v2 (Postgres + Redis + Workers)** is a distributed n8n setup using
Postgres for persistence, Redis for queue coordination, and workers for
scalable workflow execution.

---

## About Hosting n8n v2 (Postgres + Redis + Workers)

Hosting n8n v2 with Postgres, Redis, and workers enables a scalable and
production-ready workflow automation platform.  
This setup separates concerns by using Postgres for durable state,
Redis for queue-based execution, and one or more workers to process
workflows asynchronously.

It is well suited for environments with moderate to high execution
volume, concurrent workflows, or long-running tasks.  
Railway simplifies deployment by managing networking, secrets,
health checks, and scaling, allowing you to focus on building and
operating workflows instead of infrastructure.

---

## Common Use Cases

- Event-driven automations using webhooks and background processing
- Scheduled jobs and batch workflows with high concurrency
- API integrations and data synchronization pipelines
- Internal automation platforms for teams or organizations

---

## Dependencies for n8n v2 (Postgres + Redis + Workers) Hosting

- **Postgres** — persistent database for workflows, executions, and credentials
- **Redis** — queue backend for distributed workflow execution
- **n8n workers** — background processors for queued executions

### Deployment Dependencies

- n8n v2 Docker image  
  https://hub.docker.com/r/n8nio/n8n
- Redis (Railway managed service)
- Postgres (Railway managed service)

---

## Why Deploy n8n v2 (Postgres + Redis + 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 v2 (Postgres + Redis + 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.


## 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) — Automate WhatsApp workflows with Evolution API, n8n, and 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-v2-postgres-redis-workers
