24 Hours to Evacuate: Moving 40 Routes from Serverless to a VPS in Emergency ModeArticle · digest for October 16
European comic-style graphic illustration of an urgent migration of web services from serverless to a private VPS
Article4 sections≈ 4 min

24 Hours to Evacuate: Moving 40 Routes from Serverless to a VPS in Emergency Mode

In marketing brochures, serverless architecture looks like pure utopia. You just write isolated functions, click deploy, and the cloud giant handles scaling, replication, failover, and monitoring. But what happens in the physical world when a provider's core data centers fail one after another?

In October 2026, indie developer RentCeisy from TempApp studio hit that exact storm. After infrastructure outages across the Sasovo, Kaluga region, and Vladimir data centers, the cloud environment dropped into an "unstable configuration" state. Critical backend functions for his mobile apps (Kopilka Otkazov and Sudoku Arena) faced total downtime. He had exactly 24 hours to rescue production. What makes this case so valuable is how clearly it exposes real-world traps that DevOps textbooks skip.

Let's break down the key engineering takeaways and pitfalls from this emergency move to a self-hosted VPS.

Trap #0: Check the Virtualization Type Before Configuring Anything

When the clock is ticking, your first instinct is to grab the cheapest server from the nearest host. RentCeisy did just that—and immediately hit a brick wall. Swap refused to mount, enabling ufw killed all network interfaces, and the Docker daemon crashed with iptables initialization errors.

The culprit was outdated OpenVZ container virtualization, which shares a single host kernel across all tenants. On those machines, you don't control kernel modules.

# First command to run on any new server:
systemd-detect-virt

If the command outputs openvz or lxc, don't waste time fighting the OS—immediately switch to a plan with full kvm hardware virtualization. As we noted when covering AI agents on a VPS: deploying an autonomous assistant for $15 a month, clean KVM saves you from dozens of mysterious system failures.

Trap #1: Docker Silently Ignores ufw Rules

Did you configure ufw default deny incoming, open only port 443, and assume your perimeter is locked down? Bad news: by default, Docker modifies iptables rules in a way that bypasses ufw chains.

When you publish a port in docker-compose.yml (ports: ["3001:3001"]), Docker inserts rules into the DOCKER-USER chain, which the Linux kernel evaluates before ufw. As a result, your internal microservice or database ends up exposed to the entire internet.

To block external traffic and allow access only from a trusted IP, add an explicit rule to DOCKER-USER:

# Block access to port 3001 from every IP except the trusted one
iptables -I DOCKER-USER -p tcp --dport 3001 ! -s <TRUSTED_SERVER_IP> -j DROP

Trap #2: Docker Compose Restart Keeps Old .env Values

Here is another classic mistake: you update a secret token or database URL in .env and run docker compose restart. The container restarts, yet the app keeps failing with the old error.

Why? The restart command simply restarts the existing container in its current state—it does not reload environment variables. To apply .env changes, always recreate the containers with docker compose up -d.

Target Stack: Caddy, Hono, and SQLite Instead of Cloud Giants

The final architecture turned out remarkably clean and reliable:

  • Caddy web server with automatic Let's Encrypt certificates and reverse proxying.
  • Node.js 22 backend powered by the Hono.js micro-framework.
  • Local SQLite (better-sqlite3) with Write-Ahead Logging (WAL) enabled instead of a heavy distributed YDB cluster.
version: '3.8'
services:
  caddy:
    image: caddy:2-alpine
    restart: always
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile
      - caddy_data:/data

  api:
    build: ./services/api
    restart: always
    environment:
      - DATABASE_URL=/data/production.db
    volumes:
      - api_data:/data

volumes:
  caddy_data:
  api_data:
The Main Architectural Lesson of Serverless

Serverless functions give developers an illusion of effortless independence. Yet if your business logic is tightly coupled to proprietary cloud triggers and closed queue APIs, evacuating becomes a full rewrite from scratch. Separate business code from transport adapters: isolating Hono routes is what let RentCeisy move 40 routes and 39 tables to his own VPS in 24 hours without breaking mobile clients.

Want a deep diveVotes help us choose what to break down in detail. This material has 0 votes.
Sources · 2