Skip to main content
RootVoucherrootvoucher.com
PlaybookUpdated: 2026-11-29~11 min read

Self-Hosting n8n & AI Agents on Netcup G12.5 (Queue Mode, Playwright SHM & Pruning)

Production n8n engineering playbook on Netcup VPS 1000 & RS 1000 G12.5: replacing €150/mo Zapier/Make bills, PostgreSQL + Redis Queue Mode compose, fixing Playwright 64MB /dev/shm crashes (`shm_size: 1gb`), and mandatory execution pruning.

Key Facts & Summary (Verified)

Self-hosting n8n with PostgreSQL 16, Redis 7 Queue Mode, and a Qdrant vector DB fits cleanly inside 8 GB DDR5 RAM — replacing €50–€250/mo in capped SaaS automation bills. Pick VPS 1000 G12.5 (€11.17/mo yr 1, 1 month free) for LLM API/webhook orchestration, or RS 1000 G12.5 (€15.22/mo yr 1, 2 months free) for 24/7 Playwright/Chromium browser agents. Always set shm_size: 1gb, NODE_OPTIONS=--max-old-space-size=3072, --concurrency=2, and EXECUTIONS_DATA_PRUNE=true in production.

Recommended Live Verified Vouchers for This Guide

VPS1000 G12.5EU PrimaryNew & Existing
1 Month Free

VPS 1000 G12.5

Best budget 8 GB DDR5 starter VPS for self-hosted blogs, Nextcloud, n8n workflows, and lightweight Docker stacks.

4 vCores8 GB128 GB NVMe
€12.18/ mo

Eff. €11.17/mo yr 1

Save ~€12.18 / yr
Verified Code · 5 fresh codes6877nc17957489160
Copy & Redeem on Netcup

Auto-adds promo plan: keep Netcup cart empty first

·
Specs & TCO →
RS1000 G12.5EU PrimaryNew & Existing
2 Months Free

RS 1000 G12.5

Highest-value Netcup voucher overall (2 months free): ideal for production SaaS, Coolify/Dokploy PaaS, PostgreSQL, and Minecraft/game servers needing 0% CPU steal.

4 Ded. Cores8 GB128 GB NVMe
€18.26/ mo

Eff. €15.22/mo yr 1

Save ~€36.52 / yr
Verified Code · 5 fresh codes6874nc17958827840
Copy & Redeem on Netcup

Auto-adds promo plan: keep Netcup cart empty first

·
Specs & TCO →
VPS2000 G12.5EU PrimaryNew & Existing
1 Month Free

VPS 2000 G12.5

Balanced 16 GB RAM homelab & staging server for multi-app Docker Compose, Coolify, and dev/test clusters.

8 vCores16 GB256 GB NVMe
€22.62/ mo

Eff. €20.74/mo yr 1

Save ~€22.62 / yr
Verified Code · 5 fresh codes6878nc17948456480
Copy & Redeem on Netcup

Auto-adds promo plan: keep Netcup cart empty first

·
Specs & TCO →

1. Automation Cost & Workload Sizing (Self-Hosted vs. SaaS Cloud)

One Netcup server eliminates per-task execution caps forever while keeping sensitive customer prompts, API keys, and CRM records strictly inside ISO-certified German GDPR datacenters.

Why do AI agent builders hit €200+/month SaaS bills overnight? On Zapier or Make, a single 15-node RAG/tool-calling agent loop triggered 200 times a day consumes 90,000+ billed operations per month! Moving onto VPS 1000 G12.5 (€11.17/mo net yr 1) for API/webhook agents — or dedicated-core RS 1000 G12.5 (€15.22/mo net yr 1; see RS vs. VPS G12.5 FUP Rules) when running 24/7 headless Chromium — turns variable per-step anxiety into a tiny flat monthly cost with clean AS197540 outbound IPs.

Queue Mode (`Postgres 16` + `Redis 7` + `Worker`)

  • Web UI & webhook receiver stay <25 ms responsive even while workers crunch heavy jobs
  • Zero SQLITE_BUSY: database is locked failures under concurrent webhook bursts
  • Clean crash isolation: if Chromium OOMs a worker, Redis BullMQ retries without dropping webhooks
  • Scale horizontally anytime by spinning up n8n-worker replicas across cores

