---
title: "Deploy n8n"
description: "N8N Template for Scalable n8n with Integrated Backup"
category: "Automation"
url: https://railway.com/deploy/a_pour
---

# Deploy n8n

N8N Template for Scalable n8n with Integrated Backup

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

- **Creator:** Omry atia's Projects
- **Category:** Automation
- **Total deploys:** 126

## Template content

### Postgres

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl
- **Start command:** `/bin/sh -c "unset PGPORT; docker-entrypoint.sh postgres --port=5432"`

### Primary https://devicons.railway.app/n8n

- **Image:** n8nio/n8n
- **Start command:** `n8n start`
- **Public domain:** Yes

### PostgresGBackup https://devicons.railway.app/google dr

- **Source:** https://github.com/omryatia/postgres-gdrive-backup

### Worker https://devicons.railway.app/n8n

- **Image:** n8nio/n8n
- **Start command:** `n8n worker`

### Webhook https://devicons.railway.app/n8n

- **Image:** n8nio/n8n
- **Start command:** `n8n webhook`
- **Public domain:** Yes

### Redis

- **Image:** redis:8.2.1

## Documentation

[![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/template/a_pour?referralCode=4pD7Sc)

This Railway template sets up a robust automation platform using:
1. n8n: Low-code automation tool with a visual workflow editor.

2. Worker: Handles background tasks, allowing for horizontal scaling.

3. PostgreSQL: Primary database for storing workflows, executions, and credentials.

4. Redis: Acts as a message broker between the main instance and workers.

5. Webhook: Public URL endpoint for triggering workflows.

6. Backup to Google Drive: Scheduled n8n workflow to back up workflows to Google Drive.

Ideal for:
1. Automating business logic.

2. Integrating APIs.

3. Creating no-code workflows.

4. Ensuring regular backups to Google Drive.

Installation Guide
1. Deploy the Template

Click the button below to deploy the template on Railway:

Deploy on Railway

This will set up the all services (dont need to change any varibales)

3. Set Up Google Drive Backup Workflow (not must - its must)

To automate backups of your n8n workflows DB to Google Drive:
1. Create a Google Service Account:
    - Go to Google Cloud Console.
	- Create a new project or select an existing one.
	- Navigate to "APIs & Services" > "Credentials".
	- Click "Create Credentials" > "Service Account".
	- Follow the prompts to create the service account.

        After creation, go to the service account Download the JSON file.

2. Enable Google Drive API:
	- In the Google Cloud Console, navigate to "APIs & Services" > "Library".
	- Search for "Google Drive API" and enable it.

3. Store Service Account Credentials in Railway:

     - In your Railway project, go to the Google Drive Backup Service.
     - Add an environment variable named GOOGLE_SERVICE_ACCOUNT and paste the contents of the JSON file as its value.
	- Add an environment variable named GDRIVE_FOLDER and add folder name to save.
	- Add an environment variable named SHARE_EMAIL and add your email to get notification.

4. After deployment - Accessing n8n
	- Access the n8n Primary UI via the provided Railway domain.
	- Create user and pass and login.

Enjoy


## 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) — [Jul'26] WhatsApp automation platform using Evolution API, n8n & PostgreSQL
- [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/a_pour
