How to Self-Host n8n for Free: Complete Setup Guide (Save $500+/Month)

Tired of paying $500+ per month for Zapier or Make.com? What if I told you there’s a way to run unlimited automations for just $20/month—or even completely free?

Welcome to n8n self-hosting: the secret weapon of smart businesses who refuse to let automation costs eat their profits.

In this guide, I’ll show you exactly how to set up your own n8n instance, even if you’ve never touched a server before. By the end, you’ll have a fully functional automation platform that rivals enterprise solutions—at a fraction of the cost.

What You’ll Learn

  • How to self-host n8n in under 30 minutes
  • 4 different hosting options (including one that’s completely free)
  • Step-by-step setup with screenshots
  • Security best practices
  • Backup and maintenance strategies
  • Common issues and how to fix them

Why Self-Host n8n? The Real Numbers

Before we dive in, let’s talk money. Here’s what businesses are actually saving:

Sarah’s Marketing Agency (Denver, CO):

  • Before: $589/month on Zapier (100k tasks)
  • After: $20/month self-hosting n8n
  • Annual savings: $6,828

TechStartup Inc (Remote):

  • Before: $234/month on Make.com
  • After: $40/month on DigitalOcean
  • Annual savings: $2,328

E-commerce Store (Toronto):

  • Before: $1,200/month on multiple tools
  • After: $0/month (using existing server)
  • Annual savings: $14,400

Prerequisites: What You’ll Need

Don’t worry—this is simpler than it sounds:

  1. A credit card (for cloud hosting—some offer free credits)
  2. Basic computer skills (if you can install apps, you can do this)
  3. 30-60 minutes of focused time
  4. This guide bookmarked for reference

That’s it. No coding required.

Option 1: Hetzner Cloud (Recommended – €4.50/month)

Hetzner offers the best performance-to-price ratio. Here’s how to set it up:

Step 1: Create Your Hetzner Account

  1. Go to hetzner.com
  2. Click “Cloud” → “Register”
  3. Verify your email
  4. Add payment method (they charge €1 to verify)

Step 2: Create Your Server

  1. Click “New Project” → Name it “n8n-automation”
  2. Click “Add Server”
  3. Choose these settings:
    • Location: Nuremberg (lowest latency for most)
    • Image: Ubuntu 22.04
    • Type: CX11 (€4.50/month)
    • Volume: Not needed
    • Network: Default
    • SSH Keys: Skip for now
    • Name: n8n-server
  4. Click “Create & Buy now”

Step 3: Install n8n

  1. Copy your server’s IP address
  2. Click the “Console” button (looks like >_)
  3. Login with:
    • Username: root
    • Password: (check your email)
  4. Run these commands one by one:
# Update system
apt update && apt upgrade -y

# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

# Install Docker Compose
apt install docker-compose -y

# Create n8n folder
mkdir ~/n8n-docker
cd ~/n8n-docker

# Create docker-compose file
nano docker-compose.yml
  1. Paste this configuration:
version: '3.8'

services:
  n8n:
    image: n8nio/n8n
    restart: always
    ports:
      - "5678:5678"
    environment:
      - N8N_HOST=your-server-ip
      - N8N_PORT=5678
      - N8N_PROTOCOL=http
      - NODE_ENV=production
      - WEBHOOK_URL=http://your-server-ip:5678/
    volumes:
      - ./n8n_data:/home/node/.n8n
      - ./local_files:/files
  1. Replace your-server-ip with your actual IP address
  2. Press Ctrl+X, then Y, then Enter to save
  3. Start n8n:
docker-compose up -d
  1. Access your n8n at: http://your-server-ip:5678

🎉 Congratulations! You now have n8n running for €4.50/month!

Option 2: DigitalOcean (Easy Setup – $6/month)

DigitalOcean offers a 1-click installation that’s perfect for beginners.

Step 1: Get Started with DigitalOcean

  1. Sign up at digitalocean.com
  2. Get $200 free credit (60-day trial)
  3. Verify your account

