The Cloud Exit Strategy: Architecting for Independence

We have normalized paying hundreds of dollars a month for infrastructure before acquiring a single customer. It's time to reject the complexity tax and return to the $5 VPS.

Share
The Cloud Exit Strategy: Architecting for Independence

We have normalized a dangerous standard in modern web development: paying hundreds of dollars a month for infrastructure before acquiring a single customer. We build distributed systems for simple problems. We rent our identity, our data, and our compute from vendors who profit from our complexity.

It is time to reject the complexity tax. It is time to return to the $5 VPS.

Here is the architecture of independence.

The Philosophy: The Modular Monolith

The industry tells you to split your application into microservices, serverless functions, and edge computing nodes. This is excellent advice for Netflix. It is terrible advice for you.

For 99% of SaaS applications, the correct architecture is a Modular Monolith running on a Linux server you control. This approach minimizes network latency, eliminates distributed systems failures, and—most importantly—gives you infinite runway.

This isn’t just about saving money. It is about architectural sanity.

Layer 1: The Control Plane (Coolify / Dokploy)

The main reason developers flock to Vercel or Heroku is the “git push” deployment experience. Setting up Linux servers, configuring Nginx reverse proxies, and managing SSL certificates manually is tedious.

But we don’t need to do that manually anymore. We can run our own Platform as a Service (PaaS).

  • The Choice: Coolify or Dokploy.
  • The Lesson: These tools act as a self-hosted overlay for your VPS. You connect your GitHub repository, and they handle the Docker builds, reverse proxies, and SSL certificates automatically.
  • Why: You get the Vercel experience (automated deployments, preview URLs) without the Vercel restrictions (bandwidth limits, function timeouts, vendor lock-in).

Layer 2: The Data Layer (SQLite + Litestream)

We’ve been trained to believe that production databases must be managed clusters of Postgres or MySQL. For high-volume SaaS, this is true. For you, it’s likely overkill.

  • The Choice: SQLite with Litestream.
  • The Lesson: SQLite is not a “toy” database. It is a single file that lives on your server. Litestream provides continuous replication to S3-compatible storage (like Backblaze B2 or Cloudflare R2).
  • Why: You get sub-millisecond query latency because the data is local, and you get “managed” durability because every write is replicated off-site.

Layer 3: The Identity (Authentik / Auth.js)

Don’t rent your users. If you use a managed auth provider, your pricing scales per user. This is a tax on your growth.

  • The Choice: Authentik or Auth.js.
  • The Lesson: Authentik is an open-source identity provider that you run in a container. It handles OAuth, 2FA, and SSO.
  • Why: Your user data lives in your database. You have full control over the login flow, and you never get a surprise bill for “active monthly users.”

Layer 4: The Edge (Traefik / Caddy)

You need a gateway that handles SSL and routing.

  • The Choice: Traefik or Caddy.
  • The Lesson: These proxies automatically fetch and renew Let’s Encrypt certificates.
  • Why: They are built for Docker. When you spin up a new container, they detect it and route traffic to it automatically.

Conclusion: Own Your Infrastructure

Independence isn’t about being anti-cloud. It’s about optionality.

When you architect for independence, you can still move to AWS or Vercel later if you hit a million users. But you aren’t forced to do it on Day 1.

Stop renting complexity. Start building value.