Back to Blog
Infrastructure Proxmox Docker Cloud Costs

Hybrid Cloud Architecture: Proxmox and Docker

• 9 min read • Written by Marlon

TL;DR:

  • The Trap: Running heavy automated testing suites, staging preview clusters, and local AI model fine-tuning entirely on public cloud instances burns thousands of dollars every month on idle compute, unattached storage, and exorbitant data egress fees.
  • The Architecture: Sovereign hybrid cloud pairing mission-critical public edge production (AWS/Cloudflare) with private on-premise Proxmox VE nodes (KVM + LXC containers) interconnected via an encrypted WireGuard/Tailscale mesh with zero public router port forwarding.
  • The Business Impact: Amortizes physical hardware investments in under 90 days, delivers unlimited zero-marginal-cost staging environments, and slashes recurring cloud compute invoices by 60% to 80%.

The Public Cloud Bleed: Paying for Idle Staging Clusters

Hosting development preview branches, compilation runners, and staging databases entirely in the public cloud is setting corporate runway on fire.

For growing software startups and mid-market engineering teams, spinning up preview environments in AWS, GCP, or Azure feels delightfully effortless initially.

However, when leadership reviews quarterly infrastructure expenses, a sobering reality emerges:

Over 60% of the company’s cloud hosting invoice is generated by non-production resources:

  • Idle staging databases sitting at 2% CPU utilization over weekends.
  • Continuous integration runners burning expensive vCPU minutes downloading npm and Docker caches.
  • Data science notebooks crunching test datasets while racking up extortionate data transfer egress fees.

Subsidizing non-production workloads on public cloud infrastructure degrades gross margins and shortens runway.

The answer is not abandoning the public cloud; it is adopting an enterprise-grade Hybrid Cloud Architecture.

  1. STAGE 01 On-Prem

    Proxmox VE Cluster

    High-density physical bare-metal hardware running KVM virtual machines and ultra-lightweight LXC container engines.

  2. STAGE 02 Mesh VPN

    Encrypted Mesh Tunnel

    WireGuard or Tailscale overlay connects on-premise nodes to cloud VPCs with mTLS encryption and zero open router ports.

  3. STAGE 03 Reverse Proxy

    Edge Reverse Proxy

    Cloudflare Zero Trust or an edge reverse proxy securely directs authorized internal developer traffic over the private mesh.

  4. STAGE 04 Production

    Public Ingress Isolation

    Public users hit globally distributed cloud endpoints; internal workflows execute on local hardware with zero marginal cost.


The Hybrid Topology: Cloud at the Edge, Bare-Metal at the Core

A pragmatic hybrid architecture pairs the unique strengths of public clouds with private physical servers:

1. Mission-Critical Production on Public Cloud / VPS

Customer-facing web applications, global CDNs, and production APIs stay hosted in public cloud infrastructure (AWS, Cloudflare, or managed VPS networks) to ensure multi-region redundancy, DDoS mitigation, and 99.99% external uptime.

2. Heavy Lifting on Private Proxmox VE Hardware

  • Self-Hosted CI/CD Runners: GitHub Actions or GitLab CI runners execute on bare-metal CPUs with NVMe caching, slashing build times from 12 minutes to 90 seconds.
  • Ephemeral Review Environments: Developers spawn Docker preview stacks dynamically for every pull request without adding a single dollar to the AWS invoice.
  • Local AI & Analytics Ingestion: Model training, batch ETL pipelines, and synthetic data simulations run on local GPUs and high-core servers without cloud hourly rental premiums.

Proxmox VE: Bare-Metal Virtualization Without Enterprise Tax

Proxmox Virtual Environment (VE) is an open-source, enterprise-grade server virtualization management platform built on Debian Linux.

