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

Self-Hosting Nextcloud, Immich & Docker Homelab on Netcup G12.5 (RAM-Capped Stack)

Production Docker Compose architecture for Nextcloud + Immich + Vaultwarden on Netcup VPS 1000/2000 G12.5: shared Redis, mandatory 2.5G memory cap on Immich ML, remote ML offloading, cron sidecar, and automated S3/R2 backups.

Key Facts & Summary (Verified)

Running Nextcloud, Immich (with CLIP/InsightFace AI search), Vaultwarden, and Traefik cleanly on one server requires at least 8 GB DDR5 RAM and fast NVMe I/O: pick VPS 1000 G12.5 (€11.17/mo net yr 1 with 1 month free) for personal stacks under 100 GB, or VPS 2000 G12.5 (16 GB DDR5, 256 GB NVMe, €20.74/mo yr 1) for family photo libraries. Always cap immich-machine-learning at 2.5 GB RAM in Docker Compose so AI inference never OOM-kills Nextcloud.

Verified summary card for Self-Hosting Nextcloud, Immich & Docker Homelab on Netcup G12.5 (RAM-Capped Stack) (RootVoucher · 2026-11-29)
Verified summary card for Self-Hosting Nextcloud, Immich & Docker Homelab on Netcup G12.5 (RAM-Capped Stack) (RootVoucher · 2026-11-29)

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 →
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 →
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 →

1. Real-World RAM & NVMe Footprint by Self-Hosted Service

Immich's Python ML models and Nextcloud thumbnail generation spike RAM sharply: budget for burst peaks, not just idle docker stats.

Before clicking order, compare two hidden-gem Netcup options for family photo & cloud libraries: [VPS 2000 G12.5](/vouchers/vps-2000-g12-5) (8 Zen 5 x86 vCores, 16 GB DDR5, 256 GB NVMe at €20.74/mo net yr 1 with 1 month free) delivers 2.5x faster single-core PHP & thumbnail transcoding, whereas Netcup's [ARM64 VPS 2000](/vouchers/arm-vps) (10 Ampere Altra cores, 16 GB ECC RAM, 512 GB NVMe at €11.76/mo net yr 1 with €5 new-user code) doubles your local NVMe space at nearly half the price because Nextcloud, Immich, MariaDB, PostgreSQL, and Redis all publish native linux/arm64 Docker images!

Pick VPS 2000 G12.5 (x86 Zen 5 · 256 GB) For...

  • 2.5x faster single-core PHP speed for snappy Nextcloud Hub / Collabora Office editing
  • Eligible for 1-Month-Free voucher (6879nc...): works for both new & existing accounts
  • Faster CPU FFmpeg video transcoding and local CLIP/InsightFace photo indexing

Pick VPS 2000 ARM64 (Ampere · 512 GB) For...

  • Massive 512 GB local enterprise NVMe at ~€11.76/mo net: 4x storage per Euro!
  • 16 GB ECC RAM fits Nextcloud + Immich + Vaultwarden + Paperless-ngx effortlessly
  • Native arm64 Docker images run cool and rock-solid (pair with home-PC ML offload)
Self-Hosted StackIdle vs. Peak RAMStorage PatternRecommended Netcup Plan
Vaultwarden + Uptime Kuma + Caddy0.3 GB / 0.6 GB< 5 GBVPS 500 (€5 voucher) or VPS 1000
Nextcloud + MariaDB + Redis + Cron1.5 GB / 3.5 GBHigh 4K metadata IOPSVPS 1000 G12.5 (1 Month Free)
Immich ML + Nextcloud + 10 containers4.5 GB / 10 GBThumbnails + DB on NVMe, cold media optional S3VPS 2000 G12.5 (1 Month Free)

2. Unified Docker Compose Blueprint with Strict Memory Limits

Instead of running redundant Redis instances and leaving Immich ML uncapped, share one bounded Redis (512mb allkeys-lru), keep MariaDB and Postgres cleanly isolated, and cap every container.

Pay special attention to two database & proxy details when deploying this stack behind Traefik or Caddy: (1) MariaDB's --transaction-isolation=READ-COMMITTED flag is mandatory to prevent Nextcloud desktop sync Deadlock found when trying to get lock errors on oc_filecache; and (2) raise your reverse-proxy request body limit (client_max_body_size 16G; in Nginx) plus configure .well-known/carddav and .well-known/caldav redirects so iOS/macOS calendar & contact syncing works out of the box.

