---
title: "Deploy n8n"
description: "The cheapest n8n with PostgreSQL database."
category: "Automation"
url: https://railway.com/deploy/nIAh-Q
---

# Deploy n8n

The cheapest n8n with PostgreSQL database.

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

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

- **Creator:** Bruno's Team
- **Category:** Automation
- **Total deploys:** 1,295

## Template content

### n8n https://images.ctfassets.net/dm4oa8qtogq0/1OgqLMHDMKkrWCJtIYk1yJ/b168ba1f8b8fd5a94e444c0d371ba3b8/logo-n8n-symbol-redbg-600x600.png

- **Image:** br1cascio/n8n:1.123.62
- **Health check:** /healthz
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:16

## Documentation

# Deploy and Host n8n on Railway

n8n is a workflow automation platform that gives technical teams the flexibility of code with the speed of no-code. With 400+ integrations, native AI capabilities, and a fair-code license, n8n lets you build powerful automations while maintaining control over your data and deployments. This template uses the official n8n image with community nodes.

## About Hosting n8n

Hosting n8n on Railway provides a straightforward way to run your own n8n instance without managing servers or infrastructure manually. Railway handles the underlying deployment and networking, while n8n provides the interface for building and running automated workflows. For production deployments, n8n typically uses persistent storage so workflows, credentials, and configuration survive redeployments. You can connect n8n to external services through its integrations and community nodes, and scale the deployment as your automation workload grows. This setup is suitable for teams that want a self-hosted n8n environment with control over their data and deployment configuration.

## Common Use Cases

* Automate data synchronization between SaaS applications and internal systems
* Build AI-powered workflows, agents, and business process automations
* Integrate APIs, databases, webhooks, and third-party services into custom workflows

## Dependencies for n8n Hosting

* A Railway project with an n8n service
* Persistent storage for n8n application data
* Environment variables and configuration appropriate for your deployment
* External databases or services, if required by your workflows

## 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.

## 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/nIAh-Q
