Back to Knowledge Base
Workflow Automation 14 Min Read • Updated September 2026

Self-Host n8n on a VPS: Complete Business Guide (2026)

Learn how to self host n8n on your own high-performance Linux VPS. Escape exorbitant Zapier task bills, protect customer privacy under Indian data regulations, and scale automated workflows with Docker Compose, PostgreSQL, and zero execution limits.

Production Architecture

n8n Engine + PostgreSQL + Nginx SSL

Host hundreds of concurrent webhook triggers, CRM data syncs, and AI agent workflows with full data sovereignty on SkyRainCloud NVMe infrastructure.

Modern businesses bleed thousands of dollars every month on proprietary SaaS automation platforms like Zapier and Make. The moment your order tracking, lead distribution, or CRM synchronization scales past 50,000 monthly events, per-task fees turn automation from an efficiency booster into a balance-sheet crisis. When you self host n8n on a dedicated or virtual private server, you eliminate task meter caps entirely while keeping critical customer records and payment payloads inside your own infrastructure. In this comprehensive guide, we walk you through provisioning an Indian KVM VPS, configuring Docker Compose with PostgreSQL, terminating SSL through Nginx, and implementing bulletproof security policies.

Why Businesses Self-Host n8n (Cost, Privacy & Unlimited Workflows)

Automation is no longer an optional luxury for lean companies; it is the operational spine powering everything from e-commerce order routing to automated GST billing. However, using public multi-tenant automation platforms creates two major structural liabilities: skyrocketing variable costs and regulatory compliance exposure. Under commercial SaaS tools, every step inside an iterative loop, each webhook validation check, and every periodic status poll consumes a billable task credit. If an API webhook retries twenty times during a minor network stutter, your company pays twenty times for a single event.

By opting to self host n8n, your execution costs become 100% predictable and flat. Whether your server executes five hundred workflows or five million executions in a single billing cycle, your operational cost remains pegged exclusively to your VPS server rental fee. Furthermore, with the implementation of India's Digital Personal Data Protection (DPDP) Act and stringent RBI financial guidelines, transmitting sensitive customer PII (personally identifiable information), GST numbers, and payment transaction metadata across third-party shared servers exposes your enterprise to serious compliance audits. Self-hosting n8n ensures that data rests encrypted on servers located directly within Indian borders (such as SkyRainCloud's Mumbai or Noida datacenters).

Additionally, self-hosted instances grant you unlimited access to custom JavaScript/Python execution nodes, native community integrations, custom internal REST APIs, and direct database queries (PostgreSQL, MySQL, Redis) that are severely restricted or paywalled behind enterprise enterprise tiers on cloud platforms.

n8n Cloud vs Self-Hosted: The Real Cost Breakdown

To understand the financial transformation of self-hosting, let us compare the realistic economics of running 100,000 monthly automated workflow executions on n8n Cloud or Zapier versus deploying on an Indian NVMe KVM Cloud VPS.

Service Option Monthly Task Capacity Estimated Monthly Cost Data Sovereignty Custom Code/Nodes
Zapier (Team Plan) 100,000 tasks ~₹48,000 - ₹55,000 ($599+) US Shared Multi-Tenant Heavily Restricted
n8n Cloud (Pro Plan) 50,000 executions ~₹10,500 ($120+) Shared EU/US Cloud Standard Nodes Only
SkyRainCloud 4GB VPS Unlimited (Hardware Sized) ₹649 / month 100% In-Country (Tier-3 India) Unlimited JS/Python & DBs

Moving 100k tasks per month to a self-hosted instance saves over ₹500,000 annually. You are essentially converting a punishing recurring operational variable tax into an ultra-low fixed server investment.

Minimum & Recommended Server Specs for n8n

