---
title: "Deploy n8n Lead Capture"
description: "Form to CRM, Sheet and Slack with n8n"
category: "Automation"
url: https://railway.com/deploy/n8n-lead-capture
---

# Deploy n8n Lead Capture

Form to CRM, Sheet and Slack with n8n

**[Deploy n8n Lead Capture on Railway](https://railway.com/template/n8n-lead-capture)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/n8n-lead-capture/manifest.json

- **Creator:** onepush
- **Category:** Automation

## Template content

### n8n

- **Image:** n8nio/n8n:2.36.8
- **Health check:** /healthz
- **Public domain:** Yes

### n8n-worker

- **Image:** n8nio/n8n:2.36.8
- **Start command:** `n8n worker`
- **Health check:** /healthz

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

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

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

## Documentation

# Deploy and Host self hosted n8n Lead Capture (Open-Source Lead Capture and Workflow Automation) on Railway

Deployable.

## About Hosting n8n Lead Capture open-source software on Railway (self hosted n8n template)

This Railway template deploys n8n Community Edition in queue mode with a dedicated worker, PostgreSQL, and Redis Bull. It uses the official n8nio/n8n:2.36.8 image for both editor (port 5678) and worker (`n8n worker` command). A persistent volume at /home/node/.n8n stores workflows, credentials, and encryption keys. Queue mode buffers webhook bursts in Redis, so lead capture pipelines stay responsive during campaign spikes.

## Why Deploy n8n Lead Capture, the Zapier alternative on Railway (Railway Free Trial)

Zapier charges per task; a lead flowing to HubSpot, Google Sheets, and Slack costs 3 tasks. n8n Lead Capture on Railway costs a flat $10–$25/month regardless of volume. You own all lead data and can run unlimited executions.

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 Lead Capture 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.

The $5 free trial on GitHub signup lets you test the full stack before paying. n8n Cloud Starter costs about $24/month for 2,500 executions; this Railway stack is cheaper at scale.

### Railway vs Other Hosting Providers and VPS for n8n Lead Capture self hosting

| Provider | Setup Complexity | Queue Mode Support | Managed Postgres + Redis | Scaling Model | Best For |
|---|---|---|---|---|---|
| DigitalOcean | High — manual Docker Compose, SSL | Manual | Separate managed services | Vertical only | DevOps-savvy teams |
| AWS | Very high — VPC, IAM, RDS, ElastiCache | Manual | RDS + ElastiCache (costly) | Horizontal via ECS (complex) | Enterprises |
| Hetzner | Medium — manual stack | Manual | Self-managed | Vertical | Budget EU teams |
| Railway | Low — one-click template | Pre-configured | Built-in plugins | Horizontal with slider | Teams wanting lead capture today |

Railway eliminates the risk of misconfiguring Postgres, Redis, and queue mode across editor and worker. The template wires everything together, and managed plugins provide backups and monitoring.

## Common Use Cases for hosted n8n Lead Capture

- **Typeform to HubSpot CRM**: Webhook receives submission, creates/updates contact, applies lead score, alerts Slack for high-intent leads.
- **Raw webhook forms**: Custom landing pages POST directly to n8n, then route to HubSpot, Google Sheets, and Slack.
- **Google Sheets audit log**: Every lead appends a row with timestamp and source for fallback and debugging.
- **Conditional Slack routing**: IF node sends high-priority leads to a sales channel with @mention; low-priority logged silently.
- **Multi-source aggregation**: Separate webhooks for Typeform, contact forms, webinar tools feed one normalization workflow.
- **Scheduled enrichment**: Cron workflow pulls new HubSpot contacts, enriches via Clearbit, posts digest to Slack.

## Dependencies for n8n Lead Capture Docker hosted on Railway

Postgres Redis.

### Deployment Dependencies for Managed n8n Lead Capture Service (Lead Capture Automation)

The template provisions three services: n8n editor (n8nio/n8n:2.36.8, port 5678), n8n worker (same image, command `n8n worker`), PostgreSQL, and Redis Bull. Both editor and worker set EXECUTIONS_MODE=queue and DB_TYPE=postgresdb. A persistent volume at /home/node/.n8n stores encryption keys and workflow data.

### Implementation Details for n8n Lead Capture (Using n8n official docker image)

The editor exposes port 5678; the worker needs no public port. Set WEBHOOK_URL to your Railway URL, N8N_PROXY_HOPS=1 for reverse proxy, N8N_ENCRYPTION_KEY (never lose it — all credentials are encrypted with it), and EXECUTIONS_DATA_PRUNE=true to keep Postgres lean. The worker connects to the same Postgres and Redis, enabling horizontal scaling.

## How does n8n Lead Capture compare against other lead capture and CRM automation platforms

### n8n Lead Capture vs Zapier (Zapier Alternative)

Zapier’s per-task pricing punishes multi-step lead capture; 5,000 leads/month costs $49–$73. n8n on Railway costs $10–$25 flat. Zapier also throttles webhook polling on lower tiers; n8n processes webhooks instantly.

### n8n Lead Capture vs Make (Make Alternative)

Make’s visual builder is polished, but self-hosting is limited and data stays on Make’s servers. n8n gives full data residency and queue-mode architecture that absorbs webhook bursts without throttling.

### n8n Lead Capture vs HubSpot Workflows (HubSpot Workflows Alternative)

HubSpot Workflows can’t append to Google Sheets, post to Slack, or run custom JavaScript. n8n sits upstream, normalizes and enriches leads, then pushes clean data to HubSpot. HubSpot’s advanced workflows require Marketing Hub Pro at $800/month.

### n8n Lead Capture vs Activepieces (Activepieces Alternative)

Activepieces is simpler but has fewer integrations and weaker queue-mode/scaling. n8n offers 400+ nodes, custom Function nodes, and fair-code Community Edition that remains free to self-host.

## How to use n8n Lead Capture (the OSS Lead Capture Automation)?

Deploy on Railway, open the editor URL, create a Webhook node, copy the URL into Typeform or your form. Add HubSpot node to create/update contact, Google Sheets node to append row, Slack node to notify. Use IF node for conditional routing. Activate workflow and test with a real submission. Set error handling to Slack alerts so no lead is silently dropped.

## How to self host n8n Lead Capture on other VPS Services (n8n Lead Capture self hosting guide)

### Clone the Repository

No repo clone needed for n8n itself; pull the Docker image: `docker pull n8nio/n8n:2.36.8`. Optionally version-control your workflow JSON.

### Install Dependencies

Install Docker, Docker Compose, PostgreSQL 14+, Redis 7+. Create a Postgres database/user, enable Redis persistence, create /opt/n8n volume directory.

### Configure Environment Variables

Create .env with EXECUTIONS_MODE=queue, DB_TYPE=postgresdb, Postgres connection vars, Redis host/port, WEBHOOK_URL, N8N_PROXY_HOPS=1, N8N_ENCRYPTION_KEY (generate with `openssl rand -hex 32`), EXECUTIONS_DATA_PRUNE=true.

### Start the n8n Lead Capture Application

Create docker-compose.yml with editor (port 5678, volume /home/node/.n8n) and worker (command `n8n worker`, no ports). Both share env vars. Run `docker compose up -d`, set up reverse proxy with SSL, set WEBHOOK_URL to public HTTPS URL.

## Official Pricing of n8n Lead Capture (n8n Lead Capture pricing)

n8n Community Edition is free under fair-code license. You pay only infrastructure: Railway resources ($10–$25/month) plus external API costs. n8n Cloud Starter is about $24/month for 2,500 executions; self-hosting is cheaper above that volume.

## n8n Lead Capture cloud vs self hosted comparison (Pricing, features, costs, and more)

### Monthly cost of self hosting n8n Lead Capture on Railway

Typical cost $10–$25/month: editor and worker on small containers, managed Postgres (1GB), managed Redis. Scale worker horizontally for bursts. $5 free trial covers initial testing.

### System Requirements for Hosting n8n Lead Capture on a VPS

Minimum 2GB RAM, 2 vCPUs, 20GB SSD for editor+worker+Postgres+Redis. For production bursts, 4GB RAM and 4 vCPUs recommended. Monitor Redis memory; Bull queue holds pending jobs.

## Frequently Asked Questions (FAQs)

### Can I use SQLite instead of PostgreSQL for n8n Lead Capture on Railway?

No. Queue mode requires PostgreSQL; SQLite cannot run EXECUTIONS_MODE=queue. The template provisions Postgres automatically.

### What happens if I lose my N8N_ENCRYPTION_KEY?

All stored credentials become unreadable. You must re-enter every HubSpot, Google, and Slack credential. Store the key in Railway secrets and a password manager.

### Does n8n Lead Capture support SSO for my team?

Community Edition has no SSO. For SAML/OIDC, you need n8n Enterprise or Cloud. Basic email/password auth is sufficient for small teams.

### How many leads per month can this Railway stack handle?

Tens of thousands. Limits are downstream API rate limits (HubSpot, Google, Slack), not n8n. Scale worker horizontally if queue backlog grows.

### Can I use this template for lead capture without Typeform?

Yes. Any webhook-capable form works: custom HTML, Gravity Forms, WPForms, JotForm. Workflow logic remains identical.

### Is there a cheaper n8n option on Railway if I do not need queue mode?

Yes. Deploy the [cheapest n8n without queue mode](https://railway.com/deploy/n8n) for a single container with SQLite. Simpler and cheaper, but no horizontal scaling or burst buffering.
Queue-mode workers keep n8n Lead Capture executions off the editor so webhooks stay fast under load.
Queue-mode workers keep n8n Lead Capture executions off the editor so webhooks stay fast under load.
Queue-mode workers keep n8n Lead Capture executions off the editor so webhooks stay fast under load.
Queue-mode workers keep n8n Lead Capture executions off the editor so webhooks stay fast under load.
Queue-mode workers keep n8n Lead Capture executions off the editor so webhooks stay fast under load.
Queue-mode workers keep n8n Lead Capture executions off the editor so webhooks stay fast under load.
Queue-mode workers keep n8n Lead Capture executions off the editor so webhooks stay fast under load.
Queue-mode workers keep n8n Lead Capture executions off the editor so webhooks stay fast under load.
Queue-mode workers keep n8n Lead Capture executions off the editor so webhooks stay fast under load.
Queue-mode workers keep n8n Lead Capture executions off the editor so webhooks stay fast under load.


## 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/n8n-lead-capture
