Cloud repatriation rarely fails because of hardware. It fails when teams try to swap compute, networking, and state all in one weekend. A calmer approach treats the migration as four reversible phases.

1. Mirror

Stand up your target bare-metal nodes (or Proxmox cluster) alongside your existing cloud environment. Replicate stateful services—especially PostgreSQL—over an encrypted link and verify lag stays within your recovery point objective.

2. Tunnel

Bridge your on-premise rack and cloud VPCs with a WireGuard mesh so services can talk across environments without exposing internal ports to the public internet.

[Interface]

PrivateKey = <node-private-key>
Address = 10.42.0.10/24
ListenPort = 51820

3. Cut over

Shift stateless traffic incrementally at the edge (Nginx or DNS) while keeping the cloud tier warm as an immediate fallback.

Rule of thumb: Never decommission the old environment until the new one has survived at least one full billing or traffic cycle.

4. Drill failover

Before calling the migration done, pull a link, restart a primary node, and verify automated failover and runbooks work under load.

  • Confirm PgBouncer and connection pools reconnect cleanly.
  • Verify alerting fires to the right on-call channel within seconds.
  • Document every manual step so the next drill takes half the time.