Unlike VMware or commercial hypervisors that demand exorbitant per-core licensing fees, Proxmox delivers:

  • KVM (Kernel-based Virtual Machine): Full hardware virtualization for running complete Linux or Windows servers with dedicated PCI-e hardware passthrough (such as dedicated GPUs for machine learning).
  • LXC (Linux Containers): Ultra-lightweight operating system containers sharing the host kernel with near-zero virtualization overhead. An LXC container running Docker initializes in less than 2 seconds and consumes only 40MB of base RAM.
  • ZFS Storage with Hardware Snapshots: Copy-on-write snapshotting allows spinning up a 50GB staging database replica in 3 seconds using zero extra disk space until data is mutated.

Code Comparison: Insecure Port Forwarding vs Hardened Mesh Overlay

Naive: Exposing Local Staging via Insecure Home Router Port Forwarding

# Naive Staging Setup: Direct port forwarding through office/home router
# CRITICAL SECURITY DISASTER: Exposes internal services directly to Shodan scanners!

# Router Configuration:
# External Port 8080 -> Forward to Internal 192.168.1.100:8080 (Plaintext HTTP staging)
# External Port 5432 -> Forward to Internal 192.168.1.100:5432 (Public Postgres port!)

# Vulnerability 1: Staging database exposed to automated brute-force attacks worldwide
# Vulnerability 2: Plaintext HTTP traffic intercepts developer session cookies
# Vulnerability 3: Dynamic residential IP breaks DNS whenever ISP rotates leases

Production: Zero-Trust WireGuard Mesh Tunnel with Tailscale & Docker Bridge

# Production Topology: WireGuard Mesh Tunnel Configuration (/etc/wireguard/wg0.conf)
# No router port forwarding required; all traffic traverses encrypted UDP peer tunnel

[Interface]
# Private mesh IP for Proxmox Compute Node
Address = 10.200.0.2/24
PrivateKey = aAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
ListenPort = 51820

# Strict firewall rules: Allow mesh communication, deny raw public ingress
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

# Public Cloud Gateway Peer (AWS VPC / VPS Reverse Proxy)
[Peer]
PublicKey = bBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB=
Endpoint = vpc-gateway.coins5.dev:51820
AllowedIPs = 10.200.0.0/24, 172.20.0.0/16
PersistentKeepalive = 25

Declarative Docker Staging Stack with Ephemeral Database Clones

# /opt/stacks/staging-review-pr104/docker-compose.yml
version: "3.8"

networks:
  mesh-network:
    external: true # Attached to WireGuard/Tailscale private network bridge

services:
  staging-api:
    image: company/backend:pr-104
    restart: unless-stopped
    networks:
      - mesh-network
    environment:
      - NODE_ENV=staging
      - DATABASE_URL=postgresql://staging_user:${STAGING_DB_PASS}@staging-postgres:5432/staging_db
    deploy:
      resources:
        limits:
          cpus: "2.0"
          memory: 4096M

  staging-postgres:
    image: postgres:16-alpine
    restart: unless-stopped
    networks:
      - mesh-network # ZERO public ports mapped to host
    environment:
      POSTGRES_DB: staging_db
      POSTGRES_USER: staging_user
      POSTGRES_PASSWORD: ${STAGING_DB_PASS}
    volumes:
      - /zfs/snapshots/pr-104-db:/var/lib/postgresql/data # Instant ZFS snapshot clone

Automated Self-Hosted GitHub Actions Runner Service

#!/usr/bin/env bash
# Automated GitHub Actions Bare-Metal Runner Setup on Proxmox LXC Container
set -euo pipefail

RUNNER_DIR="/opt/actions-runner"
REPO_URL="https://github.com/my-org/my-saas"
TOKEN="ENV_REGISTRATION_TOKEN"

mkdir -p "${RUNNER_DIR}" && cd "${RUNNER_DIR}"

# Download official GitHub runner binary
curl -o actions-runner-linux-x64.tar.gz -L \
  https://github.com/actions/runner/releases/download/v2.314.1/actions-runner-linux-x64-2.314.1.tar.gz
