Running Immich, n8n, and Coolify v4 on a single European host replaces $120–$280/mo in SaaS bills while keeping family media, API credentials, and webhook payloads inside EU GDPR jurisdiction. Because this stack combines sustained AVX-512 ML inference, ffmpeg 4K transcoding, Docker builds, and pgvector disk commits, undersized or oversubscribed VPS plans crash quickly under peak load (see our 0% Non-EU VAT guide and 1-month CCP cancellation rules before ordering).
1. Container-Level RAM & CPU Sizing Table (Idle vs. Peak)
Below is the measured per-service footprint when hosting all three platforms concurrently on Debian 12 (Docker Engine 27, 64-bit Linux):
| Service Container | Idle RAM | Uncapped Peak RAM | Primary Bottleneck | Target SKU Fit |
|---|---|---|---|---|
Caddy / Traefik + Coolify v4 UI | ~540 MB | 2.2–3.6 GB (Nixpacks build) | Multi-core CPU & NVMe random writes | RS 1000 (cap builds to 3G) / RS 2000 |
PostgreSQL 16 (pgvector / VectorChord) | ~380 MB | 1.3–2.1 GB (HNSW index build) | fsync 4K Q1T1 write latency (115.87 µs) | Keep strictly on local G12.5 NVMe RAID |
Redis 7 / Valkey 8 (BullMQ broker) | ~95 MB | 250–420 MB | Single-thread memory latency | Shared or dedicated instance on local NVMe |
n8n (main + queue worker) | ~360 MB | 1.1–1.9 GB (large JSON / AI flows) | Single-core IPC & DB row churn | VPS 1000 / RS 1000 (with 168h pruning) |
immich-server (API + ffmpeg jobs) | ~420 MB | 1.5–2.6 GB (4K HEVC transcoding) | Dedicated CPU threads + disk throughput | Concurrency 1 on RS 1000; 2+ on RS 2000 |
immich-machine-learning (ViT-B-32 + face) | ~220 MB | 2.4–3.5 GB (active ONNX inference) | Sustained Zen 5 AVX-512 SIMD | Hard-cap at 3584M on 8 GB; uncapped on 16 GB |
| Debian 12 Kernel + Docker + Page Cache | ~420 MB | 1.0+ GB (+ 4 GB swap safety) | Multi-bit DDR5 ECC stability | Minimum 8 GB RAM (RS 1000 / VPS 1000) |
| Combined Stack Total | ~2.44 GB | 6.9 GB (capped) / 11.5+ GB (raw) | Dedicated Zen 5 + Local NVMe RAID | RS 1000 (8 GB Sweet Spot) / RS 2000 (16 GB) |
2. Matching European VPS & Root-Server SKUs (2026)
| Tier & Role | Plan & Voucher | Specs | Year-1 Net Price (0% VAT) | Engineering Verdict |
|---|---|---|---|---|
| 8 GB Sweet Spot (Dedicated) | Netcup RS 1000 G12.5 (#rs1) | 4 Ded. EPYC 9645/9655 · 8 GB DDR5 ECC · 128 GB NVMe | €15.22/mo (€18.11 gross) | Best price-to-compute in Europe: Zen 5 AVX-512 accelerates Immich CLIP indexing with 0% steal and €0 SCP snapshots. Mount external storage above 90 GB media. |
| 16 GB Heavy Stack (Dedicated) | Netcup RS 2000 G12.5 (#rs2) | 8 Ded. EPYC 9645/9655 · 16 GB DDR5 ECC · 256 GB NVMe | €31.35/mo (€37.31 gross) | Zero OOM contention during simultaneous Coolify Next.js builds, Immich 4K transcodes, and 15+ extra containers. |
| 8 GB Budget Shared vCore | Netcup VPS 1000 G12.5 (#vps1) | 4 Shared EPYC (2.0 GHz) · 8 GB DDR5 · 128 GB NVMe | €11.17/mo (€13.29 gross) | Same 6.87 GB/s NVMe RAID and 1.31% steal; fits n8n + Coolify + smaller Immich libraries (under 15,000 photos) where #vps1 saves 1 month for existing users too. |
| Hourly Cloud + LAN Storage Box | Hetzner Cloud CCX23 | 4 Ded. vCPU · 16 GB RAM · 160 GB NVMe | ~€24.50+/mo (+ snapshots) | Clean hourly API and low-latency Hetzner Storage Box SMB/Borg mounts, but dedicated compute + snapshots cost ~65% more than RS 1000. |
| Oversubscribed Budget VPS | Contabo Cloud VPS 20 | 6 Shared vCPU · 12 GB RAM · 200 GB SSD/NVMe | ~€11.50/mo (+ region fees) | High advertised RAM, but throttled random 4K IOPS and CPU steal cause n8n webhook timeouts during Immich imports (see Hetzner vs. Contabo). |
3. Production docker-compose.yml & .env Tuning (OOM-Proofing + Pruning)
Deploy these hardened service overrides inside Coolify’s Docker Compose stack editor (or standalone Compose). Three rules prevent 95% of production crashes on 8 GB (RS 1000) and 16 GB (RS 2000) hosts:
- Cgroup-limit
immich-machine-learning(3584MRAM,2.5CPUs) and unload idle ONNX models after300s(MACHINE_LEARNING_MODEL_TTL=300) so mobile camera-roll uploads never trigger OOM kills on PostgreSQL. - Prune
n8nexecution history automatically (168hours /10,000max rows) and cap production concurrency (10) so verbose JSON payloads never bloat disk space to50+ GB. - Tune PostgreSQL 16 (
VectorChord/pgvector) for local NVMe (random_page_cost=1.1,shared_buffers=1GB,effective_cache_size=3GB,work_mem=16MB; doubleshared_buffersto2GBandeffective_cache_sizeto6GBonRS 2000 G12.5).
# docker-compose.production.yml — Tuned for Netcup RS 1000 (8 GB) / RS 2000 (16 GB)
services:
postgres:
image: ghcr.io/immich-app/postgres:16-vectorchord0.3.0-pgvectors0.2.0
restart: unless-stopped
environment:
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME:-immich}
POSTGRES_INITDB_ARGS: '--data-checksums'
command:
- postgres
- -c
- shared_buffers=1GB
- -c
- effective_cache_size=3GB
- -c
- work_mem=16MB
- -c
- maintenance_work_mem=256MB
- -c
- random_page_cost=1.1
- -c
- wal_compression=on
- -c
- max_wal_size=2GB
volumes:
- /opt/stacks/pgdata:/var/lib/postgresql/data
valkey:
image: valkey/valkey:8-alpine
restart: unless-stopped
command: valkey-server --maxmemory 256mb --maxmemory-policy noeviction --save 60 1000
immich-server:
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
restart: unless-stopped
env_file: .env
volumes:
- ${UPLOAD_LOCATION:-/opt/stacks/immich-uploads}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
depends_on: [postgres, valkey]
deploy:
resources:
limits:
cpus: '3.0'
memory: 2560M
immich-machine-learning:
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
restart: unless-stopped
environment:
MACHINE_LEARNING_MODEL_TTL: 300
MACHINE_LEARNING_REQUEST_THREADS: 2
MACHINE_LEARNING_INTRA_OP_THREADS: 2
volumes:
- immich-model-cache:/cache
deploy:
resources:
limits:
cpus: '2.5'
memory: 3584M
n8n:
image: docker.n8n.io/n8nio/n8n:latest
restart: unless-stopped
environment:
DB_TYPE: postgresdb
DB_POSTGRESDB_HOST: postgres
DB_POSTGRESDB_DATABASE: n8n
DB_POSTGRESDB_USER: ${DB_USER:-postgres}
DB_POSTGRESDB_PASSWORD: ${DB_PASSWORD}
EXECUTIONS_DATA_PRUNE: 'true'
EXECUTIONS_DATA_MAX_AGE: '168'
EXECUTIONS_DATA_PRUNE_MAX_COUNT: '10000'
EXECUTIONS_DATA_SAVE_ON_SUCCESS: 'none'
N8N_CONCURRENCY_PRODUCTION_LIMIT: '10'
NODE_OPTIONS: '--max-old-space-size=1536'
volumes:
- /opt/stacks/n8n-data:/home/node/.n8n
depends_on: [postgres, valkey]
deploy:
resources:
limits:
cpus: '2.0'
memory: 2048M
volumes:
immich-model-cache:
Companion .env values to pair with the Compose file above:
IMMICH_VERSION=release
UPLOAD_LOCATION=/opt/stacks/immich-uploads
DB_USER=postgres
DB_PASSWORD=CHANGE_ME_32_CHAR_RANDOM_HEX
DB_NAME=immich
TZ=Europe/Berlin
Important: Never place /opt/stacks/pgdata on network-mounted SMB/SSHFS shares. Keep PostgreSQL and Valkey strictly on Netcup’s local NVMe RAID (115.87 µs commit latency), and only mount external storage under Immich External Libraries or UPLOAD_LOCATION/library if raw media outgrows local disk.
4. Off-Site Encrypted Backups (restic + rclone Over 2.5 Gbps Fair-Use Port)
Take a free €0 SCP Copy-on-Write snapshot before major Immich or Coolify version upgrades for 60-second full-VM rollback, and run this nightly encrypted restic script to push deduplicated database dumps, n8n encryption keys, and Immich originals to Cloudflare R2, S3, or a Hetzner Storage Box (rclone remote storagebox:immich-vault) with €0 egress charges (2.5 Gbps EU/MNZ fair-use port; shaped to 300 Mbps on RS only if 24h traffic exceeds 3 TB, or 200 Mbps above 2 TB/24h on x86 VPS; Singapore SIN uses a 1 Gbps port with monthly quota):
sudo apt install -y restic rclone zstd
# Initialize encrypted repository once (store RESTIC_PASSWORD in your password manager!)
export RESTIC_REPOSITORY="rclone:storagebox:immich-n8n-vault"
export RESTIC_PASSWORD_FILE="/root/.restic-pass"
# openssl rand -base64 32 > /root/.restic-pass && chmod 600 /root/.restic-pass
# restic init
cat <<'EOF' | sudo tee /usr/local/bin/backup-selfhost-stack.sh
#!/usr/bin/env bash
set -euo pipefail
export RESTIC_REPOSITORY="rclone:storagebox:immich-n8n-vault"
export RESTIC_PASSWORD_FILE="/root/.restic-pass"
DUMP_DIR="/opt/stacks/db-dumps"
mkdir -p "$DUMP_DIR"
# 1. Consistent logical dump of Immich (VectorChord) + n8n PostgreSQL databases
docker exec -i $(docker ps -qf "ancestor=ghcr.io/immich-app/postgres:16-vectorchord0.3.0-pgvectors0.2.0" | head -n1) \
pg_dumpall -U postgres --clean --if-exists | zstd -T2 -9 > "${DUMP_DIR}/postgres_all.sql.zst"
# 2. Deduplicated AES-256 encrypted push over Netcup's 2.5 Gbps EU/US fair-use port (€0 egress)
restic backup \
"$DUMP_DIR" \
/opt/stacks/n8n-data \
/opt/stacks/immich-uploads \
--exclude="*/thumbs/*" \
--exclude="*/encoded-video/*" \
--tag nightly
# 3. Retain 7 daily, 4 weekly, and 6 monthly snapshots
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune
EOF
sudo chmod 700 /usr/local/bin/backup-selfhost-stack.sh
echo "30 3 * * * root /usr/local/bin/backup-selfhost-stack.sh >> /var/log/restic-selfhost.log 2>&1" \
| sudo tee /etc/cron.d/restic-selfhost
Model your exact container count and 3-year savings in our Docker & Cloud Repatriation Sizer, pair this stack with our Coolify & Dokploy Host Hardening Guide, and grab an active #rs1, #rs2, or #vps1 voucher below.
RS 1000 G12.5
2 Months Free · Valid for New & Existing Customers (12M Term)
30-Second Auto-Apply Guide (?gutschein= Cart Injection & Account Eligibility) ▼
• A: Method A (1-Click Auto-Apply Link — Recommended): Click the coupon code or emerald button above to open netcup.com/en/checkout/cart?gutschein=<CODE> — Netcup loads the discounted SKU into a clean cart automatically without copying.
• B: Method B (Privacy Blocker Fallback): Only if a strict script/query blocker strips `?gutschein=` from URLs, add the matching 12M model manually and paste the code inside the cart voucher box.
New vs. Existing Customer Rule: Free-month & 30% lifetime codes (#rs1, #rs2, #rs8, #vps1–8, #w2–8) work for both new & existing customers (12M term). #5e and #rs4 (€5.00 net / €5.95 gross off) require a brand-new account; Domains, VPS Lite (pico/nano), and VPS ARM exclude all vouchers.