The VPS Setup Most n8n Users Never Try

Der n8n-VPS-Trick, den kaum jemand kennt

🇬🇧 English

This article contains affiliate links. If you buy through them, we may earn a commission at no extra cost to you.

Why Self-Host n8n Instead of Using the Cloud Version?

n8n's cloud plan is convenient, but it comes with workflow limits, execution caps, and a monthly fee that grows as your automations scale. Self-hosting on a Virtual Private Server (VPS) gives you unlimited workflows, full data ownership, and a flat infrastructure cost — often under €10 per month.

If you want to run n8n without restrictions, the first thing you need is a reliable VPS. Hostinger offers web and VPS hosting with a one-click n8n template, which means you can skip most of the manual setup and go live in minutes.

What You Need Before You Start

  • A VPS with at least 1 vCPU and 1 GB RAM (2 GB recommended)
  • Ubuntu 22.04 LTS (or similar Debian-based distro)
  • A domain name pointed to your server's IP address
  • SSH access to your server
  • Basic comfort with the Linux command line

Step 1 — Connect to Your VPS via SSH

Open your terminal and connect to your server:

ssh root@your-server-ip

Once logged in, update the system packages before doing anything else:

apt update && apt upgrade -y

Step 2 — Install Docker and Docker Compose

n8n runs best inside Docker, which keeps the installation clean and easy to update.

apt install -y docker.io docker-compose

Enable Docker to start on boot:

systemctl enable docker
systemctl start docker

Step 3 — Create the n8n Docker Compose File

Create a working directory and a docker-compose.yml file:

mkdir ~/n8n && cd ~/n8n
nano docker-compose.yml

Paste the following configuration:

version: '3'
services:
 n8n:
 image: n8nio/n8n
 restart: always
 ports:
 - '5678:5678'
 environment:
 - N8N_HOST=your-domain.com
 - N8N_PORT=5678
 - N8N_PROTOCOL=https
 - WEBHOOK_URL=https://your-domain.com/
 volumes:
 - ~/.n8n:/home/node/.n8n

Replace your-domain.com with your actual domain. Save and exit with Ctrl+X, then Y.

Step 4 — Set Up a Reverse Proxy with Nginx and HTTPS

Running n8n on plain HTTP is not safe for production. Use Nginx as a reverse proxy and Certbot for free SSL certificates.

apt install -y nginx certbot python3-certbot-nginx

Create an Nginx config for your domain:

nano /etc/nginx/sites-available/n8n

Add this configuration block:

server {
 server_name your-domain.com;
 location / {
 proxy_pass http://localhost:5678;
 proxy_set_header Host $host;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_http_version 1.1;
 proxy_set_header Upgrade $http_upgrade;
 proxy_set_header Connection 'upgrade';
 }
}

Enable the config and obtain your SSL certificate:

ln -s /etc/nginx/sites-available/n8n /etc/nginx/sites-enabled/
certbot --nginx -d your-domain.com
systemctl reload nginx

Step 5 — Start n8n

Navigate back to your n8n directory and bring the container up:

cd ~/n8n
docker-compose up -d

Visit https://your-domain.com in your browser. You should see the n8n setup screen. Create your admin account and you're ready to build workflows.

Step 6 — Keep n8n Updated

Updating is straightforward with Docker:

docker-compose pull
docker-compose up -d

Run this whenever a new n8n version is released to stay current and secure.

Useful Tips for a Stable Setup

  • Backups: Regularly back up the ~/.n8n folder — it contains all your workflows and credentials.
  • Firewall: Use ufw to allow only ports 22, 80, and 443.
  • Monitoring: Add a simple uptime monitor (e.g. UptimeRobot free tier) so you know if n8n goes down.
  • Resources: If you run many concurrent workflows, upgrade to a 2 GB or 4 GB RAM VPS plan.

Is Self-Hosting n8n Worth It?

For anyone running more than a handful of automations, the answer is almost always yes. You eliminate per-execution pricing, retain full control over your data, and can integrate with internal tools that the cloud version can't reach. The initial setup takes about 30 minutes, and maintenance afterwards is minimal.

If you want to self-host n8n without wrestling with complex server configuration, you can get started via Hostinger — including a one-click n8n VPS template — to go from zero to a running automation server in minutes.

🇩🇪 Deutsch

Dieser Artikel enthält Affiliate-Links (Werbung). Kaufst du darüber, erhalten wir ggf. eine Provision – für dich ohne Mehrkosten.

Warum n8n selbst hosten statt die Cloud-Version nutzen?

Der Cloud-Plan von n8n ist praktisch, aber er kommt mit Workflow-Limits, Ausführungsbeschränkungen und monatlichen Kosten, die mit wachsender Nutzung steigen. Wer n8n auf einem eigenen Virtual Private Server (VPS) hostet, erhält unbegrenzte Workflows, vollständige Datenkontrolle und planbare Infrastrukturkosten — oft unter 10 € pro Monat.