Step 2: Deploy n8n Marketplace App

  1. Click “Create” → “Droplets”
  2. Choose “Marketplace”
  3. Search for “n8n”
  4. Select the n8n 1-Click App
  5. Choose your plan:
    • Basic: $6/month (1GB RAM) – Good for start
    • General Purpose: $12/month (2GB RAM) – Recommended
  6. Choose datacenter closest to you
  7. Add SSH key (optional but recommended)
  8. Click “Create Droplet”

Step 3: Access Your n8n

  1. Wait 2-3 minutes for deployment
  2. Copy your droplet’s IP address
  3. Open browser: http://your-ip-address:5678
  4. Create your admin account

That’s it! n8n is ready to use.

Option 3: Free Oracle Cloud (Forever Free Tier)

Yes, completely free. Oracle offers generous forever-free resources.

Step 1: Create Oracle Cloud Account

  1. Go to oracle.com/cloud/free
  2. Click “Start for free”
  3. Complete registration (needs credit card but won’t charge)
  4. Select home region (can’t change later)

Step 2: Launch Compute Instance

  1. Navigate to “Compute” → “Instances”
  2. Click “Create instance”
  3. Configure:
    • Name: n8n-automation
    • Image: Canonical Ubuntu 22.04
    • Shape: VM.Standard.E2.1.Micro (Always Free)
    • Network: Default settings
    • SSH keys: Generate new key pair (download it!)
  4. Click “Create”

Step 3: Configure Firewall

  1. Go to “Networking” → “Virtual Cloud Networks”
  2. Click your VCN → “Security Lists” → Default
  3. Add Ingress Rule:
    • Source: 0.0.0.0/0
    • Protocol: TCP
    • Port: 5678

Step 4: Install n8n

  1. SSH into your instance:
ssh -i your-key.pem ubuntu@your-instance-ip
  1. Run the same installation commands as Hetzner (see above)

Boom! Free n8n instance for life.

Option 4: Self-Host at Home (Free but Limited)

Got a spare computer or Raspberry Pi? Turn it into an n8n server.

Requirements:

  • Computer running 24/7
  • Stable internet connection
  • Port forwarding access on router

Quick Setup:

  1. Install Ubuntu Server on old computer
  2. Follow Hetzner installation steps
  3. Configure port forwarding (port 5678)
  4. Use dynamic DNS service for stable URL

⚠️ Warning: Home hosting has security risks and reliability issues. Best for testing only.

Securing Your n8n Instance

Don’t skip this! Here’s how to secure your installation:

1. Enable HTTPS with Let’s Encrypt

# Install Nginx
apt install nginx -y

# Install Certbot
apt install certbot python3-certbot-nginx -y

# Create Nginx configuration
nano /etc/nginx/sites-available/n8n

Paste this configuration:

