Skip to main content
Live VouchersLoading…
Vouchers →
Self-Hosting NetcupLab Editorial Updated 2026-12-05 9 min read

Self-Hosting on Netcup RS G12.5: Coolify v4, Immich & Restic

Production self-hosting guide for Netcup RS 1000/2000 G12.5: SCP firewall, ZRAM, SSH-tunneled Coolify v4, Immich tuning, LBS scaling & 3-2-1 Restic backups.

#self-hosting #coolify #docker #immich #restic-backups #rs2000-g12-5
#1 · Lab Report NetcupLab Editorial
Published 2026-12-04
CPU
4–8 Dedicated EPYC™ 9645 / 9655 Cores
RAM
8–16 GB DDR5 ECC
Storage
128–256 GB NVMe
Price
€15.22 (RS1) / €31.35 (RS2) net eff. Y1

A single Netcup RS 1000 G12.5 (4 dedicated Zen 5 cores, 8 GB DDR5 ECC, 128 GB NVMe — €15.22/mo net effective in Year 1; real YABS: 5,580 GB6 Multi, 126.4k 4K IOPS) or RS 2000 G12.5 (8 dedicated cores, 16 GB DDR5 ECC, 256 GB NVMe — €31.35/mo net effective in Year 1; real YABS: 8,728 GB6 Multi, 3.80 GB/s 1M) delivers dedicated, zero-throttling compute at less than half the per-core cost of competing European dedicated-vCPU clouds (compare RS 2000 vs. Hetzner CCX13).

This step-by-step production blueprint takes you from a bare Debian 12/13 image to a hardened, self-hosted Coolify v4 + Immich + Vaultwarden + PostgreSQL stack with properly engineered storage scaling and recoverable 3-2-1 encrypted backups.


1. Sizing Your Stack & Scaling Beyond 200 GB of Photos

Because G12.5 Root Servers ship with 128 GB NVMe (RS 1000) and 256 GB NVMe (RS 2000), budget both RAM and disk headroom carefully before importing decades of family photos. Compare tax-adjusted totals in our Price & VAT Calculator or check whether a shared VPS fits better in our Root Server vs. VPS Guide:

Stack ComponentTypical Idle RAMPeak Load RAMDisk FootprintBottleneck Profile
Debian 12/13 + Docker + Traefik~450 MB~750 MB~6–10 GBEnforce log rotation
Coolify v4 Control Plane + Internal DB~900 MB~1.5 GB~6 GBBurst CPU/IO during image builds
Immich (Server + Postgres/VectorChord + ML)~1.5 GB3.5–4.5 GB40–200+ GBSustained CPU during ML/transcode
Vaultwarden + Uptime Kuma + Umami~350 MB~600 MB~2 GBTiny footprint, backup-critical
Paperless-ngx / n8n / 2–3 Web Apps~1.2 GB~2.5 GB~15–40 GBSpiky OCR & build RAM
Recommended Total Headroom~4.4 GB~9.8 GBKeep ≥20% NVMe free—

Choosing the Right Storage Expansion Pattern (>200 GB Libraries)

Storage OptionNet CostRight Use CaseCritical Operational Note
Netcup Local Block Storage (LBS)€0.01/GB/mo (€10–12/TB)Live hot storage: format ext4/xfs and mount as Immich UPLOAD_LOCATIONNative block device with clean POSIX locks; note: LBS is excluded from SCP snapshots and requires stopping the VM to snapshot the main OS disk
Step Up to RS 4000 G12.5€65.40/mo (12 ded. cores / 32 GB / 512 GB NVMe)Need both 32 GB RAM and 512 GB local RAID 10 NVMeSimplest single-volume ops
Hetzner Storage Box BX11 (1 TB)€3.20/mo (unmetered fair-use)Off-site 3-2-1 encrypted backups (Borg / Restic)Never mount via CIFS/SFTP for live Immich DB/library storage; backup target only!

2. Step 1: Lock Down Netcup’s Upstream SCP Firewall First

Before installing Docker, configure Netcup’s upstream SCP Firewall (SCP -> Network -> Firewall Policies) and assign it to your server interface:

  • Allow inbound TCP 22 (restrict to your VPN or static IP if available)
  • Allow inbound TCP 80 and TCP 443 (for Coolify’s Traefik/Caddy reverse proxy & Let’s Encrypt ACME)
  • Allow ICMP (optional for uptime monitoring)
  • Default inbound policy: DROP

