Railway

Deploy n8n

Deploy n8n workflow automation on Railway with one Docker service.

Deploy n8n

Just deployed

n8n for railway.app

Template Header

Deploy n8n workflow automation on Railway.

Deploy on Railway

Environment

VariableRequiredDescription
N8N_ENCRYPTION_KEYProductionSecret key for credential encryption

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 CodiMD Django Email Service FastAPI Flask Flowise GitLab CE Grafana Home Assistant InfluxDB MongoDB Mosquitto MQTT MySQL n8n Node-RED Node.js OpenSearch 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
33
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