netcup VPS n8n Self-Hosted Setup – GDPR-Compliant

netcup VPS n8n selbst hosten – DSGVO-konform in 30 Min

🇬🇧 English

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

n8n on a netcup VPS: Self-Hosted, GDPR-Compliant, Ready in 30 Minutes

If you process personal data inside your automation workflows — customer names, email addresses, form submissions — storing that data on US-based cloud servers creates real GDPR exposure. The cleanest solution is to run your own n8n instance on a VPS whose data centre sits inside the EU. This guide walks you through the complete setup on a netcup VPS, from a blank Ubuntu server to a fully operational n8n instance with HTTPS, in roughly 30 minutes.

For the automation layer itself, get it from n8n — the open-source workflow tool ships with 400+ integrations and costs nothing to self-host, so you only pay for the VPS underneath it.

Why Self-Host n8n for GDPR Compliance?

When you use a SaaS automation platform, your workflow payloads — including any personal data — transit and rest on the provider's infrastructure. Under GDPR Article 28, that makes the provider a data processor, and you need a valid Data Processing Agreement plus confirmation that data stays in the EEA.

Self-hosting eliminates that dependency entirely. Your data never leaves your server. Combined with a VPS hosted in Germany, you get:

  • Data residency inside the EU — no Schrems II concerns
  • Full control over retention and deletion — purge execution logs on your schedule
  • No per-workflow or per-execution pricing — scale freely
  • Auditability — you own the database and can produce records for a supervisory authority

What You Need Before You Start

  • A netcup VPS (VPS 1000 G11 or higher recommended — 2 vCores, 2 GB RAM)
  • Ubuntu 22.04 LTS as the OS image
  • A domain or subdomain pointed at the VPS IP (e.g. n8n.yourdomain.com)
  • SSH access to the server
  • About 30 minutes

Step 1 — Provision Your netcup VPS

Log in to the netcup customer control panel (SCP), order a VPS, and select Ubuntu 22.04 LTS as the image. Once the server is active, note the IPv4 address and set your DNS A record now — propagation takes a few minutes and you will need it working before the SSL step.

Step 2 — Initial Server Hardening

Connect via SSH as root, then run the following to update packages and create a non-root user:

  • apt update && apt upgrade -y
  • adduser n8nuser — follow the prompts
  • usermod -aG sudo n8nuser
  • Copy your SSH public key to the new user and disable root SSH login in /etc/ssh/sshd_config
  • Enable UFW: ufw allow OpenSSH && ufw allow 80 && ufw allow 443 && ufw enable

Step 3 — Install Docker and Docker Compose

n8n's recommended self-host method is Docker. Install it with the official convenience script:

  • curl -fsSL https://get.docker.com | sh
  • usermod -aG docker n8nuser
  • Log out and back in as n8nuser to apply the group change
  • Verify: docker --version

Step 4 — Create the Docker Compose File

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

  • mkdir ~/n8n && cd ~/n8n
  • Create docker-compose.yml with the following services: n8n, Postgres (for persistent storage), and Caddy (for automatic HTTPS)

A minimal but production-ready compose file looks like this:

  • Postgres service — image postgres:15, named volume postgres_data, environment variables for POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB
  • n8n service — image n8nio/n8n, depends on Postgres, environment variables: DB_TYPE=postgresdb, DB_POSTGRESDB_HOST=postgres, N8N_HOST=n8n.yourdomain.com, N8N_PROTOCOL=https, WEBHOOK_URL=https://n8n.yourdomain.com/, N8N_ENCRYPTION_KEY (generate with openssl rand -hex 24), named volume n8n_data
  • Caddy service — image caddy:2, ports 80 and 443, a simple Caddyfile that reverse-proxies to n8n and handles Let's Encrypt certificates automatically

Sample Caddyfile

Mount a Caddyfile into the Caddy container at /etc/caddy/Caddyfile. Its content should be:

  • n8n.yourdomain.com { reverse_proxy n8n:5678 }

Caddy will obtain and renew a Let's Encrypt TLS certificate automatically as long as your DNS record is live.

Step 5 — Configure GDPR-Relevant Environment Variables