YAMLCore Memory-Bounded Services Snippet (docker-compose.yml)
services:
  redis:
    image: redis:7-alpine
    command: redis-server --maxmemory 512mb --maxmemory-policy allkeys-lru
    mem_limit: 600m
    restart: unless-stopped

  nextcloud-db:
    image: mariadb:10.11
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    mem_limit: 1g
    volumes: ["./nc-db:/var/lib/mysql"]
    restart: unless-stopped

  nextcloud:
    image: nextcloud:stable-apache
    mem_limit: 2g
    environment:
      - REDIS_HOST=redis
    volumes: ["./nc-html:/var/www/html"]
    restart: unless-stopped

  nextcloud-cron:
    image: nextcloud:stable-apache
    entrypoint: /cron.sh
    mem_limit: 512m
    volumes: ["./nc-html:/var/www/html"]
    restart: unless-stopped

  immich-server:
    image: ghcr.io/immich-app/immich-server:release
    mem_limit: 2g
    environment:
      - REDIS_HOSTNAME=redis
    restart: unless-stopped

  immich-machine-learning:
    image: ghcr.io/immich-app/immich-machine-learning:release
    mem_limit: 2560m # Crucial: prevents CLIP/InsightFace OOM on 8-16GB hosts
    volumes: ["model-cache:/cache"]
    restart: unless-stopped

3. Pro Tuning: Remote ML Offloading, Nextcloud Cron Sidecar & OPcache

Three small engineering tweaks make a €11/mo Netcup VPS feel faster than Google Photos and Dropbox combined.

Inside Nextcloud's container environment, also pass PHP_MEMORY_LIMIT=1024M and PHP_UPLOAD_LIMIT=16G, and install the Preview Generator app (occ preview:pre-generate every 15 minutes via cron) so Nextcloud pre-renders WebP photo thumbnails silently in the background instead of stalling mobile folder browsing.

Offload Initial 50,000-Photo Immich Indexing to Your Home PC

Importing 50,000 family photos on a VPS CPU takes hours and risks shared-CPU FUP throttling. Temporarily run immich-machine-learning on your home desktop/GPU over Tailscale/WireGuard and point IMMICH_MACHINE_LEARNING_URL in Immich Admin settings to your home PC during the initial bulk import: then switch it back to the local Netcup container for lightweight daily phone uploads!

  • Dedicated Nextcloud Cron Sidecar: Never leave Nextcloud on default 'AJAX' background jobs: the tiny nextcloud-cron container above executes /cron.sh every 5 minutes cleanly in the background so web UI clicks never stall.
  • Enable Redis Transactional File Locking: Pointing Nextcloud to your shared Redis container eliminates SQLite/MariaDB lock contention during heavy desktop sync client bursts.
  • Keep PostgreSQL (pgvecto-rs) and Immich thumbnails on local Netcup NVMe: Even if you mount external S3/Storage Box for multi-terabyte raw videos, always keep database & thumbnail volumes on local Netcup NVMe for instant timeline scrolling.

4. Automated Nightly 3-2-1 Backup Script (DB Dumps + Restic to R2/S3)

RAID protects against drive failure, NOT accidental deletion or ransomware. Run this nightly cron script over Netcup's 2.5 Gbit/s port to push deduplicated, encrypted backups off-site.

Why dump databases with mariadb-dump --single-transaction and pg_dumpall instead of backing up raw ./nc-db and ./pgdata bind-mount folders directly? Copying live InnoDB/PostgreSQL binary data files mid-write yields corrupted tables upon restore! Dumping consistent SQL snapshots first and deduplicating them via Restic compresses 30 daily database restore points into a few hundred megabytes over Netcup's 2.5 Gbit/s port (see our Netcup Compute + Storage Box Hybrid Guide for multi-terabyte backup target pricing).

BASH/usr/local/bin/homelab-backup.sh (Nightly Cron at 03:00)
#!/usr/bin/env bash
set -euo pipefail
BACKUP_DIR="/var/backups/homelab"
mkdir -p "$BACKUP_DIR"

# 1. Consistent logical database dumps
docker exec nextcloud-db mariadb-dump --single-transaction -u root -p"$NC_DB_PASS" nextcloud > "$BACKUP_DIR/nextcloud.sql"
docker exec immich_postgres pg_dumpall --clean --if-exists -U postgres > "$BACKUP_DIR/immich.sql"

# 2. Deduplicated, encrypted off-site push via Restic (Cloudflare R2 / S3 / SFTP)
export RESTIC_REPOSITORY="s3:https://<account-id>.r2.cloudflarestorage.com/homelab-backups"
export RESTIC_PASSWORD_FILE="/root/.restic-pass"
restic backup "$BACKUP_DIR" /srv/homelab/nc-html/data /srv/homelab/immich-upload
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune

5. Reverse Proxy (`Caddy` CalDAV/CardDAV) & Multi-TB Storage Expansion Matrix

Clear every yellow Nextcloud Admin Security Warning in 60 seconds with this clean Caddyfile, and compare all four ways to scale past 256–512 GB.