tar xzf ./actions-runner-linux-x64.tar.gz

# Configure non-root runner with local NVMe caching
./config.sh --url "${REPO_URL}" --token "${TOKEN}" --name "proxmox-baremetal-runner-01" --unattended

# Install systemd service for continuous unattended builds
sudo ./svc.sh install
sudo ./svc.sh start

echo "[RUNNER ACTIVE] Self-hosted CI runner executing with 16 dedicated physical cores at 0 marginal cost."

Real-World Case Studies: Hybrid Cloud Under Pressure

PróximaBolilla (proximabolilla.com): Massive Offline Monte Carlo Simulations

PróximaBolilla performs computational combinatorics and statistical lottery simulations across millions of permutations.

  • The Problem: Running massive Monte Carlo simulation runs on AWS cloud compute instances was generating hundreds of dollars in weekly compute bills, restricting how frequently the team could update statistical probability models.
  • The Solution: We deployed a high-density 32-core AMD Ryzen Proxmox VE server in our private infrastructure lab. Heavy simulation loops run locally on bare-metal NVMe arrays, and only lightweight synthesized JSON outputs are synced to the cloud edge over an encrypted WireGuard mesh.
  • The Result: The system runs continuous real-time simulations across 1,000,000 combinations with zero cloud compute charges, reducing overall infrastructure spend by over 80%.

Internal Development Labs: 15+ Parallel Environments on Refurbished Hardware

During the scaling of multiple client products at Coins5:

  • The Problem: Developers required isolated staging environments for every active pull request. Commercial cloud staging databases and preview deployments were projecting monthly costs of $1,200/month.
  • The Solution: We provisioned an enterprise refurbished Dell PowerEdge server (128GB ECC RAM) running Proxmox VE and Docker, connected to our team through Tailscale Zero Trust tunnels.
  • The Result: The physical hardware cost of $900 was fully amortized in less than 30 days, and the engineering team now runs more than 15 simultaneous review environments at an ongoing marginal cost of $0/month.

Pre-Flight Checklist for Hybrid Cloud Architectures

Before deploying local physical hardware to support your cloud development ecosystem, verify these five architectural gates:

  • Zero Open Router Ingress Ports: Are all connections between on-premise Proxmox hardware and the cloud handled strictly through encrypted peer-to-peer mesh VPNs (WireGuard or Tailscale)?
  • Automated ZFS Snapshot Backups: Are container volumes backed up using copy-on-write ZFS snapshots with encrypted replication to off-site cloud storage?
  • Enforce Resource Quotas: Does your Proxmox configuration set strict CPU and memory limits per LXC container to prevent an errant build from starving the hypervisor?
  • Isolated Network Segmentation (VLANs): Is your private virtualization cluster segregated from standard office/home IoT traffic on a dedicated VLAN?
  • Calculate 90-Day Amortization: Have you calculated hardware procurement costs (CapEx) against cloud OpEx savings to ensure positive ROI within three to six months?

Architectural Advisory

Hybrid cloud architecture is the hallmark of mature engineering leadership, balancing the global availability of public clouds with the unrivaled compute economics of dedicated physical hardware.

At Coins5, Marlon helps fast-growing startups and enterprises architect high-performance hybrid systems, establish secure WireGuard/Tailscale mesh topologies, and permanently lower cloud infrastructure overhead.

If your team is overpaying for cloud staging environments or wants to configure a cost-effective hybrid setup with Proxmox and Docker, schedule a 15-minute discovery call or connect directly on WhatsApp.

Overpaying for Cloud Staging and CI/CD Runners?

Let's design a secure, low-latency hybrid cloud topology with Proxmox and Docker in a concise 15-minute technical discovery call.

Marlon - Senior Architect
Author & Systems Architect

Marlon / Coins5

Senior Full Stack Developer & Cloud Architect. Building custom software and production MVPs with Clean Architecture, high-concurrency cloud design, and AI velocity.

Book 15m Call