
Self-host n8n on Netcup — workflow automation and AI agents on a real VPS
TL;DR: Running n8n on Netcup in 5 minutes
Self-host n8n on a Netcup VPS to keep your workflow automations, OAuth tokens, and AI-agent prompts off a SaaS vendor that prices per execution. n8n is a source-available Zapier alternative with a visual node editor, 500+ integrations, native LangChain support, and a real Node.js runtime you can extend with arbitrary JavaScript or Python. It runs comfortably on a small VPS for solo use and scales to a Postgres-and-Redis queue-mode cluster when the workflows start paying rent.
- What it is: a Node.js workflow engine with a Vue web UI on port 5678, backed by SQLite by default and Postgres in production.
- Competes with: Zapier, Make (formerly Integromat), Pipedream, Activepieces, Huginn, Apache Airflow for the lighter cases.
- Hosting profile: 2 GB RAM minimum, 4 GB comfortable, 8 GB once AI nodes and queue mode enter the picture.
- Storage: workflow JSON, credentials, and execution history. Modest unless you keep every execution forever.
- License: Sustainable Use License (fair-code, source-available). Self-hosting for internal automation is fine; building a hosted competitor is not.
- Latest stable: v1.x line, maintained by n8n GmbH out of Berlin, releases roughly weekly.
Install on a fresh Debian 12 box:
docker volume create n8n_data
docker run -d --name n8n --restart unless-stopped \
-p 127.0.0.1:5678:5678 \
-e N8N_HOST=automate.example.com \
-e WEBHOOK_URL=https://automate.example.com/ \
-v n8n_data:/home/node/.n8n \
docker.n8n.io/n8nio/n8n
Primary pick: VPS 1000 G12 — 4 vCPU, 8 GB DDR5 ECC, 256 GB NVMe, around 10.37 € per month. The 8 GB headroom keeps Postgres, n8n, and a Redis container out of swap, and 256 GB NVMe absorbs years of execution history before pruning becomes a chore.
- First month free:
5799nc17800061382 - Second code:
5799nc17718015261 - Third code:
5799nc17800061381
Introduction
Most teams meet n8n the same way: they sign up for Zapier, hit the 750-task limit by week three, watch the bill quote $50, then $100, then $599 a month, and start googling "Zapier alternative". The hosted n8n Cloud sits in the same trap one tier up — the per-execution math kills you the moment a single workflow loops over a list. The way out is to run n8n yourself, on a box you own, where 100,000 executions a month costs the same as 100.
That is where a Netcup VPS earns its keep. Hardware lives in EU data centres (Nuremberg, Vienna, Karlsruhe), every tier ships with NVMe storage and DDR5 ECC memory, and the prices are set by a company that owns its hardware rather than reselling AWS at a markup. n8n is RAM-hungry once you start chaining AI nodes through LangChain, and modestly disk-hungry once execution history accumulates — the two things Netcup happens to be cheap on.
Reasonable expectation by the end of this article: a working n8n install behind HTTPS with Postgres, a clear understanding of when to flip on queue mode, and a pick of which Netcup tier matches the load you are actually running. No GitHub sleuthing, no docker-compose hand-editing of three half-broken examples, no copy-pasting commands from a tutorial that targeted a five-year-old release.
A note on scope. This is the integrate-everything-yourself path. If your automation needs are two webhooks and a Slack ping, the n8n Cloud free tier might still beat the operational cost of running anything. If you have OAuth tokens to half a dozen vendors, an internal API to call, an LLM provider key you would prefer not to hand to a hosted automation vendor, and any workflow that loops — read on.
What is n8n?
n8n is a source-available workflow automation platform built around a visual node editor: each node is a step (HTTP request, Postgres query, Slack message, OpenAI call, Code block running JavaScript or Python), and edges between nodes carry data through the workflow. It runs as a Node.js daemon, persists workflows and execution history in a relational database, and exposes both a web UI for editing and a webhook surface for triggering.
Architecture
The default single-process layout is straightforward:
- n8n main process — Node.js, listens on port 5678. Serves the Vue editor UI, handles webhook entry points, schedules cron-triggered workflows, and (in default mode) executes them.
- Database — SQLite by default, sitting in
/home/node/.n8n/database.sqlite. PostgreSQL is the recommended choice for anything beyond a personal sandbox; n8n historically supported MySQL/MariaDB but Postgres is the only DB the docs actively endorse for production. - Filesystem state —
/home/node/.n8n/holds the SQLite database, the encrypted credentials key, the binary-data store, and a small per-instance config. This directory is the entire n8n state; back it up and you can rebuild on any host.
Once load justifies it, queue mode adds two more components:
- Redis — message broker that holds the queue of pending executions. Required for queue mode, not used otherwise.
- n8n workers — additional n8n processes started with
n8n worker, pulling jobs from Redis and executing them while the main process keeps serving the editor and webhooks. Workers can live on the same box or scale out horizontally.
n8n is built primarily in TypeScript (with a Vue editor) and runs on Node.js. It exposes its own credentials store with envelope encryption, a versioned workflow store, and a typed expression language for piping data between nodes.
Who maintains it
n8n is built by n8n GmbH, a Berlin-based company funded by the usual venture rounds. The repo on GitHub passed 187k stars in early 2026, ships a release roughly every week, and the issue tracker is responsive. The "fair-code" framing matters: n8n is not OSI-open-source, but the Sustainable Use License does permit internal commercial use, modification, and self-hosting — what it forbids is hosting n8n as a paid service for others. For 99 percent of self-hosters, the practical effect is identical to MIT.
Where it fits
n8n competes with Zapier, Make, Pipedream, Workato, and the long tail of low-code automation SaaS. On the open-source side it overlaps with Activepieces, Huginn, and (for heavier orchestration) Apache Airflow or Prefect. The defining n8n trait is the willingness to mix visual nodes with raw code: a Code node lets you drop into JavaScript or Python with npm packages available, which most low-code tools deliberately do not allow. That code-friendly posture is also why n8n picked up the AI-agent crowd — you can wire a LangChain agent in five clicks and then drop into JavaScript when the abstraction leaks.
How to use n8n
Day-to-day, n8n is what you reach for instead of writing yet another bespoke cron job that calls four APIs and posts a Slack message. The interesting design choices are around credentials, execution data, and how AI nodes share state.
Core concepts
- Workflow — a graph of nodes connected by edges. Each workflow has a trigger (webhook, schedule, manual, or another workflow) and runs to completion when triggered. Stored as JSON in the database.
- Node — a single step. Built-in nodes cover HTTP, databases, queues, cloud APIs, file operations, control flow (If, Switch, Merge, Loop), and Code. Community nodes extend the catalog.
- Credential — an encrypted blob (OAuth token, API key, database DSN). Stored in the n8n database, encrypted with the key in
/home/node/.n8n/config. Lose that key and every credential is unrecoverable — back it up first. - Execution — one run of a workflow. n8n keeps the full input/output of every node by default, which is great for debugging and a disk-fill hazard if you forget to prune.
- AI Agent / LangChain nodes — a bundle of nodes that wrap LangChain primitives: Chat Model, Memory, Tool, Vector Store, Output Parser, Agent. These let you build retrieval-augmented agents inside the same visual editor as the rest of your workflow.
Day-to-day workflow
Open the editor on https://automate.example.com, drag a trigger node onto the canvas, wire it to whatever HTTP/Postgres/Slack/OpenAI nodes solve the problem, click Execute Workflow to run it on test data, then activate it. From then on the workflow runs on its trigger condition, and the Executions tab is where you go to see what ran, what broke, and why.
The mental shift from Zapier is that node output is structured JSON flowing between steps, and you can inspect every intermediate value. The mental shift from Airflow is that workflows are interactive and edit-then-test, not deploy-then-pray.
Integrations and extensibility
n8n ships 500+ built-in integration nodes, an HTTP Request node for everything else, and a community-node system that lets you npm install third-party nodes into your instance. The Code node runs JavaScript by default and Python via Pyodide for sandboxed in-process execution. For heavier custom logic, write your own community node — the API is documented and a typical node is one TypeScript file.
The webhook system makes n8n a useful glue layer between systems that do not natively talk: drop a Production Webhook URL into the upstream system, and the workflow downstream runs whenever that URL is hit. Webhooks pass through the main process, so even in queue mode the main n8n keeps the public surface.
Backup and operational reality
Three things matter for backups:
- The database. With SQLite, that is
database.sqliteinside the n8n data directory; with Postgres, that ispg_dump. This holds every workflow, credential, and execution. - The encryption key in
/home/node/.n8n/config. Without it, the credentials in the database are unreadable. Keep a copy somewhere offline. - The binary-data store if you have configured one — by default this lives inside the n8n data directory; if you have moved it to S3 or a separate volume, back that path up too.
Workflows themselves are also exportable as JSON via the CLI (n8n export:workflow --all --output=...), which makes git-based change tracking practical.
Quick Start Guide
Six steps from a fresh Netcup box to a working n8n instance behind HTTPS, with Postgres, automatic restarts, and a sensible backup path.
1. Provision the box
Sign up for the VPS 1000 G12 at netcup.com using coupon 5799nc17774618550 for one free month. Pick Debian 12 as the image, paste in your SSH public key, and skip the password option entirely. As soon as the VPS boots, SSH in and harden it:
# /etc/ssh/sshd_config.d/00-hardening.conf
PasswordAuthentication no
PermitRootLogin prohibit-password
KbdInteractiveAuthentication no
ufw default deny incoming
ufw default allow outgoing
ufw allow 22/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
Reboot, reconnect, confirm sshd came back cleanly before closing the existing session.
2. Install Docker
n8n runs equally well from npx, a global npm install, or Docker. Docker is the option that does not couple n8n's Node.js version to whatever the OS ships, and it makes the Postgres-and-Redis path trivial.
curl -fsSL https://get.docker.com | sh
systemctl enable --now docker
docker compose version
docker compose version should print v2.20 or newer. The compose file below relies on depends_on.condition: service_healthy, which the older v1 plugin does not understand.
3. Write the compose file
Create /opt/n8n/docker-compose.yml with n8n, Postgres, and a named volume for each:
# /opt/n8n/docker-compose.yml
services:
postgres:
image: postgres:16
restart: unless-stopped
environment:
POSTGRES_DB: n8n
POSTGRES_USER: n8n
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U n8n"]
interval: 5s
timeout: 5s
retries: 10
n8n:
image: docker.n8n.io/n8nio/n8n
restart: unless-stopped
ports:
- "127.0.0.1:5678:5678"
environment:
DB_TYPE: postgresdb
DB_POSTGRESDB_HOST: postgres
DB_POSTGRESDB_DATABASE: n8n
DB_POSTGRESDB_USER: n8n
DB_POSTGRESDB_PASSWORD: ${POSTGRES_PASSWORD}
N8N_HOST: ${N8N_HOST}
N8N_PROTOCOL: https
WEBHOOK_URL: https://${N8N_HOST}/
N8N_ENCRYPTION_KEY: ${N8N_ENCRYPTION_KEY}
EXECUTIONS_DATA_PRUNE: "true"
EXECUTIONS_DATA_MAX_AGE: "168"
GENERIC_TIMEZONE: Europe/Berlin
volumes:
- n8n_data:/home/node/.n8n
depends_on:
postgres:
condition: service_healthy
volumes:
postgres_data:
n8n_data:
The 127.0.0.1:5678 binding is deliberate — n8n is only reachable from localhost, and Caddy bridges the gap to the public internet in step 5. Anyone exposing 5678 directly is one OAuth misconfiguration away from leaking credentials.
4. Generate secrets and start the stack
mkdir -p /opt/n8n && cd /opt/n8n
cat > .env <<EOF
POSTGRES_PASSWORD=$(openssl rand -hex 24)
N8N_ENCRYPTION_KEY=$(openssl rand -hex 32)
N8N_HOST=automate.example.com
EOF
chmod 600 .env
docker compose up -d
docker compose ps
Both containers should reach the healthy state inside a minute. The N8N_ENCRYPTION_KEY is the one secret you genuinely cannot regenerate — if you lose it, every saved credential becomes ciphertext nobody can read. Copy .env into a password manager before doing anything else.
5. Put Caddy in front
Caddy fetches a Let's Encrypt cert the first time it sees an HTTPS request — no certbot, no cron, no expiry surprises.
apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -fsSL 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable.gpg
echo "deb [signed-by=/usr/share/keyrings/caddy-stable.gpg] https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main" > /etc/apt/sources.list.d/caddy-stable.list
apt update && apt install -y caddy
Replace /etc/caddy/Caddyfile:
automate.example.com {
reverse_proxy localhost:5678
encode gzip zstd
request_body {
max_size 100MB
}
}
The max_size matters for binary-data nodes — file-upload webhooks and the Read/Write Binary File nodes will reject anything over Caddy's default body limit otherwise. Reload Caddy: systemctl reload caddy. Within thirty seconds the cert is provisioned and https://automate.example.com answers.
6. First run, encryption-key backup, and a database dump
Open the URL, register the owner account (the first user becomes admin), and skip the email-config wizard if you do not need it yet. Then back up the encryption key out-of-band and schedule a daily Postgres dump:
docker exec n8n cat /home/node/.n8n/config | grep encryptionKey
# copy that into your password manager NOW
# /etc/cron.daily/n8n-db-backup
#!/bin/sh
set -e
mkdir -p /srv/n8n/backups
docker exec -t -u postgres $(docker compose -f /opt/n8n/docker-compose.yml ps -q postgres) \
pg_dump -U n8n n8n | gzip > /srv/n8n/backups/n8n-$(date +\%F).sql.gz
find /srv/n8n/backups -name 'n8n-*.sql.gz' -mtime +14 -delete
chmod +x the file and you have a 14-day rolling local backup. Add a restic job that ships /srv/n8n/backups and the .env to off-site storage on a schedule, and the disaster-recovery story is genuinely complete.
Choosing the Right Netcup Server for cheap n8n hosting
n8n's resource curve is dominated by three things: the number of concurrent executions, whether AI nodes are in the picture, and whether queue mode is enabled. The decision is roughly: how many workflows are running, how heavy are their payloads, and is anyone else depending on this thing.
VPS 500 G12 — fine for a personal sandbox
Specs: 2 vCPU, 4 GB DDR5 ECC, 128 GB NVMe, traffic included. Around 5.91 € per month (verify on netcup.com).
4 GB RAM is enough to run n8n with SQLite, a Caddy reverse proxy, and a few dozen idle workflows that fire on cron. CPU is shared, so heavy AI calls or large data transformations will feel laggy. Use this as the "trying n8n out" tier or for purely personal automations — RSS to Telegram, calendar sync, a couple of webhook handlers.
The VPS 500 has no dedicated coupon category. Use the 5 € off-any-order coupon at checkout:
36nc1771801554936nc1771801554836nc17718015542
VPS 1000 G12 — recommended for most n8n deployments
Specs: 4 vCPU, 8 GB DDR5 ECC, 256 GB NVMe, traffic included. Around 10.37 € per month (verify on netcup.com).
This is the tier the article was written around. 8 GB RAM is comfortable for n8n plus Postgres plus a Redis container, with room left for the occasional AI node loading an embedding model client-side. 256 GB NVMe absorbs years of execution history, even with the binary-data store on the same disk. The 4 vCPU handles a few hundred executions an hour without breaking a sweat.
Good fit if: a small team is sharing the instance, AI nodes appear occasionally, and queue mode is on the roadmap but not switched on yet.
Coupons (each pops a different code at build time):
5799nc178000613805799nc178043827005799nc17800061382
VPS 2000 G12 — when queue mode and AI nodes are the norm
Specs: 8 vCPU, 16 GB DDR5 ECC, 512 GB NVMe, traffic included. Around 19.25 € per month (verify on netcup.com).
Queue mode plus a handful of n8n workers plus Postgres plus Redis plus a workflow library that leans heavily on the LangChain nodes will eat 8 GB on a busy day. 16 GB makes the entire stack comfortable: main process, two or three workers, Postgres with a healthy shared-buffers setting, Redis, Caddy, and headroom for the occasional spike when a workflow loops over a 50,000-row CSV. The 8 vCPU keeps webhook latency low even under heavy parallel execution.
Pick this tier if you are running n8n as the automation backbone for a team of five or more, or if any workflow is on the critical path for revenue.
Coupons:
5800nc178026540915800nc177180152325800nc17718015233
RS 1000 G12 — when the workers actually need real cores
Specs: 4 dedicated AMD EPYC 9645 cores, 8 GB DDR5 ECC, 256 GB NVMe. Around 12.79 € per month (verify on netcup.com).
Same RAM and disk as the VPS 1000 G12, but the cores are dedicated rather than oversubscribed. The practical difference: workflows with sustained CPU work — a Code node parsing a megabyte of JSON, a Loop Over Items chewing through 10,000 rows, a Transform node running a heavy regex — finish noticeably faster and do not contend with whatever the noisy neighbour is doing. Webhook latency is more consistent under load. The Root Server tier also gives two free months from the launch coupon, not one.
Good fit if: workflow executions feel CPU-bound on the VPS line, or the instance is processing inbound webhooks where p99 latency matters.
Coupons (Root Server codes give two free months):
5159nc177180154445159nc177180154405997nc17800061380
Comparison
| Offer | vCPU | RAM | NVMe | Approx. price |
|---|---|---|---|---|
| VPS 500 G12 | 2 | 4 GB | 128 GB | 5.91 €/mo |
| VPS 1000 G12 | 4 | 8 GB | 256 GB | 10.37 €/mo |
| VPS 2000 G12 | 8 | 16 GB | 512 GB | 19.25 €/mo |
| RS 1000 G12 | 4 dedicated | 8 GB | 256 GB | 12.79 €/mo |
If you are trying n8n for the first time on a personal automation library and SQLite is fine, take VPS 500 G12. If you are putting it in front of a small team and running Postgres from day one, take VPS 1000 G12 — that is the right answer for most readers. If you have workflows hammering AI nodes, queue mode running multiple workers, or anyone depending on it for paid work, jump to VPS 2000 G12. If the workload is sustained-CPU rather than RAM-bound, RS 1000 G12 trades 50 percent more euros for noticeably better tail latency.
Web Hosting tiers are not a fit. n8n needs a long-running Node.js daemon, Postgres, and (usually) Redis — none of which run on shared hosting.
Conclusion
A working n8n install on a Netcup VPS 1000 G12 with Postgres and Caddy lands at roughly 10.37 € per month after the first free month from 5799nc17718015261, with 256 GB of NVMe headroom and enough RAM for queue mode when the load justifies it. That is half the price of a single Zapier Professional seat, with the OAuth tokens, AI prompts, and execution data sitting on hardware in the EU rather than a third-party automation vendor's database.
If you bring up a second box for the workers — a common move once queue mode is real — the 5 € off-any-order coupon 36nc17718015546 stacks onto the new order at checkout.
Things to keep an eye on once it is running: the Postgres executions_entity table (it grows fast — confirm EXECUTIONS_DATA_PRUNE is doing its job), the encryption-key backup (verify it once, then leave it alone), and the n8n changelog. The project ships breaking schema migrations occasionally, and the upgrade path is "stop, pull image, up" rather than "in-place hot reload". Read the release notes before each pull and the boring stuff stays boring.
The workflows are yours, the credentials are yours, and the bill is one fixed line item per month. That is the whole point.