n8n stores execution data in its database. For GDPR compliance, limit retention by adding these variables to the n8n service:

  • EXECUTIONS_DATA_PRUNE=true — enables automatic pruning
  • EXECUTIONS_DATA_MAX_AGE=72 — keeps execution data for 72 hours (adjust to your policy)
  • EXECUTIONS_DATA_SAVE_ON_SUCCESS=none — do not persist payload data for successful runs if you don't need it
  • N8N_DIAGNOSTICS_ENABLED=false — disable telemetry sent to n8n's servers
  • N8N_VERSION_NOTIFICATIONS_ENABLED=false — optional, reduces outbound calls

Step 6 — Start the Stack

  • docker compose up -d
  • Watch logs: docker compose logs -f n8n
  • Wait about 60 seconds for Postgres to initialise and n8n to run its migrations
  • Open https://n8n.yourdomain.com in a browser — you should see the n8n setup wizard

Create your owner account. The credentials are stored in your Postgres database on the netcup VPS — nowhere else.

Step 7 — Persistent Backups

Schedule a daily Postgres dump to a local file and optionally sync it to a GDPR-compliant object storage bucket (e.g. netcup S3-compatible storage or a Hetzner Storage Box in Germany):

  • docker exec postgres pg_dump -U n8nuser n8n > /home/n8nuser/backups/n8n_$(date +%F).sql
  • Add this to a cron job via crontab -e — e.g. daily at 02:00
  • Keep backups for at least 30 days, or align with your data retention policy

Step 8 — First Workflow: Verify Everything Works

In the n8n editor, create a simple test workflow:

  • Trigger: Manual trigger
  • Node: HTTP Request to https://httpbin.org/get
  • Node: Set node to extract the origin field (this will show your VPS IP — confirming data leaves from your server, not a US cloud)

Run the workflow. The IP shown should match your netcup VPS address. That is your GDPR audit trail: all processing happens on EU soil.

Keeping n8n Up to Date

Pull the latest image and recreate the container with zero downtime:

  • docker compose pull n8n
  • docker compose up -d n8n

Postgres data persists in named volumes, so upgrades are non-destructive. Always back up before a major version bump.

Summary: What You Have Built

  • A self-hosted n8n instance running on a German VPS
  • HTTPS via automatic Let's Encrypt certificates through Caddy
  • PostgreSQL for reliable, persistent workflow storage
  • GDPR-aligned execution data pruning and telemetry disabled
  • A daily backup routine you fully control

From here, you can build any workflow you like — connecting CRMs, sending emails, processing webhook data — with the confidence that personal data stays inside your infrastructure. For inspiration and ready-made workflow templates, n8n is the best starting point, with 400+ integrations and an active community template library.

If you want to run powerful workflow automation without sending personal data to third-party clouds, you can self-host the full platform via n8n — including 400+ integrations and free self-hosting — to keep every byte of your automation data GDPR-compliant on your own server.

🇩🇪 Deutsch

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

n8n auf einem netcup VPS: Selbst gehostet, DSGVO-konform, in 30 Minuten einsatzbereit

Wer in Automatisierungs-Workflows mit personenbezogenen Daten arbeitet — Kundennamen, E-Mail-Adressen, Formulareinreichungen — riskiert bei US-amerikanischen Cloud-Diensten echte DSGVO-Probleme. Die sauberste Lösung: eine eigene n8n-Instanz auf einem VPS betreiben, dessen Rechenzentrum in der EU liegt. Diese Anleitung führt dich Schritt für Schritt durch das komplette Setup auf einem netcup VPS — von einem frischen Ubuntu-Server bis zu einer vollständig funktionsfähigen n8n-Instanz mit HTTPS, in rund 30 Minuten.

Für die Automatisierungsschicht selbst kannst du direkt bei n8n starten — das Open-Source-Tool bringt 400+ Integrationen mit und lässt sich kostenlos selbst hosten. Du bezahlst nur den VPS darunter.

Für den VPS selbst ist netcup eine ausgezeichnete Wahl: ein deutscher Hosting-Anbieter mit Rechenzentren in Deutschland, der speziell für DSGVO-sensible Workloads geeignet ist.

Warum n8n selbst hosten für DSGVO-Konformität?

