Disclosure: some links on this page are partner links. IsItDev may earn a commission if you buy or sign up through them, at no extra cost to you. It does not change what we recommend. Details.
You deployed n8n from a Railway template, and now it is stuck on an old version, an update failed, or it crashed after a redeploy. This guide shows how to update n8n on Railway without losing workflows or credentials: back up, pin the version you want, update queue-mode workers together, and roll back if something breaks.
Quick answer: Back up first, then change the image tag yourself instead of trusting a redeploy of latest.
- Copy your
N8N_ENCRYPTION_KEYsomewhere safe and back up the Postgres volume. - Export workflows and credentials with the n8n CLI over
railway ssh. - Check your version in n8n under Help, then About n8n, and pick a target from the n8n GitHub releases.
- Set the same explicit tag, such as
n8nio/n8n:2.50.6, on every n8n service and deploy them together. - Check the deploy logs and the readiness endpoint, and roll back with your database backup if needed.
In this guide
- Before You Start
- Step 1: Find Out How Your Service Gets n8n
- Step 2: Back Up Before You Change the Version
- Method 1: Pin a Version Tag on an Image Service
- Method 2: Use Railway’s Automatic Updates the Safe Way
- Method 3: Templates That Build From a GitHub Repo
- Queue Mode (“With Workers”): Update Every n8n Service Together
- Major Upgrades: Moving From n8n 2.x to 3.x
- How to Roll Back If the Update Breaks Something
- What Running n8n on Railway Costs
- Troubleshooting: Common Problems After an n8n Update on Railway
- Pre-Update Checklist
- Frequently Asked Questions
- Next Steps

