All Guides

n8n Self-Hosting: The Complete Guide 2026

Install n8n on your own VPS. Docker setup, reverse proxy, SSL - explained step by step.

Dirk Hesse
February 5, 2026
3 min read

Want to self-host n8n instead of using the cloud version? Good decision! In this guide, we'll show you step by step how to install n8n on an affordable VPS.

Why Self-Host n8n?

  • Cost: From €3/month instead of €20+ for the cloud
  • Privacy: Your workflows, your data
  • No Limits: Unlimited executions and workflows

Hardware Requirements

Before you start, you should know what hardware you need. This depends on your usage:

UsageRAMCPUStorage
Hobby (< 20 workflows)2 GB1 vCPU20 GB
Standard (20-50 workflows)4 GB2 vCPU40 GB
Pro (50+ workflows)8 GB4 vCPU80 GB

Our recommendation for getting started:

Hetzner Logo

CPX42

Cheapest offer

30.33

/mo

8 vCPU
16 GB
240 GB
3.3 (2.8k)
View →

Step 1: Set Up VPS

After purchasing your VPS, connect via SSH:

ssh root@your-server-ip

Then update the system:

apt update && apt upgrade -y

Step 2: Install Docker

n8n runs best in Docker. Installation:

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

Install Docker Compose:

apt install docker-compose-plugin -y

Step 3: Start n8n with Docker Compose

Create a folder and the docker-compose.yml:

mkdir -p /opt/n8n && cd /opt/n8n
version: "3"
services:
  n8n:
    image: n8nio/n8n
    restart: always
    ports:
      - "5678:5678"
    environment:
      - N8N_HOST=n8n.your-domain.com
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - WEBHOOK_URL=https://n8n.your-domain.com/
    volumes:
      - n8n_data:/home/node/.n8n

volumes:
  n8n_data:

Start with:

docker compose up -d

Step 4: Reverse Proxy with Caddy

For HTTPS we recommend Caddy - it configures SSL automatically:

apt install -y caddy

/etc/caddy/Caddyfile:

n8n.your-domain.com {
    reverse_proxy localhost:5678
}
systemctl reload caddy

Conclusion

With this setup you have a fully-featured n8n installation that:

  • Automatically renews SSL certificates
  • Starts automatically on reboots
  • Stores your data persistently

Total cost: From €3.49/month for the server.


Frequently Asked Questions

Find the Right Server

Use our calculator to find the optimal VPS for your n8n installation

To n8n Calculator

Matching VPS Calculator

n8n Self-Hosting: Die besten VPS 2026

Finde den perfekten Server für deine n8n Automation

Go to Calculator

Related Articles