Skip to main content
SSH Lab & Live Vouchers
EU EUServerLab
GUIDE Updated: · 10 min read

Self-Hosting Coolify v4 & Dokploy on Netcup RS 1000 G12.5 (€15.22/mo): Host Prep, Firewall & OOM Guide

Deploy Coolify v4 or Dokploy on Netcup RS 1000 G12.5 (€15.22/mo net): Debian 12 swap/BBR, Docker daemon.json, SCP firewall, build caps & R2 backups.

By Hai Liu (Systems & Cloud TCO Engineer) · * Outbound voucher & store links (rel="sponsored") help fund our lab at zero extra cost to you.

Summary

Updated: 2026-11-22

Quick Execution Checklist

  1. 1
    Prepare Debian 12 Swap, Sysctl & Docker Daemon

    Allocate a 4 GB /swapfile with vm.swappiness=10, enable TCP BBR, and write /etc/docker/daemon.json with 20m x 3 log caps and custom 172.80.0.0/16 address pools.

  2. 2
    Install Coolify v4 or Dokploy & Point Wildcard DNS

    Run the official Coolify or Dokploy bootstrap script on clean Debian 12 and point A + AAAA records for deploy.example.com and *.apps.example.com to your Netcup dual-stack IPs.

  3. 3
    Harden Netcup SCP Firewall

    Expose only TCP 80 and TCP/UDP 443 to 0.0.0.0/0 and ::/0, restrict SSH to WireGuard/Tailscale, and drop raw ports 8000, 3000, 6001, and 6002.

  4. 4
    Enforce Build Caps & Schedule R2 Database Backups

    Constrain builds with --cpus=2.5 --memory=4g and NODE_OPTIONS=--max-old-space-size=3072, take €0 SCP CoW snapshots before upgrades, and run nightly pg_dump | zstd | rclone cron jobs.

Self-hosting Coolify v4 or Dokploy rarely fails during idle HTTP traffic; outages happen when git push triggers concurrent pnpm build, TypeScript type-checking, and zstd image compression on the same kernel running live PostgreSQL and Redis. On Netcup RS 1000 G12.5 (€15.22/mo net Year-1 with #rs1), 4 dedicated AMD EPYC™ 9645 or 9655 (Zen 5) physical threads, 8 GB DDR5 ECC RAM, 6.87 GB/s NVMe RAID (115.87 µs 4K Q1T1 write), and a 2.5 Gbps fair-use port in EU/US (NUE/VIE/MNZ, throttled to 300 Mbps only above 3 TB/24h; Singapore SIN runs 1 Gbps with a 2 TB/mo quota) let you hard-partition build compute away from production traffic (see our 0% Non-EU VAT setup and 1-month CCP contract & cancellation rules before checkout).

KVM ARCHITECTURE & I/O ISOLATION AS197540 · TERMINAL-DIFF
KVM Scheduling, Disk I/O & Egress Profile — RS 1000 G12.5
● netcup G12.5 (RS 1000 G12.5 · AS197540)
CPU Profile: Dedicated Zen 5 (RS) or Verified 1.26–1.31% Steal (VPS)
Storage I/O: Uncached NVMe RAID (6.87 GB/s · 115.9 µs 4K Q1T1 Write)
Network/Snap: 2.5 Gbps EU/US Fair-Use (€0 Egress) · €0 CoW Snapshots
● Oversubscribed Shared vCPU / Metered Cloud
CPU Profile: Contended Host Time-Slicing or Premium Dedicated Markup
Storage I/O: Token-Bucket IOPS Caps or Network Block Storage Latency
Network/Snap: Metered Egress Overages ($10–$90/TB) & Per-GB Snapshot Fees
Dedicated AMD EPYC™ 9645 or 9655 (Zen 5) threads isolate cgroup-capped Nixpacks builds from live Traefik and PostgreSQL workloads

1. Debian 12 Host Preparation: Swap, BBR & /etc/docker/daemon.json

Run these commands on a fresh Netcup SCP Debian 12 (Bookworm) image before installing Coolify or Dokploy so Docker Engine inherits log rotation and non-conflicting bridge subnets from its first boot:

sudo apt update && sudo apt full-upgrade -y
sudo apt install -y curl git jq zstd rclone ca-certificates

# 1. Create a 4 GB NVMe swap safety buffer against transient bundler spikes
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

# 2. Keep active pages in DDR5 ECC RAM (swappiness=10) & enable TCP BBR on 2.5 Gbps NIC
cat <<'EOF' | sudo tee /etc/sysctl.d/99-paas-host.conf
vm.swappiness=10
vm.vfs_cache_pressure=50
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
EOF
sudo sysctl --system

Write /etc/docker/daemon.json next. Capping JSON logs at 20m × 3 prevents verbose Node/Python stdout from silently filling a 128 GB NVMe disk, live-restore keeps app containers running across Docker daemon patch restarts, and 172.80.0.0/16 avoids subnet collisions with Tailscale (100.64.0.0/10) or corporate WireGuard (10.0.0.0/8) routes:

sudo mkdir -p /etc/docker
cat <<'EOF' | sudo tee /etc/docker/daemon.json
{
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "20m",
    "max-file": "3"
  },
  "live-restore": true,
  "default-address-pools": [
    {
      "base": "172.80.0.0/16",
      "size": 24
    }
  ]
}
EOF

