Getting tired of paying sky-high prices for automation tools? You’re not alone. More developers and business owners are ditching expensive SaaS platforms and choosing to self-host n8n on their own VPS servers instead[1]. It’s honestly one of the smartest moves you can make if you want unlimited workflows without breaking the bank[1]. Think about it – why pay $50+ monthly for limited executions when you can run everything yourself for under $10?
Key Takeaways
Aspect | n8n Cloud | Self-Hosted VPS |
---|---|---|
Monthly Cost | €24-€60+ | $5-$20 |
Annual Savings | – | $200-$600+ |
Workflow Limit | Plan-based | Unlimited |
Data Control | Third-party | 100% yours |
Customization | Limited | Full control |
Setup Time | Instant | 30-90 minutes |
Best For | Non-technical users | Developers & tech-savvy users |
What is n8n and Why Self-Host It? 🤖
Here’s the thing about n8n – it’s basically like having your own personal automation assistant that never sleeps[2]. Unlike Zapier or Make.com, n8n is completely open-source and gives you total control over your data[3]. You can connect over 400 different apps and services, create complex workflows with branching logic, and even write custom JavaScript when you need something specific[4].
But here’s where it gets interesting. While n8n offers a cloud version, self-hosting opens up a whole world of possibilities that most people don’t even realize exists[1].
Why Choose Self-Hosting Over n8n Cloud?
Complete Data Control: Your sensitive business data never leaves your server[1]. No third-party access, no compliance headaches, just pure peace of mind.
Massive Cost Savings: Self-hosting costs around $5-20 per month compared to n8n Cloud’s €24-€60+ monthly fees[1]. Do the math – that’s potentially €400+ saved per year.
Unlimited Everything: No workflow limits, no execution caps, no feature restrictions[1]. Run as many automations as your server can handle.
Custom Integrations: Install any npm package you want and create custom nodes[5]. The cloud version simply can’t match this flexibility.
Performance Optimization: Tune your server exactly how you want it. More RAM for heavy workflows? Done. Faster SSD storage? You got it.
I’ve been running self-hosted n8n for over two years now, and honestly, going back to a managed service feels like wearing handcuffs. The freedom to customize everything from database settings to memory allocation is just incredible.
System Requirements: What Your VPS Actually Needs 💪
Let’s talk real numbers here. Most guides throw around vague requirements, but I’m going to give you the straight facts based on actual usage[6].
Minimum Requirements (Just Testing Things Out)
- CPU: 1 vCPU core (any modern processor works fine)[6]
- RAM: 2GB minimum (though 4GB is way better)[6]
- Storage: 10GB SSD (20GB if you want breathing room)[6]
- Bandwidth: 1TB monthly (most workflows barely use this)
Here’s something most people don’t tell you – n8n is surprisingly light on resources when idle[6]. One community member runs it perfectly fine on a Raspberry Pi 4 with 4GB RAM[7]. But here’s the catch: workflow complexity matters way more than basic specs.
Recommended Specs for Real Work
For Light Production Use:
- 2 vCPU cores (gives you headroom for concurrent workflows)
- 4-8GB RAM (workflows with lots of data processing need this)[6]
- 50GB+ SSD storage (logs and execution history add up fast)
- Docker support (makes everything so much easier)[8]
Pro tip: SSD storage makes a huge difference. I switched from a regular HDD to NVMe SSD and workflow execution times dropped by 40%. Don’t cheap out here.
Operating System Compatibility
Ubuntu 20.04 or 22.04 LTS is your best bet[8]. It’s what most n8n documentation assumes you’re using, and honestly, it just works. You could use other Linux distros, but why make life harder for yourself?
Docker compatibility is non-negotiable these days[8]. Every major VPS provider supports it, and it solves 90% of installation headaches.
Top VPS Providers for n8n Self-Hosting 🏆
After testing dozens of providers over the years, I’ve narrowed it down to the ones that actually work well for n8n[9]. Each has its strengths, and your choice depends on what matters most to you.
Hostinger: – Adcod.com team do not recommend Hostinger!
Hostinger deserves the top spot because they actually get what automation enthusiasts need[9]. They offer pre-built n8n templates that get you running in minutes, not hours.
What makes Hostinger special:
- One-click n8n installation templates[9]
- NVMe SSD storage on all plans[10]
- Starting at just $4.99/month for solid specs[10]
- 24/7 support that actually understands technical setups
Their KVM 2 plan ($6.99/month) is the sweet spot for most users – 2 vCPU cores, 8GB RAM, and 100GB NVMe storage[10]. Plus, they recently added queue mode support for scaling heavy workloads.
Plan | vCPU | RAM | Storage | Bandwidth | Price |
---|---|---|---|---|---|
KVM 1 | 1 | 4GB | 50GB NVMe | 4TB | $4.99/mo |
KVM 2 | 2 | 8GB | 100GB NVMe | 8TB | $6.99/mo |
KVM 4 | 4 | 16GB | 200GB NVMe | 16TB | $9.99/mo |
KVM 8 | 8 | 32GB | 400GB NVMe | 32TB | $19.99/mo |
DigitalOcean: The Developer’s Favorite
DigitalOcean has been my go-to for years because of their incredible documentation and community[3]. Their marketplace includes ready-made n8n droplets, which saves tons of setup time.
DigitalOcean highlights:
- Extensive documentation and tutorials[9]
- Strong community support
- Reliable infrastructure with 99.9%+ uptime
- Easy scaling when your needs grow
Start with their $6/month droplet (1 vCPU, 1GB RAM) for testing, then upgrade to the $12/month plan for production[11].
Plan | vCPU | RAM | SSD | Transfer | Price/Month |
---|---|---|---|---|---|
Basic | 1 | 1GB | 25GB | 1TB | $6 |
Standard | 1 | 2GB | 50GB | 2TB | $12 |
General Purpose | 2 | 8GB | 25GB | 4TB | $60 |
CPU-Optimized | 2 | 4GB | 25GB | 4TB | $40 |
Hetzner Cloud: The Budget Beast
If you want maximum bang for your buck, Hetzner is unbeatable[12]. Their CX22 plan gives you 2 vCPU cores and 4GB RAM for just €4.51/month. That’s serious hardware for pocket change.
Hetzner advantages:
- Incredible price-to-performance ratio[12]
- European data centers (great for GDPR compliance)
- AMD EPYC processors (surprisingly fast)
- 20TB+ bandwidth included[12]
The only downside? Limited locations outside Europe. But if that works for you, this is automation hosting gold.
Note: Hetzner recently updated their pricing structure in December 2024, with new prices effective from February 2025[13].
Vultr: Performance-Focused Power
When raw performance matters most, Vultr delivers with their high-frequency compute instances[14]. Their Intel CPUs run at 3GHz+ and make complex workflows fly.
Vultr strengths:
- High-frequency CPUs for demanding workflows[14]
- Global data center coverage
- Competitive pricing starting at $3.50/month[14]
- Easy deployment options
Plan | RAM | CPU | Storage | Bandwidth | Price |
---|---|---|---|---|---|
Standard 1GB | 1GB | 1 | 25GB NVMe | 1TB | $3.50/mo |
Standard 4GB | 4GB | 2 | 80GB NVMe | 3TB | $14/mo |
High Frequency 4GB | 4GB | 2 | 80GB NVMe | 3TB | $24/mo |
Netcup: The European Privacy Champion
For European users who prioritize privacy and competitive pricing, Netcup offers excellent value. Use discount code 36nc17495311660 for additional savings. Their German data centers provide solid performance with strict privacy protections.
Netcup benefits:
- Strong European presence
- Competitive pricing with frequent discounts
- Excellent price-performance ratio
- Privacy-focused infrastructure
Deployment Methods: Docker vs Direct Installation ⚙️
This is where most people get stuck. There are several ways to install n8n, but honestly, some methods are just better than others[8].
Docker Compose: The Smart Choice
Docker Compose is hands-down the best way to deploy n8n[15]. It gives you container isolation, easy updates, and simple backup strategies. Plus, if something breaks, you just redeploy – no hunting through config files.
Why Docker Compose wins:
- Isolated environment prevents conflicts[15]
- Easy to backup and restore
- Simple scaling with multiple containers
- Consistent deployment across any Linux distro
Here’s a production-ready setup that actually works in the real world[15]:
version: '3.8'
services:
n8n:
image: n8nio/n8n:latest
ports:
- '5678:5678'
depends_on:
- postgres
volumes:
- ~/.n8n:/home/node/.n8n
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=your_secure_password
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_USER=n8n
- DB_POSTGRESDB_PASSWORD=secure_db_password
- EXECUTIONS_MODE=queue
- QUEUE_BULL_REDIS_HOST=redis
postgres:
image: postgres:15
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=n8n
- POSTGRES_PASSWORD=secure_db_password
- POSTGRES_DB=n8n
redis:
image: redis:7-alpine
volumes:
- redis_data:/data
volumes:
postgres_data:
redis_data:
Direct NPM Installation: When You Want Control
Sometimes you need more control over the Node.js environment[2]. Direct installation via NPM gives you that, but it comes with more maintenance overhead.
NPM installation steps:
- Install Node.js 18+ and npm[2]
- Run
npm install n8n -g
[2] - Start with
n8n
command - Set up PM2 for process management
This method works great if you’re comfortable with Node.js environments and want maximum customization.
One-Click Installations: The Easy Button
Many VPS providers now offer one-click n8n installations[9]. Hostinger and DigitalOcean both have marketplace apps that get you running in under 5 minutes.
The trade-off? Less control over the initial setup. But for beginners, this is often the perfect starting point.
Step-by-Step Setup Guide: Getting Your Hands Dirty 🔧
Alright, you’ve picked your VPS provider and know which deployment method you want. Time to actually build this thing. Don’t worry – I’ll walk you through every single step, and trust me, it’s way easier than it looks.
Initial VPS Configuration: The Foundation
First things first – your fresh VPS needs some basic security hardening. Skip this step and you’ll regret it later when someone tries to break into your server[16].
SSH Key Setup (Do this before anything else):
# On your local machine, generate SSH keys
ssh-keygen -t rsa -b 4096 -c "your-email@example.com"
# Copy public key to your VPS
ssh-copy-id root@your-server-ip
# Test the connection
ssh root@your-server-ip
Basic Server Hardening:
# Update everything first
sudo apt update && sudo apt upgrade -y
# Install essential packages
sudo apt install -y curl wget git ufw fail2ban htop
# Configure firewall
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow 80
sudo ufw allow 443
sudo ufw enable
Here’s something most guides don’t tell you – change your SSH port from the default 22[16]. It’s not foolproof security, but it cuts down on automated attacks by about 90%:
sudo nano /etc/ssh/sshd_config
# Change Port 22 to Port 2222 (or any port you prefer)
sudo systemctl restart ssh
Docker and Docker Compose Installation
Unless you’re using a VPS provider with one-click Docker installation, you’ll need to set this up manually:
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Add your user to docker group
sudo usermod -aG docker $USER
# Install Docker Compose
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
# Test installation
docker --version
docker-compose --version
Production n8n Setup with Docker Compose
Here’s where things get interesting. Most tutorials give you basic setups that fall apart under real-world use. I’m giving you a production-ready configuration that actually works[15].
Domain and DNS Configuration:
Before starting n8n, make sure your domain points to your VPS:
# Check if DNS is working
nslookup your-domain.com
ping your-domain.com
SSL Certificate Setup with Let’s Encrypt:
# Install Certbot
sudo apt install certbot python3-certbot-nginx
# Get SSL certificate
sudo certbot certonly --standalone -d your-domain.com
# Copy certificates to your project directory
sudo cp /etc/letsencrypt/live/your-domain.com/*.pem ./ssl/
Starting Your n8n Instance:
# Create project directory
mkdir n8n-docker && cd n8n-docker
# Create docker-compose.yml file (use the production config above)
nano docker-compose.yml
# Generate encryption key
openssl rand -hex 32
# Edit your .env file with the generated key and your domain
nano .env
# Start all services
docker-compose up -d
# Check if everything is running
docker-compose ps
If everything worked correctly, you should be able to access n8n at https://your-domain.com
.
Performance Optimization: Making It Fly 🚀
Out-of-the-box n8n performance is decent, but with some tweaking, you can make it significantly faster.
Memory and CPU Optimization
Concurrency Control – This is huge. Most people run into performance issues because they don’t limit concurrent executions:
# Add to your environment variables
EXECUTIONS_CONCURRENCY=3
N8N_CONCURRENCY_PRODUCTION=3
Start with 3 concurrent executions and adjust based on your server resources. Each concurrent execution uses about 50-100MB of RAM depending on workflow complexity.
Queue Mode for Scaling – If you’re processing lots of workflows, queue mode is essential:
environment:
- EXECUTIONS_MODE=queue
- QUEUE_BULL_REDIS_HOST=redis
- QUEUE_BULL_REDIS_PORT=6379
Queue mode can handle up to 220 workflow executions per second on a single instance, with the ability to scale horizontally.
Database Performance Tuning
Execution Data Management – n8n stores every workflow execution by default. This adds up fast:
# Limit execution retention
EXECUTIONS_DATA_SAVE_ON_ERROR=all
EXECUTIONS_DATA_SAVE_ON_SUCCESS=all
EXECUTIONS_DATA_MAX_AGE=168 # 7 days in hours
For production environments, consider keeping successful executions for only 24-48 hours.
Security Best Practices: Locking Down Your Instance 🔒
Security isn’t optional when you’re self-hosting n8n. Your workflows often contain API keys, database credentials, and other sensitive data[16].
Essential Security Measures
Basic Authentication Setup – This should be your first line of defense[16]:
N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=your_admin_username
N8N_BASIC_AUTH_PASSWORD=your_very_secure_password
But here’s what most people get wrong – they use weak passwords[16]. Use at least 16 characters with mixed case, numbers, and symbols.
Environment Variable Security – Never put sensitive data directly in Docker Compose files[16]:
# Instead of this:
N8N_ENCRYPTION_KEY=mysecretkey
# Use this:
N8N_ENCRYPTION_KEY_FILE=/run/secrets/encryption_key
Network Security Configuration
Nginx Rate Limiting – Prevent brute force attacks:
http {
limit_req_zone $binary_remote_addr zone=login:10m rate=5r/m;
server {
location /rest/login {
limit_req zone=login burst=3 nodelay;
}
}
}
Important Security Update: n8n recently patched a stored XSS vulnerability (CVE-2025-46343) in version 1.90.0[17]. Make sure you’re running the latest version to avoid security risks.
Backup and Disaster Recovery: Protecting Your Work 💾
Losing your n8n workflows and data is a nightmare scenario. I’ve seen people lose months of automation work because they skipped backups.
Automated Backup Strategy
Create a comprehensive backup script that covers everything:
#!/bin/bash
# n8n Backup Script
DATE=$(date +%Y%m%d_%H%M%S)
BACKUP_DIR="/backups/n8n"
N8N_DATA_DIR="/home/node/.n8n"
# Create backup directory
mkdir -p $BACKUP_DIR
# Stop n8n temporarily
docker-compose stop n8n
# Create tarball of all n8n data
tar -czf "$BACKUP_DIR/n8n_backup_$DATE.tar.gz" -C / "$N8N_DATA_DIR"
# Backup database
docker exec postgres pg_dump -U n8n n8n > "$BACKUP_DIR/database_$DATE.sql"
# Start n8n again
docker-compose start n8n
# Keep only last 7 days of backups
find $BACKUP_DIR -name "*.tar.gz" -mtime +7 -delete
find $BACKUP_DIR -name "*.sql" -mtime +7 -delete
echo "Backup completed: n8n_backup_$DATE.tar.gz"
Backup Verification Script:
#!/bin/bash
# Test backup integrity monthly
LATEST_BACKUP=$(ls -t /backups/n8n/n8n_backup_*.tar.gz | head -1)
TEST_DIR="/tmp/backup_test"
echo "Testing backup: $LATEST_BACKUP"
mkdir -p $TEST_DIR
tar -tzf $LATEST_BACKUP > /dev/null && echo "✓ Backup archive is valid" || echo "✗ Backup archive is corrupted"
Troubleshooting Common Issues 🔧
Every n8n admin runs into these problems eventually.
Docker Update Issues
Problem: n8n not updating despite pulling latest image[18]
Solution:
# Force recreation of containers
docker-compose down
docker system prune -a
docker-compose up -d --force-recreate
Authentication Failures
Problem: “Request failed with status code 401”
Solution:
- Check API credentials in nodes
- Verify OAuth tokens haven’t expired
- Confirm API endpoint URLs are correct
Database Connection Issues
Problem: “Cannot connect to database”
Solution:
# Test database connectivity
docker exec -it postgres-container psql -U n8n -d n8n -c "SELECT 1;"
# Check connection settings
echo $DB_POSTGRESDB_HOST
echo $DB_POSTGRESDB_PORT
Performance Issues
Problem: Workflows timing out or running slowly
Solutions:
- Increase timeout:
EXECUTIONS_PROCESS_TIMEOUT=3600
- Reduce concurrency:
EXECUTIONS_CONCURRENCY=2
- Monitor resource usage with
htop
or Netdata
What’s Coming in 2025? 🚀
n8n is planning some exciting updates for 2025[19]:
- Better scalability and performance improvements
- Enhanced AI integration features
- Improved production readiness tools
- Better team collaboration features
- Autonomous multi-agent workflows (under consideration)
The n8n community is growing rapidly, with over 700 people attending their recent community livestream[19]. This momentum means more features, better documentation, and stronger community support.
Cost Comparison: The Real Numbers
Let’s break down the actual costs you’ll face:
Scenario | n8n Cloud | Self-Hosted VPS | Annual Savings |
---|---|---|---|
Small Team (5 workflows) | €288/year | $72/year | €216 |
Growing Business (20 workflows) | €720/year | $144/year | €576 |
Enterprise (Unlimited) | €1200+/year | $240/year | €960+ |
Hidden Self-Hosting Costs to Consider:
- Domain name: ~$12/year
- Backup storage: $12-60/year
- Monitoring tools: $0-120/year
- Your time for setup/maintenance: 2-4 hours/month
Even accounting for these extras, you’re still saving hundreds of dollars annually.
Conclusion: You’re Now an n8n Expert 🎉
Congratulations! You’ve just learned everything you need to run a production-ready n8n instance. From choosing the right VPS provider to implementing advanced monitoring and backup strategies, you’re now equipped to handle real-world automation challenges.
Key Takeaways:
- Start Simple: Begin with a basic Docker Compose setup and grow from there
- Security First: Never skip basic security hardening – it’s not optional[16]
- Monitor Everything: Set up monitoring before you need it, not after problems start
- Backup Religiously: Test your backups regularly – they’re worthless if they don’t work
- Plan for Growth: Design your setup to scale with your automation needs
Remember, self-hosting n8n is a journey, not a destination. Your setup will evolve as your automation needs grow, and that’s perfectly normal. The foundation you’ve built here will serve you well as you expand into more complex workflows and integrations.
Recommended Next Steps:
- Choose your VPS provider based on your budget and location needs
- Start with Docker Compose deployment for maximum flexibility
- Set up monitoring and backups from day one
- Join the n8n community for ongoing support and inspiration
- Explore advanced features like queue mode and custom nodes
The world of workflow automation is vast and exciting. With your self-hosted n8n instance humming along smoothly, you’re ready to automate anything that comes your way. Happy automating!
This article was last updated in June 2025. VPS pricing and features may change. Always verify current pricing with providers before making decisions.
[1] https://get-n8n-service.pages.dev/blog/n8n-cloud-vs-self-hosted-pricing/
[2] https://docs.n8n.io/hosting/installation/npm/
[3] https://www.youtube.com/watch?v=yWKjRsPpvZI
[4] https://osher.com.au/blog/how-to-host-n8n-with-docker/
[5] https://thewebsiteengineer.com/blog/how-to-run-n8n-with-docker-compose-to-use-custom-npm-modules/
[6] https://docs.n8n.io/embed/prerequisites/
[7] https://www.reddit.com/r/n8n/comments/1ksmzhv/whats_the_cheapest_probably_free_and_the_easiest/
[8] https://www.youtube.com/watch?v=1wplnKtxyyo
[9] https://bloggingjoy.com/best-n8n-vps-hosting/
[10] https://www.hostinger.com/vps-hosting
[11] https://onedollarvps.com/pricing/digitalocean-pricing
[12] https://getdeploying.com/hetzner
[13] https://lowendtalk.com/discussion/200033/hetzner-black-friday-price-increase-surprise
[14] https://onedollarvps.com/pricing/vultr-pricing
[15] https://vpssos.com/blog/n8n-docker-compose
[16] https://mathias.rocks/blog/2025-01-20-n8n-security-best-practices
[17] https://github.com/n8n-io/n8n/security/advisories/GHSA-c8hm-hr8h-5xjw
[18] https://community.n8n.io/t/n8n-not-updating-docker-compose/89181
[19] https://viewyonder.com/whats-happening-with-n8n-in-2025/
[20] https://community.n8n.io/t/how-do-i-self-host/104282
[21] https://www.blackhatworld.com/seo/the-most-underrated-way-to-automate-money-in-2025-n8n-self-hosted.1709887/page-2
[22] https://community.n8n.io/t/security-and-maintenance-with-self-hosting/87226
[23] https://www.hostinger.com/pricing
[24] https://www.hostinger.com/tutorials/how-much-does-website-hosting-cost
[25] https://bloggingjoy.com/hostinger-pricing-plans-review/
[26] https://www.saasworthy.com/product/digitalocean-droplets/pricing
[27] https://www.vultr.com/pricing/
[28] https://www.vultr.com
[29] https://onedollarvps.com/pl/pricing/vultr-pricing
[30] https://community.n8n.io/t/n8n-self-hosted-docker-compose-latest-version/122310
[31] https://github.com/n8n-io/n8n/blob/master/packages/cli/BREAKING-CHANGES.md
[32] https://get-n8n.com/blog/n8n-cloud-vs-self-hosted-pricing/
[33] https://hostadvice.com/hosting-company/hostinger-reviews/hostinger-vps-hosting-review/
[34] https://cybernews.com/best-web-hosting/hostinger-review/pricing/
[35] https://aff.ninja/vultr-pricing-plans/
[36] https://www.mamboserver.com/hosting/vultr-review/
[37] https://gizmodo.com/best-web-hosting/n8n
[38] https://www.linkedin.com/pulse/comprehensive-guide-deploying-n8n-community-edition-locally-khan-hf5of
[39] https://dev.to/ralphsebastian/how-to-selfhost-n8n-in-cloudlocally-with-docker-4n04