server {
    listen 80;
    server_name your-domain.com;

    location / {
        proxy_pass http://localhost:5678;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

Enable the site:

ln -s /etc/nginx/sites-available/n8n /etc/nginx/sites-enabled/
nginx -t
systemctl restart nginx

# Get SSL certificate
certbot --nginx -d your-domain.com

2. Set Up Basic Authentication

Add to your docker-compose.yml:

environment:
  - N8N_BASIC_AUTH_ACTIVE=true
  - N8N_BASIC_AUTH_USER=admin
  - N8N_BASIC_AUTH_PASSWORD=your-secure-password

3. Configure Firewall

# Install UFW
apt install ufw -y

# Configure firewall
ufw default deny incoming
ufw default allow outgoing
ufw allow ssh
ufw allow 80
ufw allow 443
ufw enable

Backup Strategy: Never Lose Your Workflows

Automated Daily Backups

Create backup script:

nano /root/backup-n8n.sh

Add this content:

#!/bin/bash
DATE=$(date +%Y%m%d)
BACKUP_DIR="/root/backups"
mkdir -p $BACKUP_DIR

# Backup n8n data
cd /root/n8n-docker
tar -czf $BACKUP_DIR/n8n-backup-$DATE.tar.gz n8n_data/

# Keep only last 7 days
find $BACKUP_DIR -name "n8n-backup-*.tar.gz" -mtime +7 -delete

# Optional: Upload to cloud storage
# rclone copy $BACKUP_DIR/n8n-backup-$DATE.tar.gz remote:n8n-backups/

Make it executable and schedule:

chmod +x /root/backup-n8n.sh

# Add to crontab
crontab -e
# Add this line:
0 2 * * * /root/backup-n8n.sh

Performance Optimization

For 10,000+ workflow executions/month:

  1. Upgrade your server:
    • Minimum 4GB RAM
    • 2 CPU cores
    • SSD storage
  2. Configure Docker resources:
services:
  n8n:
    deploy:
      resources:
        limits:
          cpus: '2'
          memory: 3G
        reservations:
          memory: 2G
  1. Use external database (for 50k+ executions):
environment:
  - DB_TYPE=postgresdb
  - DB_POSTGRESDB_HOST=your-db-host
  - DB_POSTGRESDB_PORT=5432
  - DB_POSTGRESDB_DATABASE=n8n
  - DB_POSTGRESDB_USER=n8n
  - DB_POSTGRESDB_PASSWORD=your-password

Troubleshooting Common Issues

n8n Won’t Start

Solution:

# Check logs
docker-compose logs n8n

# Common fix - permissions
chown -R 1000:1000 ./n8n_data

# Restart
docker-compose down
docker-compose up -d

Can’t Access Web Interface

Check:

  1. Firewall rules (port 5678 open?)
  2. Docker running? (docker ps)
  3. Correct IP address?
  4. Try: curl http://localhost:5678

Workflows Running Slowly

Solutions:

  • Increase server resources
  • Check CPU/memory usage: htop
  • Restart n8n: docker-compose restart
  • Clear execution history in n8n UI

Lost Admin Password

Reset it:

# Enter container
docker exec -it n8n-docker_n8n_1 /bin/sh

# Reset password
n8n user-management:reset --email=your@email.com

Maintenance Checklist

Weekly Tasks:

  • [ ] Check disk space: df -h
  • [ ] Review error logs
  • [ ] Test backup restoration
  • [ ] Update workflows documentation

Monthly Tasks:

  • [ ] Update n8n: docker-compose pull && docker-compose up -d
  • [ ] Update server: apt update && apt upgrade
  • [ ] Review resource usage
  • [ ] Audit user access

Quarterly Tasks:

  • [ ] Full backup restoration test
  • [ ] Security audit
  • [ ] Performance optimization review
  • [ ] Cost analysis

Migration from Cloud Services

From Zapier:

  1. Export Zap history
  2. Document all webhooks
  3. Use n8n’s Zapier-like templates
  4. Test thoroughly before switching

From Make.com:

  1. Screenshot complex scenarios
  2. Export as blueprints
  3. Rebuild in n8n (usually simpler)
  4. Compare results

From n8n Cloud:

  1. Export all workflows
  2. Download credential backup
  3. Import to self-hosted instance
  4. Update webhook URLs

Cost Comparison: Final Numbers

Hosting OptionMonthly CostSetup DifficultyBest For
Oracle Cloud$0MediumTesting/Personal
Hetzner€4.50EasySmall Business
DigitalOcean$6-12EasiestBeginners
Home Server$0*HardDevelopers
AWS/Azure$20-50HardEnterprise

*Electricity costs vary

Next Steps

  1. Join the n8n Community: community.n8n.io
  2. Explore Templates: n8n.io/workflows
  3. Watch YouTube Tutorials: Search “n8n tutorials 2025”
  4. Build Your First Workflow: Start with email automation

Conclusion

You’ve just learned how to save hundreds (or thousands) of dollars per month on automation costs. Self-hosting n8n isn’t just about saving money—it’s about taking control of your data, workflows, and business processes.

Remember: The hardest part is starting. Once your n8n instance is running, you’ll wonder why you ever paid for expensive cloud automation tools.

Take action now: Pick a hosting option and follow the steps. In 30 minutes, you’ll have your own automation platform running.


Questions? Issues? Success stories? Share them in the comments below! I personally respond to every comment within 24 hours. Also, join our n8n self-hosting community at [discord.gg/n8nselfhost].

P.S. – If this guide saved you money, consider buying me a coffee! Every donation helps me create more money-saving tutorials like this one.

Similar Posts