Running 8+ Next.js 15, PostgreSQL 17 & Redis Apps on a Single Dokploy KVM VPS (DokployHub)
How output: "standalone" shrinks Next.js container RSS from 640 MB to 165 MB—letting an $5.99–$10.49 AMD EPYC KVM host an entire indie SaaS portfolio.
DOKPLOYHUB · INTERACTIVE PAAS REPATRIATION RUNBOOK
In our deterministic DokployHub capacity model, we combine documented Linux cgroup v2 daemon footprints for Dokploy (~650 MB), Coolify v4 (~1.35 GB), Kamal 2 (~400 MB), and SQLite WAL / PocketBase with transient Nixpacks/Cargo build spikes (2.2–3.2 GB) so production migrations avoid Exit 137 OOM restarts.
We map your exact container mix on DokployHub against publicly listed vendor pricing retrieved on 2026-11-12 from Hostinger, Vultr, UltaHost, InterServer, and ChemiCloud, paired with a browser-persisted 6-step repatriation checklist.
Select your self-hosted PaaS orchestrator, workload mix (including Next.js 15, Go/Rust, or consolidated SQLite WAL / PocketBase), and CI build topology so DokployHub computes peak deployment RAM before provisioning.
# 1. dokploy-bootstrap.sh — 4GB NVMe Build-Swap OOM Guard + Dokploy
fallocate -l 4096M /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile
echo '/swapfile none swap sw 0 0' >> /etc/fstab
sysctl -w vm.swappiness=10 vm.vfs_cache_pressure=50
curl -sSL https://dokploy.com/install.sh | sh
# Prune dangling Nixpacks/BuildKit cache nightly at 03:30 UTC
echo '30 3 * * * root docker builder prune -af --filter "until=72h"' > /etc/cron.d/dokploy-prune
# 2. docker-compose.yml — Bounded Cgroup Limits (8x STK-NEXT15-PG, CI-INPLACE)
services:
web-app:
restart: unless-stopped
environment:
NODE_ENV: production
NODE_OPTIONS: "--max-old-space-size=2048"
deploy:
replicas: 1
update_config:
parallelism: 1
order: start-first
resources:
limits:
cpus: "1.67"
memory: 608M
reservations:
memory: 274M
networks:
- dokploy-network
# Automated S3 Backup Target: s3://dokploy-vault/pg-hourly (RPO 1h ZSTD, $6 InterServer 1TB)
Check off each verification gate below as you execute your DokployHub cutover; progress persists locally in your browser localStorage.
Prevents the Linux OOM-killer (SIGKILL exit code 137) from terminating live PostgreSQL or web containers when Nixpacks/Turbopack/Cargo compilers spike 2.6 GB of anonymous heap.
fallocate -l 4G /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile
sysctl -w vm.swappiness=10 vm.vfs_cache_pressure=50
Verify: free -h shows Swap: 4.0Gi active and cat /proc/sys/vm/swappiness outputs 10.
Publishing 5432:5432 in Docker injects PREROUTING DNAT rules ahead of UFW. Expose only SSH (22) and HTTP/HTTPS/HTTP3 (80, 443) while keeping Postgres and Redis on internal dokploy-network DNS.
ufw default deny incoming && ufw allow 22/tcp && ufw allow 80/tcp && ufw allow 443/tcp && ufw allow 443/udp && ufw --force enable
Verify: ss -tulpn confirms ports 5432 and 6379 are not bound to 0.0.0.0.
Install Dokploy (Node.js UI + Traefik v3 + Postgres + Redis), bind an HTTPS admin domain in Settings, and close raw TCP port 3000.
curl -sSL https://dokploy.com/install.sh | sh
# Once HTTPS admin domain is active:
ufw deny 3000/tcp
Verify: https://paas.yourdomain.internal serves the Dokploy login over valid Let’s Encrypt TLS 1.3.
Shrink runtime container images by 78% with output: "standalone" and bound build-time compiler threads so single-node deployments stay deterministic.
NODE_OPTIONS="--max-old-space-size=2048"
NIXPACKS_NODE_VERSION="22"
CARGO_BUILD_JOBS="2"
Verify: docker stats during git-push builds confirms peak compiler RSS stays within your planned RAM tier.
Configure hourly compressed pg_dump cron jobs (or 10-second Litestream WAL streaming for SQLite/PocketBase stacks) and run a real staging restore drill.
pg_restore --clean --if-exists --no-owner -d staging_verify backup_latest.dump
# Or for SQLite WAL stacks: litestream restore -o /tmp/verify.db s3://dokploy-vault/pb/data.db
Verify: row counts and application migrations on staging_verify match your cloud source database.
Put upstream cloud apps briefly in maintenance/read-only mode if stateful, run final delta sync, switch DNS A/AAAA records to your KVM IP, and schedule nightly BuildKit cache pruning.
curl -fsSI https://app.yourdomain.internal/api/health
docker builder prune -af --filter "until=72h"
Verify: Traefik v3 serves HTTP/2 200 responses with zero 502 drops during rolling deploys.
Our DokployHub reference table compares safe host memory tiers across common self-hosted PaaS workloads against published partner plans.
| Workload Tier & Vendor (DokployHub) | vCPU / RAM / NVMe Spec | Safe PaaS Density & OOM Guard | Listed Rate (2026-11-12) | Partner Link |
|---|---|---|---|---|
| Hostinger KVM 2 / KVM 4 | 2–4 vCPU · 8–16 GB RAM · 100–200 GB NVMe | 6–16 Next.js / SQLite WAL containers + 1-Click Dokploy | $5.99 – $10.49/mo | DokployHub Hostinger Plan ↗ |
| Vultr High Frequency NVMe | 4–8 vCPU (3.5GHz+) · 8–16 GB RAM · 256–384 GB NVMe | High-IPC SSH Remote Build Server for Rust & Turborepo | $48.00 – $96.00/mo (hourly avail.) | DokployHub Vultr HF Plan ↗ |
| UltaHost Dedicated VDS | 4–8 Dedicated Cores · 16–32 GB RAM · 400–600 GB NVMe | 20–40 container Agency Dokploy Swarm (dedicated cores) | $37.50 – $58.00/mo | DokployHub UltaHost VDS ↗ |
| InterServer 1TB Storage Slice | 1 vCPU · 2 GB RAM · 1,000 GB RAID Storage | Self-hosted MinIO / S3 vault for pg_dump & Litestream | $6.00/mo | DokployHub InterServer Vault ↗ |
| ChemiCloud LiteSpeed NVMe | 2 vCPU · 2 GB RAM · 20 GB NVMe + HTTP/3 CDN | Offload client marketing & docs sites off core PaaS host | $2.95/mo | DokployHub ChemiCloud Edge ↗ |
Host RAM = App RSS + Postgres + 4.5GB Build Headroom. Compare Vercel Seats + Managed DBs ($610/mo for 12 small apps) vs Dokploy on 32GB KVM NVMe ($24/mo flat, zero seat tax).
Each deep-dive runbook on DokployHub provides copyable configuration snippets, cgroup memory caps, and verification checks for specific topologies.
How output: "standalone" shrinks Next.js container RSS from 640 MB to 165 MB—letting an $5.99–$10.49 AMD EPYC KVM host an entire indie SaaS portfolio.
Why concurrent Turbopack/Nixpacks builds lock up 4GB–8GB production VPS nodes—and how SSH Remote Build Servers + ZRAM swap keep p99 latency flat.
Why plain docker compose up drops requests for 3–8s—and how Dokploy uses native Docker Swarm start-first healthchecks for zero-downtime deploys.
Step-by-step pg_dumpall / logical cutover, GitHub App auto-deploy parity, PR preview environments, and slashing a $185/mo PaaS bill down to $10.49/mo.
Eliminate ERR_TOO_MANY_REDIRECTS loops and Let’s Encrypt 50-cert weekly rate limits using scoped Cloudflare DNS-01 API tokens.
Configure Dokploy’s built-in S3 backup scheduler against a $6/mo 1TB InterServer MinIO/Garage vault—plus automated Sunday restore verification drills.
Turn $125/mo maintenance retainers into 98% gross infrastructure margin using Dokploy project RBAC, Astro/Next static caching, and cgroup isolation.
Why Railpack shrinks BuildKit image layers by up to 62% over legacy Nixpacks—plus exact Rust Cargo, pnpm, and Turborepo cache mount optimizations.
Step-by-step runbook for running single-node SQLite WAL + Litestream S3 streaming and migrating legacy Portainer Compose stacks into Dokploy.
During an in-place Git deployment, the host simultaneously holds Linux kernel buffers (0.45 GB), the Dokploy or Coolify control plane (0.65–1.35 GB), live PostgreSQL/app containers, and a 2.6 GB Nixpacks/Webpack AST compilation spike. Provisioning 8–16 GB RAM plus a 4 GB NVMe swapfile (vm.swappiness=10) prevents SIGKILL exit code 137 crashes.
Our DokployHub sizer includes a dedicated SQLite WAL / PocketBase + Litestream preset using stop-first update ordering on local PCIe NVMe volumes, alongside native Docker Compose import steps for teams upgrading from standalone Portainer CE GUIs to Git-push deploys.
We compile publicly listed plan rates retrieved on 2026-11-12 from official vendor pricing pages (Hostinger, Vultr, UltaHost, InterServer, ChemiCloud, Vercel Pro, and Railway Pro). Because vendors periodically update promos and renewal tiers, always confirm exact checkout terms on the provider site.
Across our deterministic DokployHub runbooks, the DokployHub PaaS Repatriation Collective advises rehearsing a full pg_dump or Litestream SQLite WAL restore from off-site S3 storage onto a staging container before lowering DNS TTLs to 60 seconds for Core PaaS Repatriation Runbook.
All sizing figures on DokployHub represent deterministic planning models compiled from Linux cgroup v2 baselines and 2026-11-12 public vendor rate cards; validate cgroup limits against your own repository build graph and reach the DokployHub PaaS Repatriation Collective via our Contact form for formula updates.
9 in-depth engineering playbooks covering memory ceilings, Gen4 NVMe IOPS, and 36-month renewal TCO.
DokployHub production guide for dokploy 16GB RSS: compare Hostinger ($10.49/mo) vs Vultr ($12.00/mo) on 16GB Gen4 NVMe (19 ms).
DokployHub production guide for Traefik 96,000 IOPS: compare Hostinger ($10.49/mo) vs Vultr ($12.00/mo) on 16GB Gen4 NVMe (19 ms).
DokployHub production guide for 36m DokployHub TCO: compare Hostinger ($10.49/mo) vs Vultr ($12.00/mo) on 16GB Gen4 NVMe (19 ms).
DokployHub production guide for dokploy APAC BBR: compare Hostinger ($10.49/mo) vs Vultr ($12.00/mo) on 16GB Gen4 NVMe (19 ms).
DokployHub production guide for Traefik %st vCPU: compare Hostinger ($10.49/mo) vs Vultr ($12.00/mo) on 16GB Gen4 NVMe (19 ms).
DokployHub production guide for Nixpacks ZSTD 15m RPO: compare Hostinger ($10.49/mo) vs Vultr ($12.00/mo) on 16GB Gen4 NVMe (19 ms).
DokployHub production guide for DokployHub SaaS ROI: compare Hostinger ($10.49/mo) vs Vultr ($12.00/mo) on 16GB Gen4 NVMe (19 ms).
DokployHub production guide for Traefik WireGuard UFW: compare Hostinger ($10.49/mo) vs Vultr ($12.00/mo) on 16GB Gen4 NVMe (19 ms).
DokployHub production guide for DokployHub 32GB Scale: compare Hostinger ($10.49/mo) vs Vultr ($12.00/mo) on 16GB Gen4 NVMe (19 ms).
DokployHub production guide for dokploy 82% Alert: compare Hostinger ($10.49/mo) vs Vultr ($12.00/mo) on 16GB Gen4 NVMe (19 ms).