# Best European VPS for Self-Hosting Immich, n8n & Coolify (2026): RAM Sizing, Compose Limits & TCO

> Self-host Immich, n8n & Coolify on European VPS in 2026: exact container RAM/CPU table, cgroup limits, Postgres pgvector tuning & encrypted Restic backups.

- Canonical URL: https://euserverlab.com/guides/best-european-vps-self-hosting-immich-n8n-coolify/
- Language: en
- Published: 2026-11-20 | Updated: 2026-11-22
- Voucher Tags: #rs1, #rs2, #vps1
- Publisher: EUServerLab (https://euserverlab.com/methodology/)

## Key Findings (TL;DR)
- Uncapped, Coolify v4 + PostgreSQL 16 (VectorChord/pgvector) + Valkey + n8n + Immich (ViT-B-32 CLIP & facial recognition) idles at ~2.5 GB RAM and spikes past 9–12 GB during bulk photo imports or Nixpacks builds — skip 4 GB nodes and start at 8 GB (RS 1000 G12.5) or 16 GB (RS 2000 G12.5).
- Pinning dedicated AMD EPYC 9645/9655 (Zen 5) cores on Netcup RS 1000 G12.5 (€15.22/mo net Year-1 with #rs1) accelerates ONNX AVX-512 CLIP inference while isolating live n8n webhooks from CPU steal.
- Enforce memory: 3584M and cpus: '2.5' on immich-machine-learning, enable n8n execution pruning (168h / 10,000 runs), and tune PostgreSQL shared_buffers=1GB on local 115.87 µs NVMe RAID.
- Combine €0 Netcup SCP Copy-on-Write snapshots before upgrades with nightly AES-256 encrypted restic + rclone backups over the 2.5 Gbps EU/US fair-use port (€0 overage; shaped to 300 Mbps on RS above 3 TB/24h or 200 Mbps on x86 VPS above 2 TB/24h).

## Execution Checklist
1. **Select an 8 GB or 16 GB Dedicated-Core Host**: Provision Debian 12 + 4 GB swap on Netcup RS 1000 G12.5 (8 GB DDR5 ECC) or RS 2000 G12.5 (16 GB DDR5 ECC) and bootstrap Coolify v4.
2. **Cap Immich ML Resources & Tune PostgreSQL 16**: Limit immich-machine-learning to 3584M RAM and 2.5 CPUs, and pass shared_buffers=1GB, effective_cache_size=3GB, and work_mem=16MB to PostgreSQL on local NVMe.
3. **Enable n8n Execution Pruning & Queue Concurrency**: Configure EXECUTIONS_DATA_PRUNE=true, EXECUTIONS_DATA_MAX_AGE=168, EXECUTIONS_DATA_PRUNE_MAX_COUNT=10000, and N8N_CONCURRENCY_PRODUCTION_LIMIT=10.
4. **Schedule Nightly Encrypted Restic + Rclone Off-Site Syncs**: Dump PostgreSQL databases with zstd and push deduplicated, encrypted Restic snapshots of your database dumps and Immich library to Cloudflare R2 or a Storage Box.

---

Running **[Immich](https://immich.app/docs/install/requirements)**, **[n8n](https://docs.n8n.io/hosting/)**, and **[Coolify v4](https://coolify.io/docs/installation)** 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](/guides/vat-free-registration-guide/) and [1-month CCP cancellation rules](/guides/contract-and-cancellation-guide/) 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](/models/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](/models/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](/models/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](/compare/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:

1. **Cgroup-limit `immich-machine-learning`** (`3584M` RAM, `2.5` CPUs) and unload idle ONNX models after `300s` (`MACHINE_LEARNING_MODEL_TTL=300`) so mobile camera-roll uploads never trigger OOM kills on PostgreSQL.
2. **Prune `n8n` execution history automatically** (`168` hours / `10,000` max rows) and cap production concurrency (`10`) so verbose JSON payloads never bloat disk space to `50+ GB`.
3. **Tune PostgreSQL 16 (`VectorChord`/`pgvector`)** for local NVMe (`random_page_cost=1.1`, `shared_buffers=1GB`, `effective_cache_size=3GB`, `work_mem=16MB`; double `shared_buffers` to `2GB` and `effective_cache_size` to `6GB` on `RS 2000 G12.5`).

```yaml
# 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:

```ini
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):

```bash
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](/tools/server-sizer/), pair this stack with our [Coolify & Dokploy Host Hardening Guide](/guides/coolify-dokploy-self-hosting-netcup-guide/), and grab an active `#rs1`, `#rs2`, or `#vps1` voucher below.

## Frequently Asked Questions

### Should I pick VPS 1000 G12.5 (€11.17/mo) or RS 1000 G12.5 (€15.22/mo) for Immich, n8n, and Coolify?

VPS 1000 G12.5 (€11.17/mo net with #vps1) uses 4 shared EPYC vCores capped to a 2.0 GHz live-migration profile and works well for n8n + Coolify with light photo libraries. RS 1000 G12.5 (€15.22/mo net with #rs1) gives 4 dedicated Zen 5 physical threads with AVX-512, finishing Immich CLIP/face indexing much faster without starving n8n or Traefik.

### How do I stop Immich mobile photo uploads from OOM-killing PostgreSQL or n8n on an 8 GB server?

Set deploy.resources.limits (cpus: '2.5', memory: 3584M) on the immich-machine-learning container, keep MACHINE_LEARNING_REQUEST_THREADS=2, and cap Immich ML and Video Transcoding job concurrency to 1 inside Administration -> Job Settings.

### Why did my n8n database grow past 40 GB within a few months?

By default, high-frequency webhook or AI workflows store full JSON execution payloads indefinitely. Set EXECUTIONS_DATA_PRUNE=true, EXECUTIONS_DATA_MAX_AGE=168 (7 days), and EXECUTIONS_DATA_PRUNE_MAX_COUNT=10000 in your n8n environment variables.

### When should I upgrade from RS 1000 G12.5 (8 GB / 128 GB) to RS 2000 G12.5 (16 GB / 256 GB)?

Move to RS 2000 G12.5 (€31.35/mo net Year-1 with #rs2) when your raw photo/video library passes 90 GB locally (unless offloaded via S3/Storage Box), when indexing 50,000+ RAW/4K assets, or when running 15+ extra production containers in Coolify.

---
Source: EUServerLab (https://euserverlab.com/guides/best-european-vps-self-hosting-immich-n8n-coolify/) | Open Telemetry Dataset: https://euserverlab.com/benchmarks/vps-500-g12-5.json
