
Your automation needs just outgrew a single instance. Maybe you’re an agency juggling client projects, or a developer who needs isolated environments for testing. Either way, spinning up separate servers for each instance burns money fast.
Let’s fix that. This guide shows you exactly how to run multiple n8n instances on one virtual private server without the headaches.
Running multiple n8n instances on a single VPS requires efficient resource allocation and stable infrastructure. The comparison table below highlights VPS hosting providers that support containerized and multi instance automation environments. These providers make it easier to scale workflows while maintaining consistent performance. To explore our recommended VPS hosting options.
VPS Hosting Providers With Resources for Running Multiple n8n Instances
| Provider | User Rating | Recommended For | |
|---|---|---|---|
![]() | 4.8 | Scalability | Visit Kamatera |
![]() | 4.6 | Affordability | Visit Hostinger |
![]() | 4.7 | Developers | Visit IONOS |
Why You Should Self Host n8n on a Single VPS
Cost Optimization: Consolidating your infrastructure onto one VPS slashes monthly hosting bills while keeping operational flexibility intact. Instead of paying per instance, you pay for hardware resources you actually control.
Environment Isolation: Agencies and developers love this approach. You can support separate development, staging, and production environments simultaneously. No cross-contamination. No accidental pushes to the wrong system. Check out our guide on setting up separate development and production environments for deeper insights.
Data Control: When you self host, you guarantee complete control over data residency, privacy, and compliance requirements. Your workflow data stays exactly where you want it.
High Performance: With the right VPS configuration from a reliable hosting provider, a single server can efficiently route and process thousands of automated workflows daily. The power is there. You just need to configure it properly.
Understanding the Architecture for Hosting n8n
The core n8n application binds to a single internal port (5678) by default. This creates an immediate challenge when you want multiple instances running simultaneously.
Deploying multiple instances requires sophisticated routing mechanisms. Each instance needs exposure to external users without causing port conflicts. You’ll need to choose between two distinct architectural paths based on your scaling needs and technical expertise.
Standalone Instances vs. Queue Mode
Standalone Instances: Best suited for isolated projects or separate clients. This method offers low operational complexity and low cost. The tradeoff? It lacks horizontal scalability. Perfect for agencies managing distinct client workflows.
Queue Mode: The recommended architecture for high-volume production environments. It features higher complexity but delivers excellent scalability and resource utilization. For a detailed guide on n8n execution modes, we’ve got you covered.
VPS Resource Requirements for Hosting Multiple n8n Instances on One VPS

