n8n on Railway: single instance or queue mode?
Short answer: start with a single n8n instance plus Postgres unless you already know you need workers. It is the smaller and cheaper setup, and Tracklayer’s notes put it at about $6 to $7 per month for a lightly used instance. Choose queue mode when executions, webhooks and Code nodes compete for one process, when you need Python Code nodes, or when you want nightly backups built in.
Deploy n8n (single instance) on RailwayWhat each setup runs
| Single instance | Queue mode | |
|---|---|---|
| Template | n8n 2 with Postgres | n8n 2 Production Stack |
| n8n version (pinned) | 2.47.7 | 2.45.7 |
| Services | n8n, Postgres | Gateway, n8n Main, n8n Webhook, n8n Worker, Postgres, Redis, Postgres Backup |
| Code nodes | JavaScript only | JavaScript and Python, on workers |
| Scaling | One process | Raise the worker replica count |
| Automatic backup | None | Nightly Postgres dump to a Bucket |
| Estimated cost | About $6 to $7 per month, lightly used | About $10 per month idle, about $30 for steady automations with one worker |
The single-instance cost is based on figures measured on Railway; the queue-mode figures are the template’s own estimates. Both are at Railway’s usage prices, and your bill depends on workflow volume and memory.
When the single instance is enough
One n8n process runs the editor, triggers, webhooks and JavaScript Code nodes, with Postgres holding workflows, credentials and executions. It is a fit for:
- webhook and API automations between SaaS tools,
- scheduled syncs and reports,
- AI agent and chatbot workflows using LLM nodes,
- a personal or team automation server.
When queue mode is worth it
Queue mode splits the work. The editor puts executions on a Redis queue, workers run them and a separate webhook processor takes production traffic. Consider it when:
- a long workflow makes the editor slow,
- bursts of webhooks queue up behind test runs,
- you want Python Code nodes or more parallel executions,
- you want a backup job without writing one.
For the full walkthrough, see Deploy n8n on Railway in queue mode with workers.
n8n templates people deploy on Railway
| Template | Creator | Deployments | Services |
|---|---|---|---|
| N8N (w/ workers) | Jack | 114,737 | 4 |
| n8n | shinyduo's Projects | 17,560 | 2 |
| n8n | Thalles Passos's Projects | 5,850 | 2 |
| n8n with workers | Steven Junio's Projects | 4,040 | 4 |
| N8N (w/ webhook processors) | Jack | 3,386 | 5 |
| flowise-with-n8n-ai-automation | derekcheungsa's Projects | 1,974 | 3 |
| N8N | Faraz Patankar | 1,547 | 2 |
| n8n-mcp | czlonkowski's Projects | 1,348 | 1 |
Railway marketplace data as of 2026-11-19. Full ranking: Best n8n templates on Railway.
Names rarely say whether a template uses queue mode, pins a version or backs up the database. Check the services list on each page.
A simple way to decide
If you are building your first workflows, or run a handful of light automations, deploy the single instance. You can see how much memory it uses and whether the editor stays responsive. If you already know that customers or colleagues depend on the workflows, or that you need Python and backups from day one, go straight to queue mode and skip the migration later.
Steps for the single instance
- Deploy the template and wait for n8n to turn healthy. The first boot builds an image and runs migrations, which takes a few minutes.
- Find your login. Open the n8n service, then Variables. The email is
N8N_INSTANCE_OWNER_EMAIL(defaultadmin@example.com) and the password is the generatedN8N_OWNER_PASSWORD. There is no setup page, so nobody can claim the instance first. - Save the encryption key. Copy
N8N_ENCRYPTION_KEYto a password manager and never change it after the first boot. It encrypts every saved credential. - Set a custom domain (optional). Add it under Settings, Networking, then set
N8N_EDITOR_BASE_URLandN8N_WEBHOOK_URLand redeploy. - Set your timezone. Schedule triggers use
GENERIC_TIMEZONE(defaultEtc/UTC).
The queue-mode steps are in the queue mode guide.
Moving from one to the other
Deploy the queue-mode template, then either export workflows and credentials from the old instance and import them, or restore a pg_dump of the old Postgres into the new one. Use the same N8N_ENCRYPTION_KEY in both cases. Back up first.
Limits and licence
- Single instance: JavaScript Code nodes only, no queue mode, no automatic backup, and the n8n service has no volume (files go to Postgres, up to 512 MiB each).
- Queue mode: n8n Main stays a single instance, and outbound SMTP needs Railway’s Pro plan.
- Both use the n8n Sustainable Use License (see the FAQ). They are community templates, not affiliated with n8n GmbH.
Other options
Tracklayer also maintains an n8n AI agent stack with Ollama and Qdrant. See the full ranking of n8n templates on Railway.
FAQ
Can I start with the single instance and move to queue mode later?
Yes. The single-instance template's notes describe the path: deploy the queue-mode template, then copy your data over by exporting workflows and credentials with n8n export commands, or restore a pg_dump of the old Postgres into the new one. Either way you must keep the same N8N_ENCRYPTION_KEY. Treat decrypted exports as secrets.
Does the single-instance template back up my data?
No. It includes no automatic backup, so back up Postgres yourself, especially before major upgrades. The queue-mode template adds a nightly Postgres backup job to a Railway Bucket. In both cases, keep a copy of N8N_ENCRYPTION_KEY outside Railway.
Can I run Python in Code nodes?
Not in the single-instance template: Code nodes run JavaScript only there. The queue-mode template runs workers with JavaScript and Python task runners.
Can I use n8n commercially if I self-host it?
n8n uses the Sustainable Use License. It is free for your own internal business, personal or non-commercial use, but not for selling n8n as a hosted service, and Enterprise features need an n8n license. Ask n8n or a lawyer about customer-facing uses.
Do these templates work on Railway's Free plan?
The single-instance template's notes say it completes its first boot and runs small workflows under the Free plan's 0.5 GB per-service cap, with little headroom. Trial, Hobby or Pro are the comfortable choices. The queue-mode template recommends Hobby.