Default Single-Container `SQLite` Mode

  • Acceptable ONLY for low-frequency personal testing (<50 simple runs/day)
  • Single Node.js event loop: one heavy PDF/JSON parse freezes the canvas & drops incoming webhooks
  • SQLite file locking degrades rapidly once sub-workflows and parallel branches execute
Automation ProfileRecommended Netcup PlanRAM / Core StrategyKey Advantage
LLM API / Telegram / CRM WebhooksVPS 1000 G12.5 (1 Mo Free)8 GB DDR5 · 1 Main + 1 WorkerHandles 50k+ daily API runs for €11.17/mo yr 1
Headless Browser (Playwright) + AI ScrapersRS 1000 G12.5 (2 Mo Free)4 Ded. Zen 5 · concurrency=2Dedicated CPU keeps Chromium snappy 24/7 (€15.22/mo)
Multi-Worker Queue + Qdrant / PgVector RAGVPS 2000 G12.5 (1 Mo Free)16 GB DDR5 · 2–3 Workers + Vector DBAmple RAM for millions of embeddings & 256 GB NVMe

2. Production Queue Mode Architecture (`PostgreSQL 16` + `Redis 7` + `Worker`)

Never run serious production automations on n8n's default single-container SQLite mode — one heavy LLM or scraping loop will freeze the entire UI and drop incoming webhooks.

In Queue Mode, n8n-main stays near 0% CPU so incoming Stripe, Telegram, GitHub, or WhatsApp webhooks acknowledge in <25 ms and persist safely into Redis 7 BullMQ, while n8n-worker pulls jobs asynchronously at controlled concurrency. Also consider enabling modern n8n Task Runners (N8N_RUNNERS_ENABLED=true) if your workflows execute untrusted JavaScript or Python Code nodes so heavy data transforms stay isolated from the main event loop.

YAMLProduction n8n Queue Mode Stack (docker-compose.yml — 8 GB RS 1000 Tuned)
x-n8n-env: &n8n-env
  DB_TYPE: postgresdb
  DB_POSTGRESDB_HOST: postgres
  DB_POSTGRESDB_DATABASE: n8n
  DB_POSTGRESDB_USER: n8n
  DB_POSTGRESDB_PASSWORD: ${POSTGRES_PASSWORD}
  EXECUTIONS_MODE: queue
  QUEUE_BULL_REDIS_HOST: redis
  N8N_ENCRYPTION_KEY: ${N8N_ENCRYPTION_KEY}
  # Mandatory pruning so Postgres never fills Netcup G12.5 128GB NVMe
  EXECUTIONS_DATA_PRUNE: "true"
  EXECUTIONS_DATA_MAX_AGE: "168"        # Keep 7 days (hours)
  EXECUTIONS_DATA_PRUNE_MAX_COUNT: "50000"

services:
  postgres:
    image: postgres:16-alpine
    mem_limit: 1g
    environment:
      POSTGRES_USER: n8n
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: n8n
    volumes: ["./pgdata:/var/lib/postgresql/data"]
    restart: unless-stopped

  redis:
    image: redis:7-alpine
    mem_limit: 512m
    restart: unless-stopped

  n8n-main:
    image: n8nio/n8n:latest
    mem_limit: 1536m
    environment:
      <<: *n8n-env
      N8N_HOST: n8n.yourdomain.com
      WEBHOOK_URL: https://n8n.yourdomain.com/
    ports: ["127.0.0.1:5678:5678"]
    volumes: ["./n8n-data:/home/node/.n8n"]
    depends_on: [postgres, redis]
    restart: unless-stopped

  n8n-worker:
    image: n8nio/n8n:latest
    command: worker --concurrency=2
    mem_limit: 3584m
    shm_size: 1gb # CRITICAL: prevents headless Chromium/Playwright tab crashes!
    environment:
      <<: *n8n-env
      NODE_OPTIONS: "--max-old-space-size=3072"
    volumes: ["./n8n-data:/home/node/.n8n"]
    depends_on: [postgres, redis]
    restart: unless-stopped

3. Stopping Playwright / Chromium Crashes & Node.js OOM Kills

Adding browser scraping or PDF rendering to n8n is where 90% of self-hosted setups mysteriously crash with Target page, context or browser has been closed — here are the exact three fixes.

