This article contains affiliate links. If you buy through them, we may earn a commission at no extra cost to you.
n8n Self-Hosting on netcup: A GDPR-Compliant Server in 30 Minutes
Running automation workflows that touch personal data — customer emails, form submissions, CRM records — means you need to know exactly where that data lives. Cloud-based automation platforms process data on servers you do not control, which creates real headaches under GDPR. The clean solution: self-host your automation engine on a server inside the EU, ideally inside Germany. This guide walks you through the complete setup of n8n on a netcup VPS, from ordering the server to your first live workflow, in roughly 30 minutes.
Why Self-Hosting n8n Makes Sense for GDPR
When you self-host, your workflow data never leaves your own infrastructure. No vendor processes it on your behalf unless you explicitly call an external API. This dramatically simplifies your Article 30 records of processing activities and removes the need for additional Data Processing Agreements with your automation platform vendor.
- Data residency: All workflow executions, credentials, and logs stay on your server.
- No usage-based data sharing: Cloud platforms often log metadata about your automations. Self-hosting stops that.
- Full audit control: You decide what gets logged and for how long — directly relevant to GDPR storage limitation requirements.
- Cost predictability: A small VPS costs a fixed monthly amount regardless of how many executions you run.
What You Need Before You Start
- A netcup account (registration takes about two minutes)
- A domain or subdomain you control (e.g. automation.yourdomain.com)
- Basic comfort with a Linux terminal and SSH
- About 30 minutes of focused time
Step 1: Order a netcup VPS (2 Minutes)
Log in to your netcup customer control panel and order a VPS 1000 G11 or higher. The VPS 1000 G11 provides 2 vCores, 2 GB RAM, and 40 GB SSD — enough for n8n with dozens of active workflows. Select Ubuntu 22.04 LTS as the operating system. netcup's servers are located in Nuremberg and Karlsruhe, Germany, which means your data stays within EU jurisdiction by default.
Once the server is provisioned (usually under two minutes), note the public IPv4 address from the control panel.
Step 2: Point Your Domain to the Server (5 Minutes)
In your DNS provider's dashboard, create an A record for your chosen subdomain pointing to your server's IPv4 address. DNS propagation typically takes 5–15 minutes. You can continue with the next steps while it propagates.
Step 3: Connect via SSH and Harden the Server (5 Minutes)
Connect to your new server:
ssh root@YOUR_SERVER_IP
Run the following to update packages and install essentials:
apt update && apt upgrade -y
apt install -y ufw curl git
Configure the firewall:
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
Create a non-root user for day-to-day operations:
adduser n8nuser
usermod -aG sudo n8nuser
Step 4: Install Docker and Docker Compose (5 Minutes)
Docker is the cleanest way to run n8n because it isolates the application and makes updates trivial.
curl -fsSL https://get.docker.com | sh
systemctl enable docker
systemctl start docker
Verify the installation:
docker --version
Step 5: Configure and Launch n8n with Docker Compose (10 Minutes)
Create a working directory:
mkdir -p /opt/n8n && cd /opt/n8n
Create a docker-compose.yml file with the following content. Replace the placeholder values with your own domain and a strong encryption key:
version: '3.8'
services:
n8n:
image: n8nio/n8n:latest
restart: always
ports:
- '5678:5678'
environment:
- N8N_HOST=automation.yourdomain.com
- N8N_PORT=5678
- N8N_PROTOCOL=https
- WEBHOOK_URL=https://automation.yourdomain.com/
- N8N_ENCRYPTION_KEY=replace_with_32char_random_string
- GENERIC_TIMEZONE=Europe/Berlin
- N8N_LOG_LEVEL=info
- EXECUTIONS_DATA_PRUNE=true
- EXECUTIONS_DATA_MAX_AGE=72
volumes:
- n8n_data:/home/node/.n8n
caddy:
image: caddy:2-alpine
restart: always
ports:
- '80:80'
- '443:443'
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
depends_on:
- n8n
volumes:
n8n_data:
caddy_data:
caddy_config:
Now create the Caddyfile for automatic HTTPS via Let's Encrypt:
automation.yourdomain.com {
reverse_proxy n8n:5678
}
Start everything:
docker compose up -d
After about 60 seconds, open https://automation.yourdomain.com in your browser. You will see the n8n setup wizard. Create your owner account — these credentials are stored only on your server.
Why EXECUTIONS_DATA_MAX_AGE Matters for GDPR
The EXECUTIONS_DATA_MAX_AGE=72 setting automatically deletes execution logs after 72 hours. This directly supports the GDPR storage limitation principle. Adjust the value to match your documented retention policy, and note it in your records of processing activities.
Step 6: Verify HTTPS and Security (3 Minutes)
Caddy automatically obtains and renews a Let's Encrypt certificate. Confirm everything is working:
- Visit your subdomain — the browser should show a valid padlock.
- Run
docker compose logs caddyto confirm no certificate errors. - Run
docker compose logs n8nto confirm n8n started without errors.
Step 7: Build Your First GDPR-Aware Workflow
Your n8n instance is live. Here are three principles to keep every workflow GDPR-compliant from day one:
- Minimise data in workflow nodes: Only pass the fields you actually need. Avoid routing full contact records through nodes that only need an email address.
- Use credentials, not hardcoded secrets: Store API keys in n8n's encrypted credentials vault, never in node parameters.
- Set execution pruning per workflow: For workflows touching sensitive data, lower the log retention in the workflow settings panel.
n8n offers 400+ integrations — from Google Sheets and Slack to custom webhooks and REST APIs — so you can build almost any automation entirely on your own infrastructure.
Keeping Your Server Updated
To update n8n to the latest version:
cd /opt/n8n
docker compose pull
docker compose up -d
Schedule this as a monthly task. Subscribe to the n8n release notes to catch any security patches early.
Summary: What You Now Have
- A dedicated n8n instance running on German infrastructure
- Automatic HTTPS with certificate auto-renewal
- Encrypted credential storage
- Configurable execution log retention aligned with GDPR storage limitation
- Full ownership of your automation data — no third-party platform touching it
If you want to start building GDPR-compliant automated workflows without vendor lock-in, you can get started for free via n8n — including self-hosting with 400+ integrations — to keep all your workflow data on your own infrastructure.