Railway

Deploy n8n

Deploy n8n workflow automation on Railway with one Docker service.

Deploy n8n

Just deployed

n8n for railway.app

Template Header

n8n is an open-source, extendable workflow automation platform that lets you connect apps, APIs, and services through a visual node-based editor, combining low-code building blocks with the ability to write custom JavaScript/Python where needed. This template deploys n8n on Railway with persistent storage for workflows, credentials, and execution history.

Deploy on Railway

πŸ—οΈ Architecture

flowchart LR
    Client(["🌐 Client"]) -->|HTTPS| Domain["Railway Public Domain"]
    Domain -->|"$PORT β†’ N8N_PORT"| App["Container\nn8nio/n8n:latest"]
    App --> Volume[("Volume\n/home/node/.n8n")]

Environment

VariableRequiredDescription
N8N_ENCRYPTION_KEYProductionSecret key for credential encryption

See .env.example. Railway sets PORT; the image maps it to N8N_PORT at startup.

Optional

Set WEBHOOK_URL to your public HTTPS URL if you use webhooks.

Persistence

railway.toml declares requiredMountPath = "/home/node/.n8n" β€” this holds the SQLite database, the credential encryption key, and workflow data. Attach a Railway volume to that path before production traffic; without it, a redeploy generates a new encryption key and existing credentials become unreadable.

Local

docker build -t railwayapp-n8n .
docker run --rm -e N8N_ENCRYPTION_KEY=dev -p 5678:5678 railwayapp-n8n

Airbyte Apache Airflow CloudBeaver CodiMD Django Email Service FastAPI Flask Flowise GitLab CE Grafana Home Assistant InfluxDB MJML MongoDB Mosquitto MQTT MySQL n8n Node.js Node-RED OpenSearch Open WebUI Outerbase Studio PostgreSQL Redis TYPO3 CMS


Template Content

More templates in this category

View Template
Rocky Linux
[Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. πŸš€

codestorm
40
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51