Pro architectural upgrade for heavy browser agents: instead of baking Chromium binaries inside the n8n image itself, run a dedicated sidecar container (ghcr.io/browserless/chromium with shm_size: 1gb and MAX_CONCURRENT_SESSIONS=2) on the same internal Docker network and connect n8n's Playwright/Puppeteer node over ws://browserless:3000. That way, even a runaway 2 GB JavaScript single-page app can never touch your n8n-worker V8 heap!

Docker's 64 MB `/dev/shm` Default Instantly Kills Chromium!

By default, Docker allocates only 64 MB to /dev/shm (shared memory). Headless Chromium uses /dev/shm heavily for rendered pages — loading a single modern React/SPA site crashes the tab immediately. Setting shm_size: 1gb on your n8n-worker (or Playwright sidecar) fixes this permanently!

  • Raise V8 Heap with NODE_OPTIONS=--max-old-space-size=3072: Node.js defaults to a ~1.5–2 GB heap cap even on 8–16 GB servers. Giving your worker 3 GB stops FATAL ERROR: Reached heap limit when processing large LLM/RAG JSON arrays.
  • Keep --concurrency=2 or 3 per worker: Each active Playwright browser context consumes 200–500 MB RAM. Instead of setting --concurrency=20 on one worker (instant OOM), keep concurrency low and scale by adding a second n8n-worker replica on a 16 GB VPS/RS 2000.
  • Split large batches with Loop Over Items: When feeding 1,000 scraped pages into OpenAI/Gemini embeddings, process in chunks of 10–25 items so intermediate JSON payloads don't accumulate gigabytes in a single execution.

4. Protecting G12.5 128 GB NVMe: Execution Pruning & Binary Data Storage

A busy AI agent running every 5 minutes with large JSON prompts or screenshots can silently inflate PostgreSQL past 80 GB in weeks if pruning is disabled.

Keep one PostgreSQL internals nuance in mind: enabling EXECUTIONS_DATA_PRUNE=true from Day 1 allows PostgreSQL's background autovacuum to reuse dead tuple space continuously so ./pgdata stabilizes around 2–6 GB. If you forgot pruning until disk hit 90% full, simply deleting rows won't shrink OS files until you run VACUUM FULL execution_data; during a maintenance window — so always turn pruning on before launching your first cron agent!

  • Always enforce EXECUTIONS_DATA_PRUNE=true, EXECUTIONS_DATA_MAX_AGE=168 (7 days), and EXECUTIONS_DATA_PRUNE_MAX_COUNT=50000 — and in individual high-frequency workflows, toggle Settings → 'Save successful production executions: Do not save' while keeping failed executions logged for debugging.
  • Never lose N8N_ENCRYPTION_KEY: All stored OpenAI, Slack, and database credentials in PostgreSQL are encrypted with this single key. Back it up inside your password manager (Vaultwarden/1Password) alongside your database dumps.
  • Shared binary storage across workers: Notice how both n8n-main and n8n-worker mount the same ./n8n-data:/home/node/.n8n volume (or configure N8N_DEFAULT_BINARY_DATA_MODE=s3 to Cloudflare R2 if scaling across multiple Netcup servers).

5. Reverse Proxy WebSocket/SSE Fix, 12-Month SaaS TCO & Encrypted Backup

Modern n8n streams live workflow progress over WebSockets / Server-Sent Events (SSE) — use zero-config Caddy + N8N_PROXY_HOPS=1 so the editor never shows 'Connection Lost'.