Note: If you choose Dokploy (which initializes Docker Swarm mode), remove "live-restore": true from /etc/docker/daemon.json, as Docker Engine disallows live-restore alongside Swarm orchestration.

2. Installing Coolify v4 vs. Dokploy (Commands & Architecture Matrix)

Install either Coolify v4 or Dokploy on a clean host — never run both control planes on the same VM, as both claim ports 80/443 and manage overlapping Docker networks:

# Option A: Official Coolify v4 installer (opens initial setup on TCP 8000)
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | sudo bash

# Option B: Official Dokploy installer (initializes Swarm & opens setup on TCP 3000)
curl -sSL https://dokploy.com/install.sh | sh
Technical DimensionCoolify v4Dokploy
Idle Control-Plane RAM~580–700 MB (Laravel/FrankenPHP + Postgres + Redis + Soketi)~280–380 MB (Node.js/Next + Postgres + Redis)
Container Orchestrator & ProxyStandalone Docker Engine + Traefik or CaddyDocker Swarm (single- or multi-node) + Traefik
Bootstrap & Realtime PortsTCP 8000 UI + TCP 6001/6002 (Soketi WebSockets & terminal)TCP 3000 UI (realtime multiplexed over main port/proxy)
Multi-Server & Build OffloadNative Dedicated Build Server role over SSH + remote Docker hostsSwarm worker nodes + remote SSH server deployments
Best Netcup G12.5 TierRS 1000 G12.5 (€15.22/mo) or VPS 500 (€6.94/mo 12M) UI + RS 2000 workerVPS 500 G12.5 (€6.52/mo Yr-1 w/ #5e new acct / €6.94/mo 12M) for light apps; RS 1000 for heavy CI builds

3. Dual-Stack Wildcard DNS & Netcup SCP Firewall Rules

Configure wildcard DNS once so every new preview branch or service (api.apps.example.com, umami.apps.example.com) provisions Let’s Encrypt certificates automatically without manual DNS edits:

deploy.example.com       300  IN  A      203.0.113.42
deploy.example.com       300  IN  AAAA   2a03:4000:60:1234::1
*.apps.example.com       300  IN  A      203.0.113.42
*.apps.example.com       300  IN  AAAA   2a03:4000:60:1234::1

Bind https://deploy.example.com inside Coolify (Settings → Instance's Domain) or Dokploy (Settings → Web Server), verify HTTPS login works, and immediately enforce an explicit inbound policy in Netcup SCP → Firewall (which filters packets on the host hypervisor outside iptables — remember Docker bypasses host ufw rules by inserting PREROUTING DNAT and DOCKER FORWARD rules ahead of ufw INPUT chains, requiring DOCKER-USER or SCP Firewall rules):

SCP Firewall DirectionProtocol & PortSourceActionOperational Reason
InboundTCP 800.0.0.0/0, ::/0ACCEPTHTTP-to-HTTPS redirect & Let’s Encrypt HTTP-01
InboundTCP 443 & UDP 4430.0.0.0/0, ::/0ACCEPTTLS 1.3 & HTTP/3 QUIC ingress to Traefik/Caddy
InboundUDP 51820 / UDP 416410.0.0.0/0, ::/0ACCEPTWireGuard or Tailscale direct peer tunnel
InboundTCP 22WireGuard / Admin IPACCEPT (else DROP)Eliminates public SSH brute-force noise
InboundTCP 8000, 3000, 6001, 60020.0.0.0/0, ::/0DROPBlocks unencrypted setup UI & raw Soketi sockets after HTTPS cutover

4. Preventing Build OOMs & Nightly pg_dump Backups to R2

Unconstrained Next.js, Vite, or Rust builds happily allocate 6+ GB of heap and trigger the Linux OOM killer on an 8 GB host. Lock every heavy build pipeline to 2.5 cores and 4 GB RAM so 1.5 physical Zen 5 threads and 4 GB DDR5 ECC remain dedicated to live traffic:

# Build-time Environment Variables (Coolify -> Environment Variables -> Build Time / Dokploy -> Env)
NODE_OPTIONS=--max-old-space-size=3072
NEXT_TELEMETRY_DISABLED=1
CARGO_BUILD_JOBS=2

# Custom Docker Build / Run Options on RS 1000 G12.5 (4C / 8G)
--cpus="2.5" --memory="4g" --memory-swap="5g"

Pair free €0 SCP Copy-on-Write VM snapshots (taken before OS or Coolify/Dokploy upgrades) with an automated nightly PostgreSQL logical dump streamed over Netcup’s 2.5 Gbps EU/US fair-use port (300 Mbps only above 3 TB/24h; 1 Gbps with a 2 TB/mo quota in SIN, with rclone config pre-configured with a Cloudflare R2 or Hetzner Storage Box remote named r2):

cat <<'EOF' | sudo tee /usr/local/bin/backup-paas-pg.sh
#!/usr/bin/env bash
set -euo pipefail

STAMP=$(date -u +"%Y-%m-%d_%H%M")
HOST_TAG=$(hostname -s)

# Dump every PostgreSQL container running on the node with zstd compression
for CID in $(docker ps --format '{{.ID}} {{.Image}}' | awk '/postgres|pgvector/ {print $1}'); do
  NAME=$(docker inspect --format '{{.Name}}' "$CID" | sed 's#^/##')
  docker exec "$CID" pg_dumpall -U postgres --clean --if-exists \
    | zstd -T2 -10 \
    | rclone rcat "r2:netcup-backups/${HOST_TAG}/${NAME}_${STAMP}.sql.zst"
done

rclone delete --min-age 14d "r2:netcup-backups/${HOST_TAG}/"
EOF

sudo chmod 700 /usr/local/bin/backup-paas-pg.sh
echo "20 2 * * * root /usr/local/bin/backup-paas-pg.sh >> /var/log/paas-backup.log 2>&1" \
  | sudo tee /etc/cron.d/paas-pg-backup

5. Coolify & Dokploy Production Troubleshooting Matrix

Failure SymptomRoot Cause on KVM / DockerExact Remediation
Traefik 502 Bad Gateway right after green deployApp binds 127.0.0.1 or ::1 loopback inside container, or Traefik routes to an unexposed port on dual-stack networks.Set HOST=0.0.0.0 and PORT=3000 in app env, and explicitly set Ports Exposes: 3000 (Coolify) or Container Port 3000 (Dokploy).
Nixpacks / Dockerfile build aborts with exit code 137Linux cgroup OOM-killed node or rustc because V8 heap exceeded container memory or swap was absent.Confirm swapon --show displays 4G, set NODE_OPTIONS="--max-old-space-size=3072" (build-time), or upgrade to RS 2000 G12.5 (16 GB RAM).
no space left on device under /var/lib/docker/overlay2Accumulated BuildKit layer caches and dangling images exhausted the 128 GB NVMe partition.Enable scheduled Docker cleanup in UI and run docker builder prune -af --filter "until=168h" && docker image prune -af --filter "until=168h".
Coolify live build stream stalls or terminal disconnectsProxy strips WebSocket Upgrade headers or client connects to raw port 6001/6002 blocked by SCP Firewall.Access Coolify strictly via https://deploy.example.com (Traefik routes /app and /terminal/ws internally over 443); enable WebSockets in Cloudflare if orange-clouded.
Let’s Encrypt cert fails with 429 rateLimited or redirect loopRepeated broken deploys hit ACME’s 5-failures/hour limit, or Cloudflare SSL mode is set to Flexible instead of Full (Strict).Switch Cloudflare SSL/TLS to Full (Strict), or configure Traefik DNS-01 wildcard issuance (CF_DNS_API_TOKEN) so individual app deploys skip HTTP-01 challenges.

Size multi-container memory headroom in our Workload Sizer or compare dedicated vs. shared cores in Netcup Root-Server vs. VPS before applying an active #rs1 or #rs2 code below.

Edge-Cached Pool · Click Code to Auto-Apply
Select Model Tier:
#rs1

RS 1000 G12.5

2 Months Free · Valid for New & Existing Customers (12M Term)

EPYC 9645/9655 Zen 5 4 Dedicated Cores 8GB DDR5 ECC 128GB NVMe · 2.5G EU/US
★ Savings Check vs. €5 Net Welcome Code (#5e)
At 0% Non-EU VAT, #rs1 saves €36.52 net vs. €5.00 net with #5e — €31.52 extra net savings.
Drawing random code (1 of 5)... 1/5 Use This Voucher Automatically * →
* Partner link (zero extra cost to you)
Auto-applies via ?gutschein= cart link · Product vouchers work for new & existing accounts. Full Voucher Rules & Pool →

Frequently Asked Questions

Should I choose Coolify v4 or Dokploy on an 8 GB Netcup RS 1000 G12.5? ▼

Dokploy idles lighter (~320 MB vs ~620 MB for Coolify v4) and uses Docker Swarm natively, making it nimble on 4 GB VPS 500 or 8 GB RS 1000 nodes. Coolify v4 adds dedicated remote Build Server offloading, richer one-click service templates, and PR preview workflows once you run 8 GB (RS 1000) or 16 GB (RS 2000).

Why pick RS 1000 G12.5 (€15.22/mo) over VPS 1000 G12.5 (€11.17/mo) for PaaS hosting? ▼

VPS 1000 G12.5 runs shared EPYC vCores normalized to a 2.0 GHz live-migration profile. RS 1000 G12.5 pins 4 dedicated AMD EPYC™ 9645 or 9655 (Zen 5) physical threads for €4.05/mo extra in Year 1, letting you isolate 2.5 cores for Docker builds while 1.5 physical cores serve PostgreSQL and Traefik with 0% steal.

Which ports must be blocked in Netcup SCP Firewall after installing Coolify or Dokploy? ▼

Once your dashboard is reachable over HTTPS (port 443) via Traefik or Caddy, explicitly drop inbound TCP 8000 (Coolify HTTP), TCP 3000 (Dokploy HTTP), and TCP 6001/6002 (Coolify Soketi realtime/terminal) in SCP Firewall so attackers cannot bypass proxy TLS or middleware.

When should I split out a build server or upgrade to RS 2000 G12.5? ▼

Step up to RS 2000 G12.5 (8 dedicated Zen 5 cores, 16 GB DDR5 ECC, 256 GB NVMe, €31.35/mo net Year-1 with #rs2) or pair a VPS 500 G12.5 build worker (€6.94/mo net standard 12M for existing accounts, or €6.52/mo net Year-1 with #5e for new customers) when active containers exceed 25 services or local database volumes pass 90 GB.

Related Reviews & Setup Guides

Provider Comparisons