Heads-up (checked 2 December 2026): on Docker Hub, the latest and stable tags of n8nio/n8n now point to n8n 3.4.2, a new major version. If your service uses n8nio/n8n with no tag, Railway’s update button or an auto update can move you from 2.x to 3.x. Read the major-version section first.
Before You Start
- Access: the Railway project with your n8n services, an n8n owner or admin login, and the Railway CLI installed and logged in.
- Time: about 30 to 60 minutes the first time.
- Backup warning: n8n changes its database when a new version starts. A Railway rollback restores the old image but not the old database. Your database backup is the real undo button.
Running n8n on your own server instead? The same backup logic applies; see self-hosting n8n with PostgreSQL and Docker Compose.
Step 1: Find Out How Your Service Gets n8n
Open each n8n service, go to the Settings tab and look at the Source section. What you see decides how you update.
| What Source shows | How the version is set | How to update | Railway auto updates |
|---|---|---|---|
n8nio/n8n or n8nio/n8n:latest |
Whatever n8n last pushed to that tag | Pin an explicit version tag (Method 1) | Yes, on every new push to the tag |
n8nio/n8n:2.50.6 (a version tag) |
The tag itself | Edit the tag, or use the update button (Method 1) | Yes: patches only, or minor and patches |
docker.n8n.io/n8nio/n8n:… |
The tag | Edit the tag by hand | No: only Docker Hub and GHCR images are supported |
| A GitHub repository | The FROM line in its Dockerfile |
Edit the Dockerfile and push (Method 3) | No |
Railway’s popular “N8N (w/ workers)” marketplace template lists its image as plain n8nio/n8n, with no tag, so the first row is the most common case.
Check which version you run now
In the n8n editor, open Help in the left sidebar, then About n8n. Write down the version; you need it for the release notes and for a rollback.
Then pick a target on the n8n GitHub releases page. n8n ships a new minor version most weeks. Stable is for production; beta is the newest release and may be unstable. On Docker Hub today, latest is the same image as stable, and next the same as beta. As of 2 December 2026, stable is 3.4.2 and the newest 2.x is 2.50.6. Check again on the day you update.
Step 2: Back Up Before You Change the Version
n8n recommends a full backup, including the database and the encryption key, before every update.
- Save the encryption key. In your main n8n service (Primary in the workers template), open Variables and copy
N8N_ENCRYPTION_KEYinto your password manager. n8n encrypts saved credentials with it; without it, a restored database can’t decrypt them. A sealed variable is never shown again, so use the copy you made when you created it. - Back up Postgres. In the Postgres service’s Backups tab, create a manual backup. Railway backs up the database volume and restores it from the same tab. Manual backups are limited to 50% of the volume’s size.
- Export workflows and credentials as portable JSON files.
Run these two commands on your own computer. The first links the folder to your Railway project, and the second opens a shell inside the main n8n service.
railway link
railway ssh --service Primary
You should get a shell prompt inside the container. Run the next commands there. With Postgres, the first line should print postgresdb. If it prints nothing, the shell can’t see the service’s database settings, so stop and check before exporting.
printenv DB_TYPE
n8n export:workflow --backup --output=/tmp/n8n-backup/workflows/
n8n export:credentials --backup --output=/tmp/n8n-backup/credentials/
exit
When both commands finish without errors, the folders hold one JSON file per workflow and per credential. Back on your computer, download them:
railway service files download /tmp/n8n-backup ./n8n-backup --service Primary
You should now have an n8n-backup folder locally. Files in /tmp inside the container vanish on the next deploy, so download first. The credential files stay encrypted, one more reason to keep the key.
Auto-update backups won’t save your database. Before an automatic image update, Railway backs up only the volumes attached to the service it updates, and only on Pro. Your database volume belongs to the Postgres service, so take that backup yourself.
Method 1: Pin a Version Tag on an Image Service
This is the most reliable method: you choose the exact version, and every n8n service gets it.
- Open the n8n service, go to Settings, then Source, and change the image to an explicit version, for example
n8nio/n8n:2.50.6. - Do the same on Worker and Webhook if you run queue mode.
- Railway collects these edits as staged changes. Click Details on the banner to review them, then Deploy.
- Open each new deployment’s logs and look for errors. The main instance runs pending database migrations as it starts.
- Open
https://your-n8n-domain/healthz/readiness. It returns HTTP 200 once the database is connected and migrated. Then confirm the version under Help, then About n8n.
Railway also shows an update button in the service settings when a newer image exists. With a version tag, it stages the new tag. With latest, it redeploys the same tag to pull the newest image, which can be a major version.
Why “Redeploy” didn’t change the version
This is a common complaint in Railway and n8n forum threads. Railway describes Redeploy as a new deployment with the exact same code and configuration, so don’t count on it to fetch a newer image. Users also report setting an N8N_VERSION variable with no effect: on an image service, only the tag sets the version. Put the version you want in the tag.
Method 2: Use Railway’s Automatic Updates the Safe Way
In the service’s Settings, under Source, select Configure Auto Updates, then choose an update type and a maintenance window: Weekends, Night (02:00 to 06:00 UTC), Anytime, or a custom UTC schedule. Detection can lag a few hours, and you can skip a bad version. The update type only works as expected on version tags:
- Version tag plus “patches only”:
2.50.6can move to2.50.7, never to 2.51 or 3.0. This is the safe level. - Version tag plus “minor updates and patches”: it can move to the next minor, which can change behavior. Read the release notes first.
- A moving tag such as
latest: Railway redeploys whenever n8n pushes a new image to that tag, whatever its version.
My own queue-mode n8n project on Railway is a good example of the trap. Primary, Webhook and Worker are all set to n8nio/n8n with no tag, with automatic updates set to patch and an any-day, any-hour window. It looks safe, but Railway’s auto-update docs explain the catch: the patch setting applies to version tags, and a service on latest redeploys on every new push to that tag. So a setup like this follows whatever n8n publishes as latest, a major version included. Railway also checks each service separately, so the three could run different versions for a while.
If you want automatic updates, pin an explicit tag on every n8n service and choose patches only. Do minor updates by hand after reading the release notes, and always do major versions by hand.
Method 3: Templates That Build From a GitHub Repo
Some n8n templates deploy from a GitHub repository instead of an image. The popular single-service n8n template builds from a repo whose Dockerfile starts with FROM n8nio/n8n:latest. Edit that line in the repo the service is connected to, then commit and push to the linked branch. Railway builds and deploys every new commit on it.
FROM n8nio/n8n:2.50.6
Railway caches build layers, so rebuilding an unchanged FROM n8nio/n8n:latest isn’t guaranteed to fetch a newer image; an explicit version avoids that, and a NO_CACHE=1 service variable turns the cache off. If the service still points at the template author’s repo, connect your own copy under Source, or apply the author’s update when Railway shows a template update notice.
Queue Mode (“With Workers”): Update Every n8n Service Together
In queue mode, the main instance, workers and optional webhook processors share one database and one Redis queue. n8n’s update guide says to run the same version on all of them, pin a specific tag, and treat the update as one coordinated change.
- Migrations run at startup. Each process runs pending migrations when it starts. On PostgreSQL from n8n 2.33.0, one process takes a lock and runs them while the others wait.
- Older than 2.33.0: deploy the main service first, wait until its deployment is active, then deploy Worker and Webhook straight after.
- 2.33.0 or newer: stage the new tag on all three and click Deploy once. Railway deploys a service after the services its variables reference.
- Same encryption key everywhere. Setting
N8N_ENCRYPTION_KEY=${{Primary.N8N_ENCRYPTION_KEY}}on Worker and Webhook stops the values from drifting apart. - External task runners: the
n8nio/runnersimage version must matchn8nio/n8n. - Webhook URL variable: from n8n 2.35.0,
WEBHOOK_URLis a deprecated alias ofN8N_WEBHOOK_URL. It still works but logs a warning at startup, so rename it when you update past 2.35.
n8n also suggests noting the newest database migration before you update. On your computer, railway connect Postgres opens psql (installed locally) against the database; run this query and save the name it prints:
SELECT name FROM migrations ORDER BY id DESC LIMIT 1;
Major Upgrades: Moving From n8n 2.x to 3.x
n8n 3.0 removed nodes, changed defaults and tightened security. n8n’s announcement says you can’t go back to 2.x except by restoring a backup, and that 2.x gets security and critical fixes for 12 months after the 3.x stable release. Signals are mixed today: GitHub and Docker Hub mark 3.4.2 as stable, while n8n’s docs still call 3.0 early access. You don’t have to jump now.
- Update to the newest 2.x first (Method 1).
- Open Settings, then Migration Report (available from 2.39). Fix everything marked Upgrade blocked or Executions will fail.
- Read the n8n 3.0 breaking changes in full.
- Take a fresh backup, pin the 3.x tag on every n8n service and deploy them together.
Changes that hit Railway setups most often:
- Legacy nodes such as Function, Function Item, Item Lists, Cron and Interval are removed. Published workflows that use them don’t activate, so their triggers stop.
OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERSis removed; manual runs always go to workers, so check worker memory.- Unverified community packages are off by default, and the Code node task timeout drops from 300 to 60 seconds.
- Slack Trigger workflows need the signing secret on the Slack credential.
Still on 1.x? n8n says there is no direct path to 3.x, and 1.x support ends on 31 December 2026. Go to 2.x first.
How to Roll Back If the Update Breaks Something
To roll a service back, open its Deployments tab, click the three dots on an earlier successful deployment and choose Rollback. It restores the old image and custom variables. Old images are kept for 24 hours on Free and Trial, 72 on Hobby and 120 on Pro.
The catch: n8n says changing the image back does not reverse database migrations. For a clean rollback:
- Stop every n8n service: in each Deployments tab, choose Remove on the active deployment.
- In the Postgres Backups tab, click Restore on the pre-update backup, then Deploy the staged change.
- Set the old version tag on every n8n service and deploy, or roll each one back.
- Check the version and run one test workflow.
Anything created after the backup is lost, so keep the exported JSON files too.
What Running n8n on Railway Costs
Railway charges a plan fee that counts toward usage, plus per-minute resource usage. Builds are free. From Railway’s pricing docs, as of December 2026:
- Free: $0 with $1 of usage a month; 1 project, up to 3 services with 0.5 GB RAM each; services sleep when idle.
- Hobby: $5 a month, including $5 of usage; anything above is billed on top.
- Pro: $20 a month, including $20 of usage.
- Rates: RAM $10 per GB per month, CPU $20 per vCPU per month, egress $0.05 per GB, volumes $0.15 per GB per month. Backups bill at the volume rate on their incremental size.
Worked example, not a measurement. The resource figures are assumed monthly averages for a small instance. Replace them with your own numbers from each service’s Metrics tab.
| Line | Single n8n + Postgres | Queue mode (Primary, Webhook, Worker, Postgres, Redis) |
|---|---|---|
| Assumed RAM | 0.75 GB (n8n 0.5, Postgres 0.25) = $7.50 | 1.75 GB (0.5 + 0.4 + 0.5 + 0.25 + 0.1) = $17.50 |
| Assumed CPU | 0.07 vCPU = $1.40 | 0.15 vCPU = $3.00 |
| Volumes | 1 GB = $0.15 | 1.5 GB = $0.23 |
| Egress | 1 GB = $0.05 | 1 GB = $0.05 |
| Usage total | $9.10 | $20.78 |
| Bill on Hobby | $9.10 (the $5 fee covers the first $5) | $20.78 |
| Bill on Pro | $20.00 (under the included $20) | $20.78 |
RAM is the biggest line, so queue mode’s extra always-on services cost the most.
For real numbers, open the Usage page in your workspace settings; it breaks usage down by project and resource. Set Usage Limits on that page adds an email alert and a hard limit (minimum $10) that takes all workloads offline, so start with the alert. See Railway’s cost control guide.
Starting fresh? Railway’s plans cover both layouts. If you’d rather not handle updates, n8n Cloud lets you pick the version, release track and update schedule in its console. Still choosing a platform? Read our Zapier vs Make vs n8n comparison.
Troubleshooting: Common Problems After an n8n Update on Railway
| Symptom | Likely cause | Fix |
|---|---|---|
| Version unchanged after redeploy | Same tag and config redeployed, or a cached Dockerfile build | Set an explicit version tag or FROM line |
| Deploy fails at the health check | n8n didn’t answer within the timeout (300 seconds by default), or PORT doesn’t match n8n’s port (5678 by default) |
Read the deploy logs; if n8n was still starting, raise RAILWAY_HEALTHCHECK_TIMEOUT_SEC; fix PORT |
| Crash loop after the update | A migration error, or services on different versions | Same tag on every service; if it persists, roll back with the database backup |
| Credentials can’t be decrypted, or n8n won’t start after a key change | N8N_ENCRYPTION_KEY missing or different on one service |
Set the original key on every n8n service; never change it on an existing database |
| Wrong webhook URLs, or production webhooks return 404 | Webhook URL variable missing, or the workflow didn’t activate | Set N8N_WEBHOOK_URL to your public URL (the older WEBHOOK_URL alias is deprecated from 2.35.0); after 3.0, check the Migration Report |
| Executions stay queued, workers idle | Worker missing EXECUTIONS_MODE=queue or the QUEUE_BULL_REDIS_* variables, or on another version |
Match variables and tag on Primary, Worker and Webhook |
To test a webhook against your updated instance from your laptop, see testing webhooks locally with Cloudflare Tunnels.
Pre-Update Checklist
Copy this before every update.
n8n on Railway: pre-update checklist
- Current version (Help, then About n8n): ______
- Target version from github.com/n8n-io/n8n/releases: ______
- Release notes read for every version in between; for a major, Migration Report clean
- N8N_ENCRYPTION_KEY saved in the password manager
- Postgres manual backup created (date/time: ______)
- Workflows and credentials exported and downloaded to n8n-backup/
- Newest migration name noted: ______
- Same explicit tag staged on Primary, Worker and Webhook (no latest)
- Auto updates: version tag plus patches only, or off
- After deploy: logs clean, /healthz/readiness returns 200, version confirmed, test workflow run
Frequently Asked Questions
How do I update n8n on Railway?
Change the image tag of every n8n service to the new version and deploy. First save your encryption key, back up the Postgres volume and export workflows. In queue mode, Primary, Worker and Webhook need the same tag. If your template builds from GitHub, change the Dockerfile’s FROM line instead.
Why is n8n still on the old version after I redeployed?
A redeploy repeats the same configuration, so it isn’t a reliable way to fetch a newer image, and Dockerfile builds can reuse cached layers. Variables such as N8N_VERSION do nothing on an image service. Put the exact version in the image tag or FROM line and deploy again.
Will updating n8n on Railway delete my workflows?
No. Workflows live in Postgres, which an n8n update doesn’t replace. The real risks are a failed migration, a lost encryption key, or nodes removed in a major version. With a database backup, the saved key and exported workflows, you can always recover.
How much does n8n on Railway cost?
It depends on usage. Hobby is $5 a month including $5 of usage, and Pro is $20 including $20. RAM costs $10 per GB per month and CPU $20 per vCPU. In our worked example, a small single instance came to about $9 a month and queue mode about $21.
Can I run n8n on Railway for free?
Only in a limited way. The Free plan gives $1 of usage a month, up to 3 services with 0.5 GB RAM each, and services that sleep when idle. That $1 covers about 100 MB of RAM for a month, and services stop when it runs out. Queue mode needs more services than Free allows.
Should I turn on automatic updates for n8n on Railway?
Yes, but only with a pinned version tag and patches only. On latest, Railway redeploys on every new push to the tag, which can include a major version, and each service updates on its own schedule. Keep minor and major updates manual.
Next Steps
Work through the checklist and pin an explicit version on every n8n service. Then put your instance to work: connect n8n to GoHighLevel with a Private Integration token.