If you also run RAG vector search (Qdrant or PostgreSQL pgvector) on the same Netcup host over the internal Docker network (http://qdrant:6333), similarity queries execute in 1–4 milliseconds over local DDR5/NVMe with €0 vector-cloud fees! Compare the real 12-month automation TCO below (and check your country VAT in our TCO Calculator), then add the Caddy + encrypted PostgreSQL backup snippet so your workflows and N8N_ENCRYPTION_KEY are 100% disaster-proof:

12-Month AI & Workflow Automation TCO: SaaS Cloud vs. Self-Hosted n8n on Netcup
Platform (50k+ Monthly Step Runs)Execution / Step CapData Residency & Vector DBMonthly Net Cost12-Month Total
Zapier Professional (50k tasks)Hard 50k step cap + overagesUS Cloud · External Vector DB extra~€275+ / mo~€3,300+ / yr
Make Teams / Pro (~100k ops)Every JSON iterator step billed!Cloud SaaS · External Vector DB extra~€85 – €160 / mo~€1,020 – €1,920 / yr
n8n Cloud Pro (10k executions)10k workflow runs cap · No rootHosted Cloud · No local Playwright~€50 – €60 / mo~€600 – €720 / yr
Netcup VPS 1000 G12.5 (API/LLM)UNLIMITED runs & steps!DE GDPR + Free local Qdrant/PgVector€11.17 / mo (Yr 1)€133.98 / yr (1 mo free)
Netcup RS 1000 G12.5 (Browser AI)UNLIMITED runs + 24/7 Chromium!4 Ded. Zen 5 + Local Qdrant + 0% Steal€15.22 / mo (Yr 1)€182.60 / yr (2 mo free)
BASHCaddy Reverse Proxy (SSE/WebSocket Ready) + Nightly n8n Postgres Backup
# 1. /etc/caddy/Caddyfile — forwards WebSockets & SSE to 127.0.0.1:5678 automatically!
# (Also add N8N_PROXY_HOPS: "1" under x-n8n-env in docker-compose.yml)
# n8n.yourdomain.com {
#     reverse_proxy 127.0.0.1:5678 {
#         flush_interval -1
#     }
# }

# 2. Nightly consistent PostgreSQL dump (store N8N_ENCRYPTION_KEY in your password vault!)
docker exec n8n-postgres-1 pg_dump -U n8n -Fc n8n > /var/backups/n8n-$(date +%F).dump

Frequently Asked Questions

Is Netcup Germany (Nuremberg) GDPR-compliant for business AI workflows?

Yes! Netcup operates ISO 27001 certified datacenters in Germany and Austria under strict EU GDPR (DSGVO) jurisdiction, with instant self-service Data Processing Agreements (AVV) downloadable directly inside your CCP portal.

How much can I save by self-hosting n8n on Netcup vs. n8n Cloud or Zapier?

Zapier Professional at 50,000 tasks/month costs $299+/mo, and n8n Cloud Pro starts at €50+/mo with execution caps. One Netcup VPS 1000 G12.5 (€11.17/mo yr 1) or RS 1000 G12.5 (€15.22/mo yr 1) runs millions of executions with zero task caps.

Can I run local LLMs (Ollama) directly on a Netcup RS 1000 / RS 2000?

Netcup G12.5 servers are CPU-only (no dedicated NVIDIA GPUs). Tiny 1B–3B quantized models (e.g., Qwen/Llama 3B) or lightweight embedding models run acceptably on 8 dedicated Zen 5 cores (RS 2000), but for fast production chat/reasoning, call external APIs (Gemini, OpenAI, Claude, DeepSeek) from your Netcup n8n instance.

How should I expose n8n webhooks securely over HTTPS on Netcup?

Notice that n8n-main binds strictly to 127.0.0.1:5678 in our Compose file above. Place Caddy, Traefik, or Coolify/Dokploy in front of 127.0.0.1:5678 for automatic Let's Encrypt HTTPS, and keep port 5678 blocked in Netcup's SCP hardware firewall.

How do I fix 'Connection Lost' in the n8n editor behind Nginx or Cloudflare?

n8n v1.x streams live execution updates via WebSockets / SSE (/rest/push). In Nginx, add proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_buffering off; (or use Caddy with flush_interval -1), set N8N_PROXY_HOPS=1, and keep WebSockets enabled in Cloudflare Network settings.

Can I run Qdrant or PostgreSQL `pgvector` for RAG agents on the same 8 GB Netcup server?

Yes! Up to ~250,000–500,000 1536-dimensional embeddings (with scalar quantization or on-disk HNSW enabled in Qdrant) consume under 800 MB RAM, fitting comfortably inside an 8 GB VPS 1000 or RS 1000 G12.5 alongside Queue Mode n8n. Step up to 16 GB VPS/RS 2000 once you index multi-million-vector collections.

30-Day Satisfaction Guarantee

Standard Root Servers & VPS include a 30-day satisfaction guarantee (request full base-fee refund via support ticket). Remember: ongoing contracts require 31-day cancellation notice in CCP.

0% VAT Outside EU + B2B Reverse Charge

Non-EU buyers (China, US, SG, etc.) pay 0% VAT. EU customers see exact local OSS VAT rates synced 1:1 with netcup.com.

Minute-Level Automated Verification

Fresh single-use and new-customer codes rotate automatically via API, with no expired banners or click-to-reveal popups.

Self-Hosting n8n & AI Agents on Netcup G12.5 (Queue)