Why SCP Firewall beats UFW alone: Docker writes iptables NAT/FORWARD rules directly, silently bypassing UFW whenever a Compose file publishes 5432:5432 or 6379:6379. Filtering upstream at SCP ensures internal databases and Redis can never leak onto the public internet.


3. Step 2: Debian Hardening, ZRAM Swap & Docker Log Rotation

SSH into your fresh Debian 12/13 Minimal install (confirm your Ed25519 SSH key works before disabling password logins!):

# 1. Update OS and install core admin/backup tools
apt update && apt full-upgrade -y
apt install -y curl git htop fail2ban unattended-upgrades zram-tools restic vnstat

# 2. Enable zstd-compressed ZRAM swap (restart because zram-tools starts with defaults on install)
cat <<'EOF' > /etc/default/zramswap
ALGO=zstd
PERCENT=50
EOF
systemctl enable zramswap && systemctl restart zramswap

# 3. Disable SSH password logins via drop-in (00- overrides 50-cloud-init.conf under OpenSSH first-match-wins)
cat <<'EOF' > /etc/ssh/sshd_config.d/00-hardening.conf
PasswordAuthentication no
PermitRootLogin prohibit-password
EOF
sshd -t && systemctl reload ssh

# 4. Pre-configure Docker log rotation (Coolify's install.sh also sets log limits; run `systemctl restart docker` if using standalone Docker without Coolify)
mkdir -p /etc/docker
cat <<'EOF' > /etc/docker/daemon.json
{
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
  }
}
EOF

Take a clean baseline SCP snapshot right now while disk usage is under 5% (well below Netcup’s ~50% SCP snapshot storage quota).


4. Step 3: Install Coolify v4 Over a Zero-Exposure SSH Tunnel

Coolify v4 installs Docker Engine, manages Traefik with automatic Let’s Encrypt TLS, and orchestrates Git deployments and database backup schedules:

curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash

Zero-exposure first-run workflow (never expose port 8000 publicly):

  1. From your laptop, open an SSH tunnel: ssh -L 8000:127.0.0.1:8000 root@<your-netcup-ip>.
  2. Open http://localhost:8000, create your admin account, and enable 2FA immediately.
  3. Attach your HTTPS management domain (e.g., coolify.yourdomain.com) inside Coolify Settings so Traefik serves it over TLS 443, then close the SSH tunnel.
  4. Under Server → Settings → Disk Cleanup, enable scheduled Docker cleanup so stale BuildKit layers never fill your NVMe.

5. Step 4: Deploy & Tune Immich on Dedicated Zen 5 Cores

Inside Coolify, click + Add New Resource → Services → Immich. Dedicated AMD EPYC™ 9645 / 9655 cores with AVX-512 chew through CLIP Smart Search embeddings, facial recognition, and video transcoding continuously with zero shared-VPS CPU throttling.

Four production tuning practices:

  1. Pin UPLOAD_LOCATION=/srv/immich/library & keep VectorChord on local NVMe: In Immich’s Coolify Environment Variables, explicitly set UPLOAD_LOCATION=/srv/immich/library (mkdir -p /srv/immich/library beforehand, or mount your LBS volume there) so originals and SQL dumps live at a predictable host path, while PostgreSQL (VectorChord) and thumbnails stay on local RAID 10 NVMe (100k+ 4K IOPS).
  2. Match job concurrency to core count: In Immich Administration → Jobs, set Thumbnail Generation and Video Transcoding concurrency to 2 on RS 1000 or 4 on RS 2000 so Traefik and other apps stay responsive during bulk imports.
  3. Cap ML memory on 8 GB hosts: Add mem_limit: 3g to immich-machine-learning on an RS 1000 so heavy batch indexing never starves PostgreSQL.
  4. Avoid Cloudflare’s 100 MB proxy cap: Set your Immich DNS record to DNS Only (direct HTTPS via Traefik) or upload 4K mobile videos privately over Tailscale / WireGuard.

6. Step 5: Complete, Recoverable 3-2-1 Backups (Don’t Forget APP_KEY!)

