Deploy n8n w/ workers
n8n self-hosted on Railway for a marketplace template
Just deployed
/home/node/.n8n
Redis
Just deployed
/data
n8n-worker
Just deployed
Just deployed
/var/lib/postgresql/data
Deploy and Host self hosted n8n (Open-Source Workflow Automation Platform) on Railway
n8n is a fair-code workflow automation platform with a visual editor, 400+ integrations, native webhooks, and Code nodes in JavaScript and Python. Build pipelines that move data between apps, APIs, and AI models without Zapier's per-task pricing. n8n is a self-hosted alternative to Zapier and Make, and this template ships production queue mode with a dedicated worker.
About Hosting n8n open-source software on Railway (self hosted n8n template)
Self hosting n8n means credentials, workflows, and execution history stay on infrastructure you control. There is no per-execution SaaS meter and no vendor lock-in on your automation graph. Railway provisions the editor, worker, PostgreSQL, and Redis, wires private networking, attaches a persistent volume, and issues an HTTPS domain so you can open the editor and create the owner account in minutes.
Why Deploy n8n, the Zapier alternative on Railway (Railway Free Trial)
Instead of paying Zapier or Make per task or per operation, you run unlimited Community workflows and pay only for compute. On Railway the n8n self hosting cost stays transparent, and the $5 GitHub signup trial is enough to deploy and test a webhook before you commit.
Railway vs Other Hosting Providers and VPS for n8n self hosting
| Provider | What You Get with Railway | What You Get with the Other Provider |
|---|---|---|
| DigitalOcean | One-click editor, worker, Postgres, and Redis with auto HTTPS | Droplets to size, Docker Compose, Nginx, and TLS to stitch by hand |
| AWS | Transparent usage pricing, no ECS/IAM/VPC puzzle | Powerful but ECS, ALB, ElastiCache, and RDS to wire yourself |
| Hetzner | Managed queue-mode stack, healthchecks, and a public domain | Excellent price per core, full sysadmin work for workers and Redis |
Common Use Cases for hosted n8n
Here are common use cases for the open-source workflow automation platform:
- Replacing Zapier or Make with self hosted n8n so CRMs, Slack, email, and internal APIs run without per-task fees.
- Inbound webhooks and OAuth callbacks on the Railway HTTPS domain, with WEBHOOK_URL pointing at the public editor.
- Scheduled jobs, ETL, and AI agent pipelines that offload long runs to the n8n-worker instead of blocking the UI.
- Connecting 400+ nodes plus custom Code nodes for SaaS, Postgres, HTTP APIs, and LLMs on infrastructure you own.
Dependencies for n8n Docker hosted on Railway
When hosting n8n on Railway in queue mode you need PostgreSQL, Redis, the n8n editor, and at least one n8n-worker. Workflows, credentials, and execution history persist in Postgres; encryption material and instance config persist on the n8n-data volume at /home/node/.n8n.
Deployment Dependencies for Managed n8n Service (OSS Workflow Automation)
A managed n8n service on Railway requires four services: n8n editor (n8nio/n8n:2.36.8) on port 5678, n8n-worker (same image, start command n8n worker), Postgres (ghcr.io/railwayapp-templates/postgres-ssl:18), and Redis (redis:8.2). Queue mode uses EXECUTIONS_MODE=queue, Redis via QUEUE_BULL_REDIS_*, and OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS=true so canvas runs go to workers too.
Implementation Details for n8n (Using n8n official docker image)
This template runs the official n8nio/n8n:2.36.8 image with Railway-managed Postgres and Redis over private networking. The editor listens on 5678 behind a Railway-generated HTTPS domain. Key variables include DB_TYPE=postgresdb, QUEUE_BULL_REDIS_HOST (and related Redis settings), N8N_ENCRYPTION_KEY shared by editor and worker, WEBHOOK_URL set to https:///, N8N_HOST, and N8N_PROTOCOL=https. Keep the encryption key stable: rotating it makes stored credentials unreadable until you re-enter them. Scale by adding n8n-worker replicas or raising CPU/RAM; N8N_CONCURRENCY_PRODUCTION_LIMIT caps parallel runs. Postgres and Redis stay on Railway private networking; only the n8n editor is public over HTTPS.
How does n8n compare against other Workflow Automation platforms
n8n vs Zapier (Zapier Alternative)
- Cost & Executions: Zapier bills per task. Self hosted n8n has no per-execution fee; you pay Railway for the four services.
- Data Ownership: Credentials and workflow JSON live in your Postgres. Zapier keeps them in its cloud.
n8n vs Make (Make Alternative)
- Pricing Model: Make charges per operation. n8n Community is unlimited on your hardware.
- Self Hosting: n8n can be self hosted in queue mode; Make is SaaS-only.
n8n vs Activepieces (Activepieces Alternative)
- Queue Architecture: This template ships Redis plus a dedicated worker. Activepieces is simpler to start but less of a production queue story.
- Ecosystem: n8n has a larger node catalog, Code nodes, and a mature webhook and OAuth story.
n8n vs Building In-House
- Engineering Cost: Homegrown cron and webhook glue becomes a product of its own. n8n gives the editor, retries, credentials, and execution log immediately.
- Time to Market: A production webhook-to-Slack or CRM sync is a canvas, not a weekend of workers and dead-letter queues.
How to use n8n (the OSS Workflow Automation platform)?
After deploy, open the Railway-generated HTTPS domain for the n8n editor. The first visitor creates the owner account — there is no default password. Confirm WEBHOOK_URL matches that public origin so inbound webhooks and OAuth redirects resolve. Build a workflow, add a Webhook or Schedule trigger, and run it; the worker executes while the editor stays responsive. Use this template for production n8n with Postgres, Redis, and a worker, not a SQLite toy.
How to self host n8n on other VPS Services (n8n self hosting guide)
Clone the Repository
Download n8n from GitHub or pull n8nio/n8n:2.36.8 from Docker Hub. Official docs live at docs.n8n.io.
Install Dependencies
Install Docker and Docker Compose. Queue mode needs PostgreSQL, Redis, the editor, and a worker process. Do not expose Postgres or Redis to the public internet.
Configure Environment Variables
Set queue, database, webhook, and encryption settings such as:
EXECUTIONS_MODE=queueOFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS=trueDB_TYPE=postgresdbQUEUE_BULL_REDIS_HOSTN8N_ENCRYPTION_KEYWEBHOOK_URLN8N_PROTOCOL=httpsKeep the encryption key identical on editor and worker, and back it up with the volume.
Start the n8n Application
Run the editor on port 5678 and start workers with n8n worker. Put TLS in front of the editor. With Railway and this template, all of this is handled automatically.
Official Pricing of n8n (n8n pricing)
n8n Community is source-available under the Sustainable Use License and free to self-host for internal use. There is no per-execution charge. You only pay for the infrastructure running it. n8n also offers n8n Cloud and paid Business or Enterprise keys for SSO and governance. This template is the Community queue-mode stack.
n8n cloud vs self hosted comparison (Pricing, features, costs, and more)
n8n Cloud meters executions and caps workflows by plan. Self hosted n8n on Railway gives full control, no Community execution cap, and a worker you can scale yourself. Self hosting is usually cheaper once volume grows, and credentials never leave your project.
Monthly cost of self hosting n8n on Railway
The n8n self hosting cost on Railway is typically $15-$35/month for editor, worker, PostgreSQL, and Redis at modest volume. Heavy webhook traffic or extra worker replicas push it higher. There is still no per-execution software fee on top.
System Requirements for Hosting n8n on a VPS
Queue-mode n8n wants at least 2 vCPUs, 4GB RAM, Docker, persistent storage for Postgres and /home/node/.n8n, and Redis reachable on the private network. Port 5678 is the editor. Treat N8N_ENCRYPTION_KEY as a secret: losing it locks you out of stored credentials.
Frequently Asked Questions (FAQs)
What is n8n self hosted?
n8n self hosted means running the Community editor and worker on your own infrastructure (Railway, VPS, or Docker) instead of n8n Cloud. Workflows, credentials, and history stay in your Postgres, encrypted with N8N_ENCRYPTION_KEY, and webhooks hit your domain.
How much does n8n self hosting cost on Railway?
Typically $15-$35/month for the four-service stack, scaling with worker size and volume, with no per-task fee.
Is n8n free to use?
Yes, for internal self-hosting under the Sustainable Use License. You pay Railway (or any VPS) for compute. n8n Cloud and Business/Enterprise are optional paid products.
Does n8n support queue mode and workers?
Yes. This template sets EXECUTIONS_MODE=queue, uses Redis (QUEUE_BULL_REDIS_*), and runs n8n worker so production and manual executions offload to workers.
Where can I download n8n?
From the official n8n GitHub repository, Docker Hub (n8nio/n8n), or deploy this Railway template in one click.
What are some alternatives to n8n?
Zapier, Make, Activepieces, Huginn, Windmill, and custom workers. n8n stands out as the self-hosted, queue-mode option with a large node ecosystem and no per-execution fee.
Template Content
Redis
redis:8.2n8n-worker
n8nio/n8n:2.36.8