QZL Infrastructure Migration: From Managed Cloud Services to Our Own VPS

Cloud Infrastructure & DevOps•~6 min read•November 22, 2026•By QZ-L Editorial
#Oracle Cloud#VPS#PostgreSQL#Next.js#Cloudflare#Infrastructure Migration
Looking for related guides? Start with the qz-l Learning Center and explore more tutorials in this topic cluster.

QZL Infrastructure Migration: From Managed Cloud Services to Our Own VPS

As QZL continues to evolve, its infrastructure needs evolve with it.

When the project first started, using managed platforms was a natural choice. Vercel made deploying the Next.js application straightforward, while managed PostgreSQL services allowed us to focus on application development instead of database administration.

That setup served us well.

However, as the project grew, we began to reconsider whether our existing infrastructure was still the most practical choice for its current stage.

We eventually decided to consolidate our infrastructure onto our own VPS.

This was not a decision driven by dissatisfaction with managed cloud services. It was a decision about balancing operational control, infrastructure costs, and the actual needs of the project.

Why We Decided to Move

Managed services offer significant advantages:

  • Minimal server maintenance.
  • Convenient deployment workflows.
  • Managed database operations.
  • Easier scaling and operational support.

These benefits are valuable, particularly for teams that want to minimize infrastructure responsibilities.

But they also come with recurring costs.

For a project like QZL, which is still growing and does not yet generate enough revenue to justify every managed service, keeping infrastructure expenses under control is important.

We wanted to simplify the infrastructure while gaining more control over how the application and its supporting services operate.

Running our own VPS gives us that flexibility, although it also means taking responsibility for more operational work.

Before and After

The migration involved two major changes: moving the Next.js application away from Vercel and consolidating multiple managed PostgreSQL databases into one self-hosted PostgreSQL instance.

Before:

             QZL Users
                 |
              Vercel
                 |
       Managed PostgreSQL
          (Multiple DBs)

After:

             QZL Users
                 |
             Cloudflare
                 |
              Our VPS
              /     \
          Next.js  PostgreSQL

Cloudflare remains part of the architecture for traffic management and domain protection, while the application and database now run on infrastructure we manage ourselves.

Moving the Application to Our VPS

The Next.js application was moved from Vercel to our Ubuntu-based VPS.

We installed the required Node.js runtime, configured the production environment, and set up the application as a systemd service.

This allows the application to run independently of an interactive terminal session and to be managed through standard Linux service commands.

For example:

sudo systemctl status qzl-app
sudo systemctl restart qzl-app

We also configured Caddy as the reverse proxy.

Caddy handles incoming HTTP/HTTPS traffic and forwards application requests to the local Next.js service. This provides automatic HTTPS certificate management and keeps the application process separate from the public-facing web server.

The result is a straightforward deployment architecture without requiring a separate application hosting platform.

Consolidating PostgreSQL Databases

The database migration was one of the more important parts of this project.

Previously, QZL relied on three separate managed PostgreSQL databases. Each database had its own connection configuration and operational considerations.

We consolidated them into a single PostgreSQL database on our VPS.

The migration involved:

  • Installing and configuring PostgreSQL.
  • Creating the target database and application role.
  • Migrating tables and data from all three source databases.
  • Consolidating the tables into the target public schema.
  • Reviewing primary keys, sequences, indexes, and constraints.
  • Checking for duplicate records and orphaned references.
  • Verifying the migrated data.

The target database now provides a single place to manage the application's relational data.

This consolidation also reduces the complexity of maintaining multiple database services.

Of course, self-hosting PostgreSQL means that database backups, recovery procedures, security updates, and ongoing maintenance are now our responsibility. These are essential operational tasks, not optional extras.

Cloudflare and Traffic Management

We also use Cloudflare as part of the new infrastructure architecture.

Rather than exposing every internal service directly, Cloudflare provides an additional layer between users and our infrastructure.

It helps us manage domains and traffic while keeping the application architecture relatively simple.

We are also keeping the DNS migration gradual. Infrastructure changes should be introduced carefully, especially when they affect production domains and existing users.

What We Gained

The migration gave us several practical benefits.

1. Lower infrastructure costs

We reduced our dependency on multiple separately billed hosting and database services.

2. More control

We now have direct control over the application runtime, database configuration, operating system, and server-level services.

3. A simpler infrastructure footprint

Instead of managing application hosting and several database instances across different platforms, we have consolidated the core application infrastructure onto one VPS.

4. More room to experiment

Having our own server makes it easier to experiment with additional services and infrastructure components when a real requirement arises.

We can evaluate background workers, messaging systems, caching, and other components without immediately committing to another managed service.

However, we do not intend to introduce additional infrastructure just because it is available. Simplicity is still a priority.

The Trade-offs

Self-hosting is not automatically better than using managed services.

We have taken on responsibilities that were previously handled by our providers.

These include:

  • Operating system updates and security maintenance.
  • PostgreSQL backups and recovery testing.
  • Application deployment and rollback procedures.
  • Monitoring server health and resource utilization.
  • Managing availability and potential infrastructure failures.

A single VPS also introduces a single point of failure. If the server becomes unavailable, both the application and its database may be affected.

We need to account for these risks as the project continues to grow.

Our next infrastructure improvements will focus on automated database backups, more reliable deployment workflows, and operational monitoring.

Looking Ahead

This migration is an important milestone for QZL, but it is not necessarily our permanent infrastructure strategy.

We are not trying to avoid managed services forever.

Managed platforms are valuable because they reduce operational responsibilities and allow developers to focus on building products. When the project grows and its revenue justifies the additional expense, moving some services back to managed platforms may become the more sensible decision.

For now, managing our own infrastructure is a practical choice for the size and needs of QZL.

The goal is simple: use the resources we have wisely, understand the systems we depend on, and invest in infrastructure when the business actually needs it.

This migration is not just about moving servers. It is another step in learning how to build, operate, and maintain the infrastructure behind our own product.

Related Posts

Control GitHub Copilot Customizations with Enterprise Managed Settings

Use GitHub Enterprise policies to control Copilot plugins, MCP servers, agents, hooks, and executable extensions without blocking approved tools.

Git's November 2026 Security Release: A Practical Update Checklist

Map Git's six November 2026 vulnerabilities to real repository operations and update safely across workstations, CI, and hosting services.

Kubernetes kube-proxy IPVS Is Going Away: Plan the Migration to nftables

Kubernetes is retiring kube-proxy IPVS. Learn how to inventory your cluster, choose nftables or iptables, and validate the migration.