Back to Blog
n8n
self-hosted
cloud
devops
automation

n8n Cloud vs Self-Hosted Setup Guide

October 8, 2026

Compare n8n Cloud vs self-hosted n8n across pricing, execution limits, data privacy, infrastructure requirements, and scalability.

N8n Cloud vs Self-Hosted Setup Guide

Deciding between n8n cloud vs self-hosted deployment models depends on workflow execution volume, data security requirements, infrastructure maintenance capacity, and budget constraints. n8n Cloud is a fully managed SaaS platform designed for teams seeking instant setup without server management, whereas self-hosting n8n on Docker or Kubernetes provides complete control over infrastructure, unlimited execution scaling, VPC network isolation, and custom node configurations. Evaluating the technical trade-offs between managed hosting and self-managed infrastructure ensures your enterprise selects the optimal automation architecture.


Architectural Comparison: Cloud vs Self-Hosted

Understanding how n8n executes workflows in managed environments versus private infrastructure requires examining the underlying software architecture.

+-----------------------------------------------------------------------+
|                         N8N ARCHITECTURE COMPARISON                   |
+-----------------------------------------------------------------------+
|  n8n Cloud (Managed)              |  Self-Hosted (Queue Mode)         |
|                                   |                                   |
|  [ Multi-Tenant Cloud ]           |  [ Private Cloud / VPC ]          |
|  [ Webhook Gateway   ]           |  [ Load Balancer / Webhooks ]     |
|  [ Single Worker Thread ]         |            |                      |
|  [ Managed Postgres DB ]          |            v                      |
|                                   |  [ Main Process ]                 |
|                                   |        |                          |
|                                   |        v                          |
|                                   |  [ Redis Queue ]                  |
|                                   |   /    |    \                     |
|                                   |  v     v     v                    |
|                                   | [Worker1][Worker2][Worker3]       |
|                                   |        |                          |
|                                   |        v                          |
|                                   |  [ External PostgreSQL DB ]       |
+-----------------------------------------------------------------------+

Managed n8n Cloud Architecture

n8n Cloud runs on managed infrastructure where n8n handles server provisioning, database maintenance, version upgrades, SSL certificates, and security updates.

  • Single-Tenant Application Container: Each instance runs in an isolated container environment.
  • Managed Scaling: Memory and CPU resources are scaled automatically based on cloud subscription tiers.
  • Fixed Workflow Limits: n8n cloud limits workflow execution counts according to plan boundaries.
  • Automated Backups: Workflow definitions and execution states are backed up automatically within n8n cloud storage.

Self-Hosted Architecture Modes

Self-hosting n8n allows organizations to run the open-source or enterprise codebase directly on private servers. There are two primary architectural patterns:

  1. Standalone Mode (Single Container): Runs the n8n main application process, execution engine, and database connection inside a single Docker container. Suitable for small workloads handling up to a few thousand executions per day.
  2. Redis Queue Mode (Distributed Cluster): Separates n8n into dedicated roles:
    • Main Process: Handles UI rendering, workflow compilation, cron schedule triggers, and backend administrative operations.
    • Webhook Processors: Dedicated lightweight instances receiving incoming HTTP webhooks, pushing trigger payloads directly onto the message queue without processing payload logic.
    • Redis Queue: High-throughput message broker holding execution tasks in an in-memory queue.
    • Worker Nodes: Scalable worker containers pulling jobs off Redis and processing node logic concurrently across multiple CPU cores.
    • PostgreSQL Database: External high-availability database storing workflow definitions, credentials, and execution logs.

Execution Volume Economics & Cost Analysis

Selecting a deployment model requires evaluating total cost of ownership (TCO) across initial deployment, execution scaling, and long-term maintenance.

n8n Cloud Pricing Mechanics

n8n Cloud charges based on workflow executions rather than individual node steps. An execution occurs whenever a workflow triggers and completes, regardless of whether it executes 5 nodes or 500 nodes.

  • Predictable Managed Costs: Eliminates cloud server hosting bills, database administration costs, and DevOps maintenance hours.
  • Execution Scaling Costs: High-frequency workflows (e.g., polling APIs every minute or processing thousands of webhooks per hour) can exceed standard cloud tier thresholds quickly, requiring upgrade to higher plans. You can check current pricing on n8n's pricing page for specific tier caps.

n8n Self-Hosted Cost Structure