Wenn du eine SaaS-Automatisierungsplattform nutzt, laufen deine Workflow-Daten — einschließlich personenbezogener Informationen — über die Infrastruktur des Anbieters. Nach Art. 28 DSGVO ist dieser Anbieter dann ein Auftragsverarbeiter, und du benötigst einen gültigen Auftragsverarbeitungsvertrag sowie eine Bestätigung, dass die Daten im EWR verbleiben.

Beim Selbst-Hosting entfällt diese Abhängigkeit vollständig. Deine Daten verlassen deinen Server nie. In Kombination mit einem VPS in Deutschland erhältst du:

  • Datenspeicherung innerhalb der EU — keine Schrems-II-Problematik
  • Volle Kontrolle über Aufbewahrung und Löschung — Ausführungsprotokolle nach eigenem Zeitplan bereinigen
  • Keine per-Workflow- oder per-Ausführungs-Kosten — beliebig skalieren
  • Nachvollziehbarkeit — du besitzt die Datenbank und kannst Nachweise für Aufsichtsbehörden liefern

Was du vorher brauchst

  • Einen netcup VPS (VPS 1000 G11 oder höher empfohlen — 2 vCores, 2 GB RAM)
  • Ubuntu 22.04 LTS als OS-Image
  • Eine Domain oder Subdomain, die auf die VPS-IP zeigt (z. B. n8n.deinedomain.de)
  • SSH-Zugang zum Server
  • Etwa 30 Minuten Zeit

Schritt 1 — netcup VPS einrichten

Melde dich im netcup Kundenkontrollzentrum (SCP) an, bestelle einen VPS und wähle Ubuntu 22.04 LTS als Image. Sobald der Server aktiv ist, notiere die IPv4-Adresse und setze deinen DNS-A-Record sofort — die Propagation dauert einige Minuten, und du brauchst sie für den SSL-Schritt.

Schritt 2 — Server absichern

Verbinde dich per SSH als Root, dann führe folgende Schritte aus:

  • apt update && apt upgrade -y
  • adduser n8nuser — Eingaben folgen
  • usermod -aG sudo n8nuser
  • Deinen SSH-Public-Key zum neuen Nutzer kopieren und Root-SSH-Login in /etc/ssh/sshd_config deaktivieren
  • UFW aktivieren: ufw allow OpenSSH && ufw allow 80 && ufw allow 443 && ufw enable

Schritt 3 — Docker und Docker Compose installieren

Die empfohlene Self-Hosting-Methode von n8n ist Docker. Installiere es mit dem offiziellen Convenience-Script:

  • curl -fsSL https://get.docker.com | sh
  • usermod -aG docker n8nuser
  • Ausloggen und als n8nuser wieder einloggen, damit die Gruppenänderung greift
  • Prüfen: docker --version

Schritt 4 — Docker Compose Datei erstellen

Erstelle ein Arbeitsverzeichnis und eine docker-compose.yml-Datei:

  • mkdir ~/n8n && cd ~/n8n
  • Erstelle docker-compose.yml mit folgenden Services: n8n, Postgres (für persistente Speicherung) und Caddy (für automatisches HTTPS)

Eine minimale, aber produktionsreife Compose-Datei enthält:

  • Postgres-Service — Image postgres:15, benanntes Volume postgres_data, Umgebungsvariablen für POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB
  • n8n-Service — Image n8nio/n8n, abhängig von Postgres, Umgebungsvariablen: DB_TYPE=postgresdb, DB_POSTGRESDB_HOST=postgres, N8N_HOST=n8n.deinedomain.de, N8N_PROTOCOL=https, WEBHOOK_URL=https://n8n.deinedomain.de/, N8N_ENCRYPTION_KEY (generieren mit openssl rand -hex 24), benanntes Volume n8n_data
  • Caddy-Service — Image caddy:2, Ports 80 und 443, ein einfaches Caddyfile, das Anfragen an n8n weiterleitet und Let's-Encrypt-Zertifikate automatisch verwaltet

Beispiel-Caddyfile

Hänge ein Caddyfile in den Caddy-Container unter /etc/caddy/Caddyfile ein. Inhalt:

  • n8n.deinedomain.de { reverse_proxy n8n:5678 }

Caddy holt und erneuert automatisch ein Let's-Encrypt-TLS-Zertifikat, solange dein DNS-Record aktiv ist.

Schritt 5 — DSGVO-relevante Umgebungsvariablen konfigurieren

