Deploy n8n

Simple and dependable automation platform using n8n + PostgreSQL

Deploy n8n

/var/lib/postgresql/data

Just deployed

Deploy and Host n8n + PostgreSQL on Railway

n8n is a fair-code workflow automation platform that connects apps, APIs, and AI models through a visual, node-based editor. It offers hundreds of built-in integrations, supports custom JavaScript and Python code, and can be fully self-hosted, keeping your data and credentials under your control.

About Hosting n8n + PostgreSQL

Self-hosting n8n means running the n8n application alongside a database that stores your workflows, credentials, and execution history. This template provides an affordable, stable, and dependable setup: a single n8n instance backed by PostgreSQL, preconfigured to talk to each other over Railway's private network. To keep costs and complexity low, it does not use queue mode or separate workers, so all executions run on the main instance. This makes it a good fit for individuals and small teams with moderate workloads. If you need to process large volumes of executions, consider a template that includes n8n workers.

Common Use Cases

  • Automating repetitive tasks across tools such as Gmail, Slack, Notion, Google Sheets, and CRMs
  • Running scheduled jobs: reports, data syncs, backups, and reminders
  • Building AI agents and LLM-powered workflows that call your own APIs and services
  • Receiving webhooks from third-party services and routing the data wherever it needs to go

Dependencies for n8n + PostgreSQL Hosting

  • n8n: the workflow automation application and editor
  • PostgreSQL: stores workflows, credentials, users, and execution data

Implementation Details

Setup. Only one variable is required to get the template running:

  • GENERIC_TIMEZONE: the time zone used by the Schedule Trigger and other time-based nodes (e.g. Europe/Rome). Find yours on momentjs.com. See the n8n time zone docs for details.

Scaling. This template runs n8n in regular mode on a single instance. If you outgrow it, read about queue mode and workers in the official documentation.

Documentation. For reference:

Support. If you run into any issues, feel free to contact me. I use this template myself, so expect ongoing updates and maintenance.

Why Deploy n8n + PostgreSQL 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 + PostgreSQL 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.


Template Content

More templates in this category

View Template
N8N Main + Worker
Deploy and Host N8N with Inactive worker.

jakemerson
120
View Template
Evolution API with n8n
Automate WhatsApp workflows with Evolution API, n8n, and Postgres.

codestorm
102
View Template
Postgres Backup
Cron-based PostgreSQL backup to bucket storage

Railway Templates
867