Self-hosting replaces per-execution fees with fixed server infrastructure costs.

  • Infrastructure Costs: Virtual machines (e.g., AWS EC2, DigitalOcean Droplets, or GCP Compute Engine), managed Redis instances, and managed PostgreSQL databases.
  • Unlimited Execution Volume: Running self-hosted n8n incurs zero marginal fee per workflow execution. A cluster processing 1,000,000 executions per month costs the same in license fees as one processing 10,000 executions (assuming open-source community edition or fixed enterprise license).
  • DevOps Maintenance Overhead: The true cost of self-hosting includes engineer time spent managing updates, monitoring system health, managing database growth, and maintaining backup procedures.

For custom cloud deployment configurations and backend workflow scaling, review our backend API development services.


Data Privacy, HIPAA, and Regulatory Compliance

Data security requirements often mandate self-hosting rather than managed SaaS solutions.

+-----------------------------------------------------------------------+
|                     SELF-HOSTED DATA ISOLATION                        |
+-----------------------------------------------------------------------+
|  Internal Databases       n8n Self-Hosted Cluster     Private APIs     |
|  +----------------+      +-----------------------+   +--------------+ |
|  | PostgreSQL DB  | <--> | Worker Node (VPC)     | <| Service A    | |
|  +----------------+      +-----------------------+   +--------------+ |
|                             |                                         |
|                             +---> Encryption Key (AES-256)            |
|                                                                       |
|  * Payload data NEVER leaves your private cloud perimeter.            |
+-----------------------------------------------------------------------+

Self-Hosted Privacy Advantages

  • Strict Data Residency: Keeping workflow execution data, customer PII, and financial records entirely within your private cloud (AWS VPC, Azure VNet, or on-premises data center).
  • HIPAA and GDPR Compliance: Organizations processing Protected Health Information (PHI) or strict European customer data can enforce end-to-end data encryption without sending payload data through third-party SaaS cloud infrastructure.
  • Custom Encryption Key Control: When self-hosting, organizations set their own N8N_ENCRYPTION_KEY environment variable, retaining full ownership of database credential encryption keys.

Cloud Privacy Considerations

  • While n8n Cloud enforces strong security practices, data processed by workflows passes through n8n's managed infrastructure.
  • Organizations with strict compliance policies prohibiting external cloud data handling must utilize self-hosted instances.

Infrastructure Requirements: Docker & Kubernetes

Deploying self-hosted n8n in production requires choosing the appropriate infrastructure stack based on reliability and throughput goals.

Option 1: Docker Compose Standalone Setup

For low-to-medium workflow volumes, Docker Compose provides a clean, maintainable setup.

version: '3.8'

services:
  postgres:
    image: postgres:15-alpine
    restart: always
    environment:
      POSTGRES_USER: n8n_user
      POSTGRES_PASSWORD: secure_db_password
      POSTGRES_DB: n8n_db
    volumes:
      - postgres_storage:/var/lib/postgresql/data

  n8n:
    image: docker.n8n.io/n8nio/n8n:latest
    restart: always
    ports:
      - "5678:5678"
    environment:
      - DB_TYPE=postgresdb
      - DB_POSTGRESDB_HOST=postgres
      - DB_POSTGRESDB_PORT=5432
      - DB_POSTGRESDB_DATABASE=n8n_db
      - DB_POSTGRESDB_USER=n8n_user
      - DB_POSTGRESDB_PASSWORD=secure_db_password
      - N8N_ENCRYPTION_KEY=your_random_32_character_encryption_key
      - N8N_HOST=automation.yourcompany.com
      - N8N_PROTOCOL=https
      - WEBHOOK_URL=https://automation.yourcompany.com/
      - EXECUTIONS_DATA_PRUNE=true
      - EXECUTIONS_DATA_MAX_AGE=168
    volumes:
      - n8n_storage:/home/node/.n8n
    depends_on:
      - postgres

volumes:
  postgres_storage:
  n8n_storage:

Option 2: Enterprise Kubernetes Deployment Configuration

Production environments with high execution volume require tuning environment variables across main and worker deployment specs:

  • EXECUTIONS_MODE=queue: Enables Redis queue mode across all pods.
  • QUEUE_BULL_REDIS_HOST: Directs worker pods to the centralized Redis instance.
  • N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true: Secures configuration files inside containers.
  • N8N_METRICS=true: Exposes Prometheus metrics endpoints (/metrics) for monitoring CPU, memory, active executions, and queue lag.
+-------------------------------------------------------------------+
|                  KUBERNETES AUTOSCALING LOGIC                     |
+-------------------------------------------------------------------+
|  Prometheus Metrics  --->  Horizontal Pod Autoscaler (HPA)         |
|  (Queue Lag Depth)         (Scales Worker Pods from 2 to 20)     |
+-------------------------------------------------------------------+