Für alle, die Wert auf Datenschutz und DSGVO-Konformität legen, ist netcup eine besonders interessante Option: ein deutscher Hosting-Anbieter mit Servern in Deutschland, der sich ideal für Self-Hosting-Projekte eignet.

Wer lieber eine schnelle Einrichtung mit One-Click-Template bevorzugt, kann alternativ auf Hostinger zurückgreifen, das ein fertiges n8n-VPS-Template mitbringt.

Was du vorher brauchst

  • Ein VPS mit mindestens 1 vCPU und 1 GB RAM (2 GB empfohlen)
  • Ubuntu 22.04 LTS oder eine ähnliche Debian-basierte Distribution
  • Eine Domain, deren DNS-Eintrag auf die IP deines Servers zeigt
  • SSH-Zugang zum Server
  • Grundkenntnisse der Linux-Kommandozeile

Schritt 1 — Per SSH mit dem VPS verbinden

Öffne dein Terminal und verbinde dich mit dem Server:

ssh root@deine-server-ip

Aktualisiere anschließend die Systempakete:

apt update && apt upgrade -y

Schritt 2 — Docker und Docker Compose installieren

n8n läuft am stabilsten in einem Docker-Container. Das macht Updates einfach und hält das System sauber.

apt install -y docker.io docker-compose

Docker beim Systemstart automatisch aktivieren:

systemctl enable docker
systemctl start docker

Schritt 3 — Die Docker-Compose-Datei für n8n erstellen

Erstelle ein Verzeichnis und lege die Konfigurationsdatei an:

mkdir ~/n8n && cd ~/n8n
nano docker-compose.yml

Füge folgende Konfiguration ein:

version: '3'
services:
 n8n:
 image: n8nio/n8n
 restart: always
 ports:
 - '5678:5678'
 environment:
 - N8N_HOST=deine-domain.de
 - N8N_PORT=5678
 - N8N_PROTOCOL=https
 - WEBHOOK_URL=https://deine-domain.de/
 volumes:
 - ~/.n8n:/home/node/.n8n

Ersetze deine-domain.de durch deinen echten Domainnamen. Speichern mit Ctrl+X, dann Y.

Schritt 4 — Reverse Proxy mit Nginx und HTTPS einrichten

Für den produktiven Betrieb brauchst du HTTPS. Nutze Nginx als Reverse Proxy und Certbot für kostenlose SSL-Zertifikate.

apt install -y nginx certbot python3-certbot-nginx

Nginx-Konfiguration für deine Domain erstellen:

nano /etc/nginx/sites-available/n8n

Folgenden Block einfügen:

server {
 server_name deine-domain.de;
 location / {
 proxy_pass http://localhost:5678;
 proxy_set_header Host $host;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_http_version 1.1;
 proxy_set_header Upgrade $http_upgrade;
 proxy_set_header Connection 'upgrade';
 }
}

Konfiguration aktivieren und SSL-Zertifikat beantragen:

ln -s /etc/nginx/sites-available/n8n /etc/nginx/sites-enabled/
certbot --nginx -d deine-domain.de
systemctl reload nginx

Schritt 5 — n8n starten

Wechsle in dein n8n-Verzeichnis und starte den Container:

cd ~/n8n
docker-compose up -d

Öffne https://deine-domain.de im Browser. Der n8n-Einrichtungsbildschirm erscheint. Lege deinen Admin-Account an — fertig.

Schritt 6 — n8n aktuell halten

Updates funktionieren mit Docker unkompliziert:

docker-compose pull
docker-compose up -d

Führe diese Befehle aus, sobald eine neue n8n-Version erscheint.

Tipps für einen stabilen Betrieb

  • Backups: Sichere regelmäßig den Ordner ~/.n8n — dort liegen alle Workflows und Zugangsdaten.
  • Firewall: Nutze ufw und erlaube nur die Ports 22, 80 und 443.
  • Monitoring: Ein kostenloser Uptime-Monitor wie UptimeRobot gibt dir sofort Bescheid, wenn n8n nicht erreichbar ist.
  • Ressourcen: Bei vielen parallelen Workflows empfiehlt sich ein VPS-Plan mit 2 GB oder 4 GB RAM.

Lohnt sich Self-Hosting für n8n?

Für alle, die mehr als ein paar Automationen betreiben, lautet die Antwort fast immer ja. Du sparst Ausführungskosten, behältst die volle Kontrolle über deine Daten und kannst n8n mit internen Tools verbinden, die die Cloud-Version nicht erreicht. Die Einrichtung dauert etwa 30 Minuten, der laufende Aufwand ist gering.

Wenn du n8n DSGVO-konform auf einem deutschen Server selbst hosten möchtest, kannst du über netcup loslegen — inklusive Server-Infrastruktur in Deutschland — und deine Automatisierungen datenschutzkonform betreiben.