The computational demands of n8n depend directly on three parameters: workflow concurrency (how many incoming webhooks strike the server at the exact same moment), data payload size (processing large JSON lists or parsing multi-megabyte PDFs with OCR nodes), and whether you run single-process or distributed queue mode.

  • Starter / Small Office Setup (Up to 25k tasks/mo): 1 vCPU, 2GB RAM, 25GB NVMe SSD. Capable of handling periodic webhooks, form submissions, and simple CRM records.
  • Standard Production Business Setup (25k to 250k tasks/mo): 2–4 vCPUs, 4GB to 8GB DDR5 ECC RAM, 50GB–80GB Gen4 NVMe. Excellent for parallel loops, PostgreSQL storage, customer communication dispatch, and webhook processing.
  • Heavy Enterprise & AI Agent Orchestration (250k+ tasks/mo + Local Vector Workflows): 4–8 dedicated vCPUs, 16GB RAM, 160GB NVMe. Operates in Redis queue mode with dedicated worker containers, handling heavy document parsing and AI LLM middleware pipelines.

Always choose high single-core frequency processors such as AMD EPYC (3.70 GHz boost) or AMD EPYC, because Node.js execution threads are single-threaded by nature. Faster CPU clock speed translates directly into faster JSON parsing and lower webhook response latency.

Self-Hosted n8n Production Architecture Flow

[Incoming Internet Traffic: HTTPS Webhooks / Browser Users] │ ▼ ┌────────────────────────────────────────────────────────┐ │ SkyRainCloud VPS (Ubuntu 24.04 LTS / 1Gbps Uplink) │ │ │ │ [Port 80/443] ──▶ Nginx / Caddy (SSL Reverse Proxy) │ │ │ │ │ ▼ [Internal Docker Net] │ │ ┌────────────────────┐ │ │ │ n8n Server Engine │ │ │ │ (Container: 5678) │ │ │ └─────────┬──────────┘ │ │ │ │ │ ┌─────────▼──────────┐ │ │ │ PostgreSQL 16 DB │ │ │ │ (Encrypted Volume)│ │ │ └────────────────────┘ │ └────────────────────────────────────────────────────────┘

Step-by-Step: Installing n8n with Docker Compose & PostgreSQL

While n8n can technically be installed via npm on your local operating system, running it within isolated Docker containers backed by PostgreSQL is the only industry standard for business reliability. Avoid the default SQLite storage for production; when ten webhooks hit an SQLite file simultaneously, file-lock exceptions will cause data loss.

Step 1: Install Docker Engine and Prerequisites

Connect to your SkyRainCloud VPS via SSH and update the operating system packages:

sudo apt update && sudo apt upgrade -y
sudo apt install -y curl ufw ca-certificates gnupg lsb-release

# Install Official Docker & Docker Compose Plugin
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER

Step 2: Create Directory Structure and Environment Variables

mkdir -p ~/n8n-docker && cd ~/n8n-docker
nano .env

Paste your configuration inside the .env file (replace placeholder passwords and domain names with your actual parameters):

POSTGRES_USER=n8n_db_user
POSTGRES_PASSWORD=SuperStrongSecretPassword123!
POSTGRES_DB=n8n_production
POSTGRES_NON_ROOT_USER=n8n_db_user
POSTGRES_NON_ROOT_PASSWORD=SuperStrongSecretPassword123!

DOMAIN_NAME=n8n.yourcompany.in
SUBDOMAIN=n8n
GENERIC_TIMEZONE=Asia/Kolkata
N8N_ENCRYPTION_KEY=GenerateA32CharacterRandomSecretHexKeyHere!

Step 3: Define docker-compose.yml

Create the multi-container configuration:

version: '3.8'

volumes:
  db_storage:
  n8n_storage:

