AI Compare
​
​
ToolsArticlesServices
Best for
    All articles

    Sales

    AI tools for finding leads, qualifying them, preparing quotes, following up and keeping the CRM up to date.

    Marketing

    AI tools for content, social media, images, video, SEO and campaigns.

    Customer service

    AI tools for answering customer emails, chats and calls, handling requests and escalating the hard cases.

    Operations

    AI tools for running the daily work: workflows, scheduling, projects, purchasing and delivery.

    Finance

    AI tools for invoices, bookkeeping, reconciliation, spreadsheets and financial reporting.

    Management & Admin

    AI tools for owners, managers and office staff: planning, reports, documents, meetings, scheduling and everyday admin.

    HR

    AI tools for hiring, screening candidates, onboarding, training and answering employee questions.

    Legal & Compliance

    AI tools for reviewing contracts, tracking deadlines and preparing compliance work for a qualified person to check.

    IT & Development

    AI tools for developers and IT teams: coding, AI models, agents, infrastructure and integrations.

Find AI tools for your team
AllAssistantsWriting & DocsImagesVideoAudioAI AgentsAutomationCode
← All articles

Self-Host n8n on a VPS for Under $10/Month

October 7, 2026 · By AI Compare

A production-ready n8n setup with HTTPS and Postgres for the price of a small server.

Install and setup

What you get

A production-ready n8n instance with HTTPS, a real database and automatic restarts, on a small virtual private server (VPS). Software cost: $0. Server cost: typically $5–10 per month.

Cost breakdown

ItemTypical monthly costNotes
VPS (1–2 vCPU, 2–4 GB RAM)$5–101 GB works for light use; 2 GB+ is more comfortable
Domain name~$1 (about $10–15/year)Optional, but needed for clean HTTPS webhooks
Backups / snapshots$1–2Most providers charge ~20% of the server price
n8n Community Edition$0Unlimited workflows and executions
TotalAbout $7–13

VPS prices move a lot in 2026. DigitalOcean's 1 GB droplet is $6/month; Hetzner's cheapest cost-optimised plans have been intermittently unavailable this year. Compare current prices before you choose a provider.

Compare that with n8n Cloud Starter at €20/month for 2,500 executions. If you run more than a few thousand executions a month, self-hosting pays for itself immediately.

What you need

  • A VPS running Ubuntu 22.04 or 24.04.
  • A domain or subdomain, for example n8n.yourcompany.com, pointed at the server's IP with an A record.
  • Basic comfort with SSH and the command line.

Step 1: Secure the server

ssh root@YOUR_SERVER_IP
apt update && apt upgrade -y
adduser n8nadmin && usermod -aG sudo n8nadmin
ufw allow OpenSSH && ufw allow 80 && ufw allow 443 && ufw enable

Use SSH keys and disable password login once you have confirmed key access works.

Step 2: Install Docker

curl -fsSL https://get.docker.com | sh
usermod -aG docker n8nadmin

Log out and back in as n8nadmin.

Step 3: Create the Docker Compose file

Create a folder and a docker-compose.yml:

services:
  caddy:
    image: caddy:2
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile
      - caddy_data:/data

  postgres:
    image: postgres:16
    restart: unless-stopped
    environment:
      POSTGRES_USER: n8n
      POSTGRES_PASSWORD: change-this-password
      POSTGRES_DB: n8n
    volumes:
      - db_data:/var/lib/postgresql/data

  n8n:
    image: docker.n8n.io/n8nio/n8n
    restart: unless-stopped
    environment:
      DB_TYPE: postgresdb
      DB_POSTGRESDB_HOST: postgres
      DB_POSTGRESDB_DATABASE: n8n
      DB_POSTGRESDB_USER: n8n
      DB_POSTGRESDB_PASSWORD: change-this-password
      N8N_HOST: n8n.yourcompany.com
      N8N_PROTOCOL: https
      WEBHOOK_URL: https://n8n.yourcompany.com/
      GENERIC_TIMEZONE: Europe/Budapest
      N8N_ENCRYPTION_KEY: generate-a-long-random-string
    volumes:
      - n8n_data:/home/node/.n8n
    depends_on:
      - postgres

volumes:
  caddy_data:
  db_data:
  n8n_data:

And a Caddyfile next to it:

n8n.yourcompany.com {
    reverse_proxy n8n:5678
}

Caddy gets and renews a free HTTPS certificate automatically.

Step 4: Start it

docker compose up -d

Open https://n8n.yourcompany.com and create the owner account.

Step 5: Back up properly

  • Save N8N_ENCRYPTION_KEY somewhere safe. Without it, your stored credentials cannot be decrypted.
  • Enable the provider's weekly snapshots.
  • Dump the database regularly: docker compose exec postgres pg_dump -U n8n n8n > backup.sql.
  • Export workflows as JSON or connect Git (paid feature) for version history.

Step 6: Update safely

docker compose pull
docker compose up -d

Take a snapshot before major version upgrades and read the release notes.

How big a server do you need?

WorkloadSuggested size
A few workflows, light schedules1 vCPU, 1–2 GB RAM
Dozens of workflows, webhooks, moderate volume2 vCPU, 4 GB RAM
Heavy volume or large files and AI workflows4 vCPU, 8 GB RAM, consider queue mode with Redis

Next steps

  • Connect credentials in n8n
  • n8n Cloud vs self-hosted

Related services and topics

Infrastructure auditn8nAutomation platformsAutomationIT & Dev

Tools in this article

n8n

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

More articles

October 7, 2026 · AI Compare

n8n Cloud vs Self-Hosted

Pay for convenience or run it yourself? A clear comparison and checklist to decide.

Read article →

Install and setup
n8n logo
October 7, 2026 · AI Compare

Run Local LLMs with n8n and Ollama (Private AI, No API Costs)

Private AI workflows with no per-token costs: connect n8n to local models with Ollama.

Read article →

Install and setup
n8n logo
Ollama logo
October 7, 2026 · AI Compare

How to Install n8n: Cloud vs Docker vs npm

Three ways to run n8n, with exact commands and when to choose each one.

Read article →

Install and setup
n8n logo
October 7, 2026 · AI Compare

What Is n8n? The Open-Source Workflow Automation Tool Explained

n8n is a source-available automation tool you can self-host for free. Here is how it works and who it is for.

Read article →

Get started
n8n logo
Help
Pick an answer below
Hi! I can point you to the right tool or guide. What are you looking for?
Browse all articles