Deploy n8n | Queue Mode Workflow Automation (Make Alternative)
Zapier alternative: worker, Postgres, Redis, locked owner, tested updates
n8n Worker
Just deployed
Just deployed
Redis
Just deployed
/data
Just deployed
/var/lib/postgresql/data
Deploy and Host n8n (Queue Mode Workflow Automation, Zapier and Make Alternative) on Railway
n8n is a workflow automation tool with 400+ integrations, AI agents and a visual editor. Connect apps and APIs, react to webhooks, run jobs on a schedule, and write JavaScript where you need it. It is a self-hosted alternative to Zapier and Make, with no limit on executions and your data on your own server.
About Hosting n8n
This template runs n8n in queue mode: the n8n service serves the editor and takes webhooks, and a separate n8n Worker runs every execution. Postgres and Redis sit on Railway's private network, each with its own volume.
A plain n8n install shows a setup page where the first visitor becomes the owner. This template creates the owner from N8N_OWNER_EMAIL and a generated password on the first boot, so that page never opens.
After deploying:
- Open the n8n service's public URL.
- Log in with
N8N_OWNER_EMAILandN8N_OWNER_PASSWORDfrom the n8n service's Variables tab. - Build a workflow and publish it.
A GitHub Action checks for new stable n8n releases every day and smoke-tests each one before it reaches you. Railway then shows an update notice in your project, and you apply it when it suits you.
Common Use Cases
- Replace Zapier or Make and stop paying per task
- Sync data between a CRM, a database and a spreadsheet
- Receive webhooks from Stripe, GitHub or forms and act on them
- Build AI agents that call your tools and APIs
- Run scheduled reports and cleanup jobs
Dependencies for n8n Hosting
- Postgres for workflows, credentials, execution history and binary data
- Redis for the queue between the main and the workers
- Optional: SMTP to send user invites
Deployment Dependencies
- n8n: https://github.com/n8n-io/n8n
- n8n docs: https://docs.n8n.io/hosting/
- Queue mode docs: https://docs.n8n.io/hosting/scaling/queue-mode/
- Template source: https://github.com/railhost/n8n-railway
Implementation Details
Both n8n services build from the same image; N8N_PROCESS=worker makes one of them a worker. Binary data is stored in Postgres, so neither n8n service needs a volume, and you can add worker replicas for more throughput. Each worker runs up to 10 executions at once.
n8n resets the owner to N8N_OWNER_EMAIL and N8N_OWNER_PASSWORD on every start, so change your login in the variables. Never change N8N_ENCRYPTION_KEY: it encrypts saved credentials. Update the main and the worker together.
Why Deploy n8n 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 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
n8n Worker
railhost/n8n-railwayRedis
redis:8.2