services:
  postgres:
    image: postgres:16-alpine
    restart: always
    environment:
      - POSTGRES_USER=${POSTGRES_USER}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_DB=${POSTGRES_DB}
    volumes:
      - db_storage:/var/lib/postgresql/data
    healthcheck:
      test: ['CMD-SHELL', 'pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
      interval: 5s
      timeout: 5s
      retries: 10

  n8n:
    image: docker.n8n.io/n8nio/n8n:latest
    restart: always
    environment:
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
      - DB_POSTGRESDB_USER=${POSTGRES_USER}
      - DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
      - N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
      - WEBHOOK_URL=https://${DOMAIN_NAME}/
      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
      - N8N_SECURE_COOKIE=true
    ports:
      - "127.0.0.1:5678:5678"
    links:
      - postgres
    depends_on:
      postgres:
        condition: service_healthy
    volumes:
      - n8n_storage:/home/node/.n8n

Boot up the stack in detached background mode:

docker compose up -d

Setting Up Custom Domain, Reverse Proxy & SSL with Nginx

Because modern webhook providers (Stripe, Razorpay, WhatsApp Cloud API, Shopify) reject unsecured HTTP connections, your n8n instance must be shielded behind an automated HTTPS reverse proxy. We recommend Nginx with Certbot for robust, battle-tested SSL termination and high-volume HTTP connection handling.

sudo apt install -y nginx certbot python3-certbot-nginx

Create an Nginx server block at /etc/nginx/sites-available/n8n:

server {
    server_name n8n.yourcompany.in;

    location / {
        proxy_pass http://127.0.0.1:5678;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_buffering off;
        proxy_read_timeout 300s;
        proxy_send_timeout 300s;
    }
}

Enable the virtual host and request an automated Let's Encrypt certificate:

sudo ln -s /etc/nginx/sites-available/n8n /etc/nginx/sites-enabled/
sudo nginx -t && sudo systemctl restart nginx
sudo certbot --nginx -d n8n.yourcompany.in --non-interactive --agree-tos -m admin@yourcompany.in

Hardening & Security (Auth, Webhook Security & IP Limits)

Because n8n holds API keys to your CRM, payment gateways, and databases, an unsecured server represents an existential threat to your company. Implement these three critical security layers immediately:

1. Firewall & Port Restrictions (UFW)

Never expose ports 5678 (n8n internal) or 5432 (Postgres) to public traffic. Only ports 22 (SSH), 80 (HTTP), and 443 (HTTPS) should accept inbound packets:

sudo ufw default deny incoming && sudo ufw default allow outgoing && sudo ufw allow 22/tcp && sudo ufw allow 80/tcp && sudo ufw allow 443/tcp && sudo ufw enable

2. Enforce 2-Factor Authentication (2FA)

On your initial visit to https://n8n.yourcompany.in, create the root admin account and immediately activate TOTP Authenticator (Google Authenticator or Bitwarden) in your account settings.

3. Webhook HMAC Header Validation

Always configure secret authorization tokens or verify HMAC SHA256 signatures (e.g., Razorpay or GitHub Webhook secrets) inside your trigger nodes to ensure spoofed webhooks cannot inject phantom data into your databases.

Production Backups, Volume Snapshots & Version Updates

Never update your production automation container blindly without capturing a database dump. When database migrations fail, recovering without a backup can take days. Set up a simple automated midnight PostgreSQL dump script via Linux cron:

# Add this cron job to /etc/crontab:
0 3 * * * root docker exec -t $(docker ps -qf "name=postgres") pg_dump -U n8n_db_user n8n_production | gzip > /var/backups/n8n_backup_$(date +\%F).sql.gz

To update n8n to the newest release safely:

cd ~/n8n-docker
docker compose pull
docker compose up -d

Docker will pull the latest stable image, recreate the n8n container, and automatically perform any required schema upgrades against your existing PostgreSQL database with virtually zero interruption to your live workflows.

Recommended Plan for n8n

AMD EPYC KVM 4GB Plan

Specs: 2 High-GHz vCPU • 4 GB DDR4/DDR5 RAM • 50 GB PCIe Gen4 NVMe • 1 Gbps Unmetered Bandwidth • Free Dedicated Indian IPv4 • 2+ Tbps Anti-DDoS.

Starts at just ₹649/month • Sub-10ms latency across India.

View VPS Plans & Pricing →

Frequently Asked Questions

Is self-hosting n8n completely free for commercial business use?

Yes! n8n is distributed under the Sustainable Use License. You can run unlimited internal automated workflows, connect internal databases, trigger CRM webhooks, and process transactions on your own VPS without paying software licensing fees or per-task run costs.

How much RAM and CPU does n8n need on a Linux VPS?

For small to medium workloads (up to 50,000 monthly workflow executions), a 2 vCPU and 4GB RAM VPS with NVMe storage is ideal. For queue mode with Redis and background worker nodes processing heavy concurrency, we recommend 4 vCPU and 8GB RAM.

Why should I use PostgreSQL instead of SQLite for n8n?

SQLite locks the database file on concurrent writes. When multiple webhooks trigger at the exact same second, SQLite causes database timeouts and dropped workflow executions. PostgreSQL provides robust connection pooling, row-level locking, and smooth high-concurrency execution.

Can I migrate my existing workflows from n8n Cloud or Zapier to a self-hosted VPS?

Yes. From n8n Cloud, you can export all workflow JSON definitions and import them directly into your self-hosted instance in one click. From Zapier or Make, you can quickly rebuild logic or use n8n's community conversion nodes.

Deploy This on SkyRainCloud in Minutes

Spin up a high-performance KVM Cloud VPS in our Mumbai or Noida datacenters. Instant automated OS provisioning, native 1 Gbps networking, and 24/7 technical assistance.

Deploy Your VPS Now →
Production Developer Stack

Enterprise Developer Cloud: High-Throughput Application Hosting

Software engineers, startup founders, and automation agencies need predictable performance for CI/CD builds, Docker microservices, self-hosted n8n workflows, and 24/7 bot daemons. Hyperscalers (AWS, GCP, DigitalOcean) introduce complex bandwidth egress billing, international credit card lock-ins, and high latency. SkyRainCloud delivers dedicated KVM virtual machines with pure PCIe Gen4 NVMe and sub-10ms domestic API connectivity.

Sub-10ms

Low Latency APIs

Direct connectivity to Indian payment gateways (Razorpay, Cashfree), SMS aggregators, and domestic database clusters.

7,000 MB/s

Fast Gen4 NVMe Builds

Accelerate Docker image compilation, npm package installations, and database query transactions with 850k IOPS.

1 Gbps

Unmetered Uplink

Zero bandwidth egress penalties or surprise per-gigabyte transfer bills when scaling production applications.

Developer Cost & Spec Comparison: SkyRainCloud vs Hyperscalers

Evaluation Criteria SkyRainCloud Developer VPS AWS Lightsail / DigitalOcean Droplets
CPU Hardware Dedicated AMD EPYCâ„¢ 7C13 / AMD EPYC (3.70 GHz) Shared vCPU Slices with Aggressive CPU Burst Throttling
Storage Performance Pure PCIe Gen4 NVMe (7,000 MB/s) Standard EBS Volume / Network Attached SSD (300 MB/s)
Bandwidth Transfer 1 Gbps Unmetered Pipe Included Free Expensive Overages ($0.08 - $0.12 per GB After Low Cap)
Operating Systems Ubuntu 24.04, Debian 12, Custom Docker ISOs Standard Linux Distributions with Proprietary Addons
Payment Convenience ₹649/mo Flat (Instant UPI, Paytm, 18% GST Invoice) USD Invoicing with Mandatory Foreign Currency Auto-Debit

Deploy India's Highest Performance Cloud Infrastructure

Instant automated activation in under 60 seconds with instant UPI / Net Banking & 18% GST invoices.

❓ Knowledge & Help Center • 2026 Enterprise Guide

Frequently Asked Questions

Everything you need to know about SkyRainCloud hosting solutions, high-frequency AMD & Intel architectures, datacenter peering, SLA uptime, and seamless deployment.

The optimal hosting option depends directly on your workload requirements, traffic architecture, and compute bottlenecks:

  • Cloud VPS Hosting (AMD EPYC & Intel Xeon Platinum): The premier choice for production web applications, SaaS platforms, microservices, Docker/Kubernetes clusters, and multi-tenant databases starting from ₹649/mo with unmetered 1 Gbps port connectivity.
  • AMD EPYC Enterprise Servers: High-performance multi-threaded compute boosting up to 3.70 GHz—ideal for high-tickrate Minecraft networks, low-latency game hosting, and enterprise cloud microservices.
  • Windows Dedicated RDP Hosting: Tailored specifically for remote graphical environments, automated browser farms, MetaTrader 4/5 algorithmic execution, and enterprise accounting software (Tally ERP).
  • Bare Metal Dedicated Servers: 100% unshared physical Dual Intel Platinum 8168 or AMD EPYC 7C13 hardware with up to 128 physical threads and dedicated iLO/IPMI remote management for hypervisor virtualization.

SkyRainCloud provides transparent, fixed billing with zero hidden renewal markups, zero egress transfer penalty fees, and complete support for Indian UPI & Net Banking:

  • Minecraft & Game Servers: From ₹99/month on extreme single-core performance hardware with DDR5 ECC memory.
  • KVM Cloud VPS (Intel Platinum & AMD EPYC): Starting from ₹649/month with dedicated enterprise PCIe Gen4 NVMe arrays and full root access.
  • Windows RDP Servers: Starting from ₹649/month with licensed Windows Server 2022/2019 pre-activated.
  • Bare Metal Dedicated Servers: Starting from ₹15,999/month featuring 48 Cores / 96 Threads, 128GB ECC RAM, 1TB NVMe, and unshared 1Gbps uplink.

You can deploy in high-speed, enterprise-certified Tier-3 datacenters engineered for minimum packet round-trips:

  • Mumbai, India (Sub-5ms Ping): Direct peering with DE-CIX India, Extreme IX, NIXI Mumbai, and national fiber backbones (Jio, Airtel, Tata Communications) for sub-5ms response across Western & Southern India.
  • Noida / Delhi NCR, India (Sub-5ms Ping): Redundant high-capacity routing across Northern India, UP, Haryana, Punjab, and Rajasthan, tailored for enterprise compliance and low latency.
  • Singapore (APAC Gateway): Strategic Southeast Asian hub providing low latency connectivity across East Asia, Australia, and international gaming corridors.

To ensure guaranteed compute allocations, eliminate resource abuse, and prevent noisy-neighbor degradation on our enterprise hardware, we do not operate unverified free trials. Instead, we offer:

  • An accessible entry barrier starting from just ₹99/mo for game nodes and ₹649/mo for production VPS.
  • A transparent 24-hour money-back satisfaction guarantee for qualified first-time deployments.
  • Free real-time latency verification on our public Looking Glass & Ping Tester before purchasing.

Every SkyRainCloud hosting subscription is backed by an industry-standard 99.95% Network & Power SLA contractually supported by service outage credits:

  • Facilities feature N+1 generator redundancy, dual autonomous A+B UPS power paths, and dual-loop precision cooling.
  • Multi-homed BGP network routing with automatic carrier failover ensures seamless uptime even during upstream transit maintenance.
  • Track independent 24/7 status, incident logs, and latency telemetry on uptime.skyraincloud.in.

Yes. Enterprise-tier 2+ Tbps multi-layered DDoS mitigation is included completely free with every service tier without traffic throttling:

  • Instant real-time mitigation against Layer 3/4 volumetric floods (UDP floods, SYN floods, DNS amplification, ICMP attacks).
  • Advanced stateful Layer 7 inspection filters malicious HTTP requests, botnets, and game query protocol exploits without disconnecting legitimate users.
  • Zero latency overhead: clean traffic flows unimpeded with sub-1ms scrub time directly at our edge routing nodes.

Yes. Every service tier includes an intuitive, full-featured management panel optimized for complete administrative autonomy:

  • Game Servers: Custom Pterodactyl Panel featuring interactive web console, one-click mod/plugin installers, SFTP file access, automated snapshots, and player managers.
  • Cloud VPS & VDS: High-performance VirtFusion Cloud Panel with instant OS reinstalls (Ubuntu, Debian, AlmaLinux, Windows), HTML5 noVNC console, rDNS management, ISO mounts, and resource telemetry.
  • Dedicated Bare Metal: Out-of-band iLO / IPMI KVM hardware access with virtual media redirection for custom hypervisor or operating system installation.

Deploying a server on SkyRainCloud takes under 60 seconds from selection to live uptime:

  1. Select your plan (Cloud VPS, AMD EPYC Minecraft Gaming, Windows RDP, or Enterprise Dedicated).
  2. Choose your datacenter zone (Mumbai, Noida, or Singapore) and configure your memory and operating system.
  3. Complete checkout using instant Indian UPI, Net Banking, Credit/Debit Cards, or PayPal.
  4. Your server provisions automatically in real-time, delivering root credentials to your registered email and Client Portal.