---
title: "Deploy n8n"
description: "n8n [July '5] (Workflows/Integrations/API Automation/AI Coding) Self Host"
category: "Automation"
url: https://railway.com/deploy/n8n-worker-binary-storage
---

# Deploy n8n

n8n [July '5] (Workflows/Integrations/API Automation/AI Coding) Self Host

**[Deploy n8n on Railway](https://railway.com/template/n8n-worker-binary-storage)**

- **Creator:** Muhammad Bilal
- **Category:** Automation
- **Total deploys:** 11

## Template content

### Worker

- **Image:** n8nio/n8n:stable

### Postgres

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:13.23
- **Start command:** `/bin/sh -c "unset PGPORT; docker-entrypoint.sh postgres --port=5432"`

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

### Primary

- **Image:** n8nio/n8n:stable
- **Public domain:** Yes

## Documentation

# Deploy and Host N8N (Worker, Binary Storage) on Railway

n8n is a "fair-code" workflow automation platform blending no-code speed with code flexibility. In high-performance setups, **Workers** execute heavy tasks asynchronously to prevent blocking the main instance. **Binary Storage** is configured to save files to a **persistent local disk** , ensuring fast, low-latency access for both the main instance and workers without external cloud dependencies.

## About Hosting N8N (Worker, Binary Storage)

Hosting n8n in this configuration involves deploying **Queue Mode** to maximize throughput. You run a main **Editor/Webhook** instance that handles incoming traffic and immediately delegates workflow executions to separate **Worker** nodes via a Redis message broker.

## Common Use Cases

* **Local Document OCR &amp; Parsing:** Ingesting scanned PDFs via webhook, saving them to local disk, and having a worker run OCR tools (like Tesseract) without slowing down the dashboard.
* **High-Frequency IoT Data Processing:** Collecting sensor data streams rapidly on the main node while workers process, aggregate, and write the data to the database in the background.
* **Privacy-First Media Conversion:** Transcoding video or resizing images on-premise (keeping data off the cloud), where workers grind through the CPU-intensive tasks using local file access.

## Dependencies for N8N (Worker, Binary Storage) Hosting

* **PostgreSQL:** The relational database for storing workflow structures, credentials, and execution logs.
* **Redis:** The message broker used to pass execution job data from the Main instance to the Workers.
* **Shared Persistent Volume:** A file system is accessible to read/write binary data.

### Deployment Dependencies

* [Official n8n Scaling Documentation (Queue Mode)](https://docs.n8n.io/hosting/scaling/)
* [Binary Data Configuration Options](https://docs.n8n.io/hosting/scaling/binary-data/)

## Why Deploy N8N (Worker, Binary Storage) 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 (Worker, Binary Storage) 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-worker-binary-storage
