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

CEO of Sharcon LLC
15+ years in marketing and development. Leading a team of 30+ professionals at Sharcon.
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.
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 ] |
+-----------------------------------------------------------------------+
n8n Cloud runs on managed infrastructure where n8n handles server provisioning, database maintenance, version upgrades, SSL certificates, and security updates.
Self-hosting n8n allows organizations to run the open-source or enterprise codebase directly on private servers. There are two primary architectural patterns:
Selecting a deployment model requires evaluating total cost of ownership (TCO) across initial deployment, execution scaling, and long-term maintenance.
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.
Self-hosting replaces per-execution fees with fixed server infrastructure costs.
For custom cloud deployment configurations and backend workflow scaling, review our backend API development services.
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. |
+-----------------------------------------------------------------------+
N8N_ENCRYPTION_KEY environment variable, retaining full ownership of database credential encryption keys.Deploying self-hosted n8n in production requires choosing the appropriate infrastructure stack based on reliability and throughput goals.
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:
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.
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 |
Engineers migrating to self-hosted n8n often encounter operational pitfalls:
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.
N8N_ENCRYPTION_KEYIf 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.
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
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.
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.
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.
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.
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.
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.
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.

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