n8n is notably lightweight on CPU usage. System memory typically becomes the limiting factor long before processor limits are reached. However, workflows using the Code node or the HTTP request node with large binary files can quickly exhaust system resources.
Unmetered bandwidth plans are highly recommended for multi-instance VPS deployments. This eliminates the risk of bandwidth overages during bulk data synchronization across your automation workflows.
CPU, Memory, and Storage Sizing
CPU Allocation: A minimum of 10 CPU cycles is required. A VPS with 2 to 4 vCPU cores provides ample processing power for substantial concurrent workloads.
Memory (RAM) Guidelines:
- An idle n8n instance requires roughly 100 MB of memory
- Each active instance consumes a baseline of 320 to 512 MB RAM
- 3 Instances: 6 to 8 GB of RAM provides comfortable headroom
- 5+ Instances: 12 to 16 GB of RAM is required to prevent out-of-memory crashes
Storage Specifications: Solid State Drives are mandatory for database operations. Plan for 20 to 30 GB of storage headroom above your estimated database size to handle maintenance operations safely.
Looking for cheap n8n hosting options? Many budget-friendly providers offer sufficient resources for multi-instance deployments.
Configuring Your Network and Reverse Proxy
Directly exposing high-numbered ports (like https://example.com:10001) looks unprofessional and breaks external webhook integrations. A reverse proxy is mandatory for any serious deployment.
You must configure the WEBHOOK_URL environment variable to match the external-facing domain. Without this, external services can’t reach your instance properly. Set N8N_PROXY_HOPS=1 so n8n can correctly parse client IP addresses through the proxy layer.
Port Mapping Fundamentals
Each n8n container must receive a unique host port mapped to the internal container port 5678.
Example Configuration:
- Instance 1 maps host port 10001:5678
- Instance 2 maps 10002:5678
- Instance 3 maps 10003:5678
Setting Up Traefik or Nginx

Traefik: Ideal for containerized environments. It uses Docker labels for dynamic routing. Configure session persistence (sticky sessions) so users aren’t randomly logged out when requests bounce between instances.
Nginx: A robust traditional proxy requiring explicit WebSocket upgrade support for n8n’s real-time editor. Increase read and send timeouts to 36,000 seconds (10 hours) to prevent long-running workflows from timing out.
For a comprehensive comparison of Nginx and Traefik for n8n, see our dedicated guide.
Database Strategies When You Self Host n8n
Critical Warning: Multiple standalone n8n instances cannot share the same database. Doing so causes Cron/Interval triggers to duplicate execution and creates webhook deregistration conflicts. Database isolation is vital for maintaining data consistency.
SQLite vs. PostgreSQL
SQLite: The default file-based database stored at ~/.n8n/database.sqlite. If using SQLite for multiple instances, every single instance must have its own dedicated database file.
PostgreSQL: The superior choice for multi-instance deployments. It supports multiple schemas within a single database server. Each n8n instance uses its own isolated schema (DB_POSTGRESDB_SCHEMA) while centralizing administration.
Using Docker Compose for Deployment
Docker Compose is the most practical method for orchestrating multiple n8n instances, databases, and reverse proxies on a single VPS. Deploy your entire stack with a single command in the terminal.
It enables an infrastructure-as-code approach. This means version control, reproducible deployments, and rapid scaling become possible. Your containers stay organized and manageable.
Network Security: Docker Compose lets you place backend services like PostgreSQL on isolated internal networks. They’re never exposed directly to the host system or the public internet. This drastically improves security without complex firewall rules.
Advanced Scaling: Implementing Queue Mode
Queue mode transforms n8n into a distributed execution system. You’ll have a main instance handling UI and triggers, plus multiple worker instances for workflow execution. This architecture delivers reliability under heavy loads.
The setup requires the EXECUTIONS_MODE=queue environment variable and a Redis message broker to maintain the execution queue. Worker instances launch using the n8n start –worker command. A standard deployment utilizes 2 to 3 workers per vCPU core.
Multi-Main Setup for High Availability
Designed for mission-critical deployments requiring zero downtime. Set N8N_MULTI_MAIN_SETUP_ENABLED=true on all main instances.
All main instances must sit behind a load balancer with strict sticky sessions enabled. This maintains user session state in memory and prevents authentication issues.
Security Best Practices for Multiple Instances

SSL/TLS Encryption: Always use your reverse proxy to terminate SSL connections. Encrypt all traffic using HTTPS. Integrate Let’s Encrypt for automated, zero-touch certificate renewals.
Authentication: The Community Edition supports basic username/password authentication and Two-Factor Authentication. Enterprise tiers unlock SAML and LDAP SSO capabilities for larger teams.
Credential Isolation: n8n Community Edition strictly isolates credentials and workflows to individual creators. This built-in limitation acts as a security feature, preventing accidental credential leakage between users.
Monitoring, Maintenance, and Data Pruning
Health Checks: Enable the /healthz/readiness endpoint with QUEUE_HEALTH_CHECK_ACTIVE=true. Load balancers can ping this every 10-30 seconds to automatically route traffic away from unresponsive instances.
Data Pruning: Without pruning, 1,000 daily executions can bloat your database by 36+ GB annually. Set EXECUTIONS_DATA_PRUNE=true and retain full data for only 30-90 days.
Backups: A comprehensive disaster recovery plan must include automated daily PostgreSQL exports, filesystem backups of the .n8n directories, and encrypted offsite storage. Software updates should follow a regular schedule.
Choosing the Right VPS for Your Setup
Before you deploy, you need reliable infrastructure. A VPS gives you the control and resources to scale your automation workflows effectively.
When selecting a provider, look for sufficient RAM, SSD storage, and unmetered bandwidth. Windows or Linux options work, though Linux is more common for Docker deployments. Access via SSH makes installation and maintenance straightforward.
Browse our VPS hosting recommendations to find providers offering the stability and support your multi-instance setup demands.
Cost Analysis: Self Host vs. n8n Cloud
Self-hosting becomes highly cost-effective for agencies and businesses with high execution volumes. Understanding the n8n vs. Make comparison helps clarify why many users migrate to self-hosted solutions.
| Aspect | Self-Hosted (Multiple Instances) | n8n Cloud |
|---|---|---|
| Entry Cost | VPS: $20-$100/month | Starter: $20/month |
| Scaling Model | Infrastructure scaling (Hardware) | Execution-based pricing |
| Multiple Instances | Included with your VPS capacity | $20-$50 per additional instance |
| CPU/Memory | 2-4 vCPU, 4-8 GB RAM typical | Managed automatically by n8n |
| Total Monthly Cost | $50-$300 (Fully-loaded estimate) | $20-$200+ (Usage dependent) |
While a VPS saves money on raw execution costs, organizations must account for the operational labor required to maintain the server. The open source nature of n8n makes self-hosting attractive for developers comfortable with DevOps responsibilities.
Conclusion
Running multiple n8n instances on one VPS combines cost efficiency with operational flexibility. The setup process requires careful attention to database isolation, reverse proxy configuration, and resource allocation.
With Docker Compose handling orchestration and proper security practices in place, you can automate complex business workflows across isolated environments without breaking the bank.
Next Steps: What Now?
- Select a VPS provider with sufficient RAM and SSD storage for your instance count.
- Install Docker and Docker Compose using your system’s package manager.
- Configure your reverse proxy with proper SSL certificates.
- Create isolated PostgreSQL schemas for each n8n instance.
- Set up automated backups and data pruning policies.
- Test webhook connectivity from external APIs before going live.