Backing up only /data/coolify will not restore your photos or databases after a server loss—it only contains Coolify’s control-plane metadata. A truly recoverable backup covers all three layers:

  1. Coolify Control Plane + Master APP_KEY: Enable Coolify’s built-in S3 instance backup (Settings → Backup) AND store a secure off-server copy of APP_KEY from /data/coolify/source/.env (without APP_KEY, a restored Coolify instance cannot decrypt your saved environment variables or database credentials!).
  2. Engine-Aware Immich Database Dump: Never raw-copy live PostgreSQL files. Enable Immich’s built-in Administration → Settings → Database Dump Settings (which writes clean .sql.gz logical dumps into UPLOAD_LOCATION/backups) or schedule Coolify’s S3 Postgres backups.
  3. Nightly Encrypted Restic Sync to Cloudflare R2, Backblaze B2, or a Hetzner Storage Box BX11 (€3.20/mo net for 1 TB). Lock down secret files with chmod 600 /root/.restic-pass && chmod 700 /usr/local/bin/offsite-backup.sh (so R2 keys are never world-readable under default 022 umask) and run a one-time restic init with those environment variables exported before enabling your nightly cron job:
#!/usr/bin/env bash
# /usr/local/bin/offsite-backup.sh (chmod 700; run `restic init` once before scheduling nightly cron)
set -euo pipefail
export AWS_ACCESS_KEY_ID="your-r2-key"
export AWS_SECRET_ACCESS_KEY="your-r2-secret"
export RESTIC_REPOSITORY="s3:https://<account-id>.r2.cloudflarestorage.com/netcup-backups"
export RESTIC_PASSWORD_FILE="/root/.restic-pass"

# Back up Coolify config/APP_KEY + SSH deploy keys + Immich originals & logical SQL dumps
restic backup /data/coolify/source /data/coolify/ssh/keys /srv/immich/library \
  --exclude "/srv/immich/library/thumbs" \
  --exclude "/srv/immich/library/encoded-video" \
  --exclude-caches \
  --tag netcup-rs

restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune

Test a restore into /tmp once a quarter, and export your 31-day CCP contract notice reminder on Day 1 via our Contract Reminder Tool (details in our Cancellation Guide). Combined with SCP firewalling, dedicated Zen 5 cores, and Netcup’s 3 TB/24h fair-use headroom, an RS 1000 or RS 2000 G12.5 delivers rock-solid self-hosting for years.

Loading live voucher link…

#3 · Lab Updates & Changelog

2026-12-05

Upgraded to a complete production blueprint: added Docker json-file log rotation, Local Block Storage vs. Hetzner Storage Box BX11 architecture guidance, Immich VectorChord logical dump workflow, and the critical Coolify APP_KEY recovery requirement.

2026-12-04

Added SCP hardware firewall guidance to prevent Docker iptables port leaks cleanly.

#4 · Verified Q&A

Q1. Is RS 1000 G12.5 (8 GB RAM, 128 GB NVMe) enough for Coolify plus Immich?

Yes for Coolify, databases, and a starter Immich library (up to ~70–80 GB local photos) once you configure ZRAM swap and cap immich-machine-learning at 3 GB RAM. For larger multi-user archives or Paperless-ngx + CI workloads, step up to RS 2000 G12.5 (16 GB RAM, 256 GB NVMe) or attach Netcup Local Block Storage.

Q2. Why should I use Netcup's SCP Firewall alongside UFW when running Docker?

Docker directly inserts NAT/FORWARD rules into iptables that bypass standard UFW inbound denies for published container ports (like 5432:5432). Enabling Netcup's upstream SCP Firewall (allowing only TCP 22, 80, 443) guarantees accidental container port binds never leak to the public internet.

Q3. Can I mount a Hetzner Storage Box (1 TB €3.20) over CIFS/SFTP as live storage for Immich?

Strongly discouraged. Storage Boxes use network file protocols (CIFS/SFTP/WebDAV) lacking local block-level latency and reliable database file locks. Put live Immich uploads on local NVMe or Netcup Local Block Storage (~€0.01/GB/mo), and reserve Hetzner Storage Box BX11 (€3.20/mo net for 1 TB) or Cloudflare R2 strictly for nightly encrypted off-site backups.

Q4. Why isn't backing up /data/coolify enough to restore Immich after a server failure?

Because /data/coolify only stores Coolify's control-plane configuration and metadata—not individual service volumes! A real recovery requires all three pieces: (1) /data/coolify PLUS the APP_KEY inside /data/coolify/source/.env (needed to decrypt stored secrets), (2) an engine-aware PostgreSQL logical dump (for Immich's VectorChord database), and (3) your Immich UPLOAD_LOCATION media files.

Q5. How do I avoid Cloudflare's 100 MB upload limit when syncing 4K videos to Immich?

Cloudflare's free proxy caps single HTTP request uploads at 100 MB. Keep your Immich DNS record set to DNS Only (direct HTTPS via Coolify's Traefik + Let's Encrypt), or sync mobile uploads privately over Tailscale / WireGuard.

Related Lab Threads