To build complex cross-system automation pipelines and custom integrations, explore our business automation services.


Decision Matrix: n8n Cloud vs Self-Hosted

Use the comparison matrix below to determine which setup matches your technical and operational requirements:

| Evaluation Criteria | n8n Cloud | Self-Hosted Docker | Self-Hosted Kubernetes (Queue Mode) | | --- | --- | --- | --- | | Setup & Maintenance | Zero setup; fully managed by n8n | Low to medium; single server maintenance | High; requires Kubernetes & DevOps expertise | | Execution Volume Limits | Tiered monthly execution limits | Unlimited (bounded by server CPU/RAM) | Unlimited (horizontally autoscaled across workers) | | Data Privacy & Governance | Data passes through managed SaaS cloud | Complete VPC data isolation | Complete VPC data isolation & multi-region deployment | | Custom Code & Packages | Built-in JavaScript/Python support | Full access to install custom npm/pip modules | Full access via custom container images | | High Availability (HA) | Managed uptime SLA | Single point of failure unless scaled | Multi-zone redundancy & failover workers | | Financial Cost Structure | Predictable monthly SaaS subscription | Fixed low server cost + engineer time | Cloud server infrastructure + DevOps engineering | | Pricing Details | check current pricing | Free open source / enterprise licensing | Free open source / enterprise licensing |


Common Mistakes to Avoid When Self-Hosting n8n

Engineers migrating to self-hosted n8n often encounter operational pitfalls:

1. Using Default SQLite in Production

Running production self-hosted n8n on SQLite causes database locking errors (SQLITE_BUSY) during concurrent workflow executions. Always configure PostgreSQL as the backend database for production self-hosted environments.

2. Failing to Persist the N8N_ENCRYPTION_KEY

If you deploy n8n in Docker without explicitly defining the N8N_ENCRYPTION_KEY environment variable, n8n generates a temporary key. Rebuilding or restarting the container without this key renders all stored database credentials permanently unreadable.

3. Neglecting Execution Log Pruning

Self-hosted n8n instances save full execution histories in the PostgreSQL database by default. Without log pruning enabled, the database table execution_entity can grow to hundreds of gigabytes, degrading server performance. Configure data retention rules:

EXECUTIONS_DATA_PRUNE=true
EXECUTIONS_DATA_MAX_AGE=168 # Keep logs for 7 days (168 hours)
EXECUTIONS_DATA_PRUNE_MAX_COUNT=50000

4. Over-Provisioning Monolithic Containers Instead of Queue Mode

Attempting to handle high-throughput webhook spikes by scaling a single container's CPU/RAM leads to bottle-necking. Switch to Redis Queue Mode to scale worker containers independently based on workload demand.

5. Storing Binary Data in Main Database Tables

Configuring n8n to store large file payloads (such as PDFs or images) directly inside PostgreSQL binary columns exhausts database storage quickly. Configure n8n to store binary execution data in external S3-compatible object storage.


Frequently Asked Questions

What are the main n8n cloud limits?

n8n Cloud plans enforce monthly execution caps, payload size thresholds, and concurrency limits based on your subscription plan. Organizations exceeding these limits must upgrade to higher cloud tiers or transition to self-hosted infrastructure. You should check current pricing for exact cloud tier limits.

How much does n8n self-hosting cost?

Self-hosting n8n using the open-source community edition incurs no software license cost. You pay only for underlying cloud hosting infrastructure (e.g., VPS, database, storage) and the engineering time required to deploy and maintain the environment.

Can I migrate workflows from n8n Cloud to self-hosted n8n?

Yes. Workflows can be exported from n8n Cloud as JSON files and imported directly into a self-hosted instance. However, credentials must be re-entered or migrated securely, as encryption keys differ between environments.

Is n8n self-hosted HIPAA compliant?

Self-hosted n8n can be configured for HIPAA compliance when deployed inside a HIPAA-compliant cloud environment (e.g., AWS with a signed Business Associate Agreement), provided database encryption, access controls, logging, and VPC network isolation are properly configured.


Build a Scalable Automation Architecture

Choosing and deploying the right n8n setup requires balancing operational control, infrastructure cost, and system security. Sharcon designs enterprise automation architectures, deploys high-availability n8n Kubernetes clusters, and builds custom node integrations for growing businesses.

To design an automation environment tailored to your technical requirements, explore our custom system integration solutions.

Max Lebedev

Max Lebedev

CEO of Sharcon LLC

15+ years in marketing and development. Leading a team of 30+ professionals at Sharcon.