Nearly every first-time Nextcloud Docker admin hits three frustrating reverse-proxy bugs: iOS/macOS Calendar & Contacts fail discovery because /.well-known/caldav isn't redirected to /remote.php/dav/, 4K smartphone video uploads fail at 100 MB/512 MB proxy caps, and Nextcloud logs 172.18.0.1 instead of real client IPs unless TRUSTED_PROXIES=172.16.0.0/12 is set. Caddy solves HTTPS certificates, HTTP/3, WebSocket upgrades (for Immich), and .well-known redirects in 18 clean lines!

Compare total monthly storage TCO across Netcup tiers and external S3/Storage Box mounts below (and adjust local VAT in our TCO Calculator):

Homelab Storage Scaling Matrix: Local Netcup NVMe vs. Hybrid Cloud Storage
Library SizeBest ArchitectureHot DB / ThumbnailsCold Raw MediaEst. Monthly Net Total
Up to 90 GBNetcup VPS 1000 G12.5128 GB Local Zen 5 NVMe128 GB Local Zen 5 NVMe€11.17 / mo (Yr 1)
100 – 420 GBNetcup VPS 2000 ARM64512 GB Local Enterprise NVMe512 GB Local Enterprise NVMe€11.76 / mo (w/ €5 code!)
100 – 200 GB (Fast x86)Netcup VPS 2000 G12.5256 GB Local Zen 5 NVMe256 GB Local Zen 5 NVMe€20.74 / mo (Yr 1)
1 TB – 5 TB Family CloudVPS 2000 + 1 TB Storage Box / B2Local Netcup NVMe (0ms lag!)Mounted SFTP/SSHFS or S3 (€3–€6/TB)~€15 – €24 / mo total
CONFZero-Warning Caddyfile for Nextcloud (CalDAV + HSTS + 16G Uploads) & Immich
cloud.yourdomain.com {
    request_body {
        max_size 16GB
    }
    header Strict-Transport-Security "max-age=31536000; includeSubDomains"
    redir /.well-known/carddav /remote.php/dav/ 301
    redir /.well-known/caldav /remote.php/dav/ 301
    reverse_proxy nextcloud:80
}

photos.yourdomain.com {
    request_body {
        max_size 50GB
    }
    reverse_proxy immich-server:2283
}

Frequently Asked Questions

How do I expand storage cheaply beyond 256 GB on Netcup G12.5?

Keep your OS, PostgreSQL, MariaDB, and Immich thumbnails on Netcup's blazing-fast local NVMe, and mount an external Hetzner Storage Box (via SSHFS/CIFS) or Cloudflare R2 / Backblaze B2 bucket for cold media archives and backups.

Should I pick VPS 2000 G12.5 or RS 1000 G12.5 for Nextcloud + Immich?

For Nextcloud + Immich specifically, RAM and NVMe capacity matter more than 24/7 sustained CPU; so VPS 2000 G12.5 (16 GB DDR5 + 256 GB NVMe, €20.74/mo yr 1 with 1 month free) is usually the better family homelab choice than 8 GB RS 1000.

Does Immich also have built-in automated database backups?

Yes! Modern Immich automatically runs a daily PostgreSQL dump at 2:00 AM inside /upload/backups (retention configurable in Admin UI): still mirror those dumps off-server via Restic so a disk/account error never costs your photo metadata.

Is Nextcloud All-In-One (AIO) easier than manual Docker Compose?

If you ONLY want Nextcloud (with Collabora Office, Talk, and BorgBackup built in), Nextcloud AIO is fantastic and turnkey. Use manual Compose when you want Nextcloud, Immich, and Vaultwarden to share one Traefik proxy and one Redis cleanly.

Do Nextcloud, Immich, and Vaultwarden all run natively on Netcup's ARM64 512 GB VPS?

Yes, 100% natively! Nextcloud (nextcloud:stable-apache), Immich (immich-server + immich-machine-learning), MariaDB, PostgreSQL (tensorchord/pgvecto-rs), Redis, Caddy, and Vaultwarden all publish official linux/arm64 multi-arch images, making VPS 2000 ARM64 (16 GB RAM + 512 GB NVMe) an unbeatable storage value.

How much extra RAM do I need if I enable Collabora Online (Nextcloud Office)?

Collabora Online (collabora/code) idles around 600–900 MB and spikes to ~1.5–2 GB with multiple open spreadsheets, while OnlyOffice Document Server uses ~1.5–2.5 GB. Skip 8 GB plans if running full Office suites alongside Immich and choose a 16 GB tier (VPS 2000 G12.5 or RS 2000 G12.5).

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.

Nextcloud & Immich on Netcup G12.5 (Docker RAM Guide)