n8n speichert Ausführungsdaten in seiner Datenbank. Für DSGVO-Konformität begrenzt du die Aufbewahrung durch folgende Variablen im n8n-Service:

  • EXECUTIONS_DATA_PRUNE=true — aktiviert automatisches Bereinigen
  • EXECUTIONS_DATA_MAX_AGE=72 — Ausführungsdaten 72 Stunden behalten (an deine Richtlinie anpassen)
  • EXECUTIONS_DATA_SAVE_ON_SUCCESS=none — Payload-Daten bei erfolgreichen Ausführungen nicht persistieren, wenn nicht nötig
  • N8N_DIAGNOSTICS_ENABLED=false — Telemetrie an n8n-Server deaktivieren
  • N8N_VERSION_NOTIFICATIONS_ENABLED=false — optional, reduziert ausgehende Verbindungen

Schritt 6 — Stack starten

  • docker compose up -d
  • Logs beobachten: docker compose logs -f n8n
  • Etwa 60 Sekunden warten, bis Postgres initialisiert ist und n8n seine Migrationen durchgeführt hat
  • https://n8n.deinedomain.de im Browser öffnen — der n8n-Einrichtungsassistent sollte erscheinen

Erstelle deinen Owner-Account. Die Zugangsdaten werden in deiner Postgres-Datenbank auf dem netcup VPS gespeichert — nirgendwo sonst.

Schritt 7 — Persistente Backups

Richte einen täglichen Postgres-Dump ein und synchronisiere ihn optional zu einem DSGVO-konformen Object Storage (z. B. netcup S3-kompatiblen Speicher oder eine Hetzner Storage Box in Deutschland):

  • docker exec postgres pg_dump -U n8nuser n8n > /home/n8nuser/backups/n8n_$(date +%F).sql
  • Als Cron-Job via crontab -e einrichten — z. B. täglich um 02:00 Uhr
  • Backups mindestens 30 Tage aufbewahren oder an deine Datenschutzrichtlinie anpassen

Schritt 8 — Erster Workflow: Alles prüfen

Erstelle im n8n-Editor einen einfachen Test-Workflow:

  • Trigger: Manueller Trigger
  • Node: HTTP-Request an https://httpbin.org/get
  • Node: Set-Node, der das Feld origin extrahiert (zeigt deine VPS-IP — Bestätigung, dass Daten deinen Server verlassen, nicht eine US-Cloud)

Workflow ausführen. Die angezeigte IP sollte deiner netcup-VPS-Adresse entsprechen. Das ist dein DSGVO-Nachweis: Alle Verarbeitungen finden auf EU-Boden statt.

n8n aktuell halten

Neuestes Image holen und Container ohne Downtime neu erstellen:

  • docker compose pull n8n
  • docker compose up -d n8n

Postgres-Daten bleiben in benannten Volumes erhalten, Updates sind also nicht destruktiv. Vor einem großen Versionssprung immer ein Backup anlegen.

Zusammenfassung: Was du aufgebaut hast

  • Eine selbst gehostete n8n-Instanz auf einem deutschen VPS
  • HTTPS über automatische Let's-Encrypt-Zertifikate durch Caddy
  • PostgreSQL für zuverlässige, persistente Workflow-Speicherung
  • DSGVO-konformes Bereinigen von Ausführungsdaten und deaktivierte Telemetrie
  • Eine tägliche Backup-Routine, die du vollständig kontrollierst

Von hier aus kannst du beliebige Workflows bauen — CRMs verbinden, E-Mails versenden, Webhook-Daten verarbeiten — mit der Gewissheit, dass personenbezogene Daten in deiner eigenen Infrastruktur bleiben. Für Inspiration und fertige Workflow-Vorlagen ist n8n der beste Ausgangspunkt, mit 400+ Integrationen und einer aktiven Community-Template-Bibliothek.

Wenn du leistungsstarke Workflow-Automatisierung betreiben möchtest, ohne personenbezogene Daten an Drittanbieter-Clouds zu senden, kannst du über n8n die vollständige Plattform selbst hosten — inklusive 400+ Integrationen und kostenlosem Self-Hosting — und so jeden Byte deiner Automatisierungsdaten DSGVO-konform auf deinem eigenen Server behalten.