---
title: "Deploy n8n"
description: "n8n [2.49.8] | [Deploy the latest stable n8n with Postgres (Nov 2026)]"
category: "Automation"
url: https://railway.com/deploy/nod-1
---

# Deploy n8n

n8n [2.49.8] | [Deploy the latest stable n8n with Postgres (Nov 2026)]

**[Deploy n8n on Railway](https://railway.com/template/nod-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/nod-1/manifest.json

- **Creator:** ninja
- **Category:** Automation
- **Total deploys:** 6

## Template content

### n8n

- **Image:** n8nio/n8n:2.49.8@sha256:9a83f64039070a846723cdf7d95b85db9ad1e6fadb38cad1ca12eceb04e04f33
- **Public domain:** Yes

### Postgres

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18
- **Start command:** `/usr/bin/tini -g -- /usr/local/bin/wrapper.sh postgres -p 5432 -c listen_addresses=*`

## Documentation

# Deploy and Host n8n 2.49.8 on Railway

n8n is a workflow automation platform. You connect apps, APIs and AI
models into workflows that run on triggers, on schedules, or when you
call them. Version 2.49.8 is a stable release of 2026-11-27, pinned to an exact image
digest.

## About Hosting n8n 2.49.8

This template runs the official n8n image at an exact pinned version,
stated on this page and in the repo, with a Postgres database. Two
services:

- **n8n**: the editor, the API and workflow execution. The only service
  with a public URL.
- **Postgres**: workflows, credentials and execution history, on their
  own volume. This is the state that matters, and it survives
  redeploys. Local files written inside the n8n container do not.

The pin matters. A redeploy gives you the same n8n you tested, never a
surprise upgrade. Version bumps are deliberate, retested, and noted in
the repo.

## Why Deploy

- You get n8n 2.49.8 itself, not an unnamed version. The page and the
  repo state the exact tag and digest.
- The parts people usually get wrong are already set: the encryption
  key is generated, the public address is wired to your Railway domain,
  and execution data pruning is on, so the database does not grow
  without limit.
- It is a small, honest shape: two services, regular mode, no Redis,
  no worker fleet to feed. You pay for what this page describes.

## What is included

- n8n at the pinned tag and digest (see Status below), from the
  official image `n8nio/n8n`
- Postgres 18 with SSL, from Railway's own Postgres image, on a volume
- A generated encryption key for stored credentials
- Webhook and OAuth callback addresses wired to your Railway domain
- Task runners enabled, as n8n recommends on version 2
- Execution data pruning: 14 days, at most 10,000 executions

## After you deploy

1. Wait until both services are green.
2. Open the n8n service's public URL.
3. Create the owner account. The first account created owns the
   instance, so do this promptly: the setup page is open to anyone who
   finds the URL first.
4. Open the **n8n** service in Railway, go to **Variables**, and copy
   `N8N_ENCRYPTION_KEY` somewhere safe outside Railway. The warning
   below explains why this cannot wait.
5. Build your first workflow, or import one.

## Back up the encryption key

Credentials you store in n8n are encrypted with `N8N_ENCRYPTION_KEY`,
generated for you at deploy time. Keep a copy of that value somewhere
safe, outside Railway. Never change it: if it changes or is lost, every
stored credential becomes unreadable, and a database backup cannot
recover them, because the backup holds the same encrypted data and the
key is not in it.

## Trade-offs, stated plainly

- **Regular mode only.** No queue mode, no workers, no Redis. One
  process serves the editor and runs every execution. That is the
  right default for most self hosted instances. Heavy parallel loads
  are the case for a worker setup, and this template does not pretend
  to be one.
- **Local files do not persist.** Workflows, credentials and execution
  history live in Postgres and survive redeploys. Files a workflow
  writes inside the n8n container are gone at the next redeploy; send
  anything you need to keep to storage outside the container.
- **Version 2, on purpose.** The 3.x line is still pre-release as of
  2026-11-27. Version 3 is a future upgrade, not this template.
- **You run it.** Database backups, the encryption key backup, and
  watching disk use past the pruning window are yours.

## Status

This template pins n8n **2.49.8**, stable, at an exact image digest.
The version you are getting is always the version stated here and in
the repo.

## Common Use Cases

- Hand offs between apps: CRM updates, lead alerts, invoice filing
- Scheduled reports pulled from APIs into a sheet or a chat channel
- Webhook endpoints that glue services together
- AI workflows that summarize, classify and route messages with the
  model you choose

## Dependencies for n8n 2.49.8 Hosting

- Postgres (included)
- Nothing else. Model provider keys are optional, and only needed for
  AI nodes.

### Deployment Dependencies

- [n8n repository](https://github.com/n8n-io/n8n)
- [n8n documentation](https://docs.n8n.io/)
- Template source: this repository

## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Automate WhatsApp workflows with Evolution API, n8n, and Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/nod-1
