Back to articles
Technology Insight

Migrating from AWS to Hetzner + Coolify: How We Slashed Our Cloud Infrastructure Costs by 85%

June 4, 2026

Introduction: The Hidden Cost of Cloud Convenience

For years, Amazon Web Services (AWS) has been the gold standard for deploying web applications. With its promise of infinite scalability, managed services, and 99.99% uptime, it is often the default choice for growing businesses. However, as many engineering teams eventually discover, this convenience comes with a steep premium. What starts as a modest monthly bill can rapidly balloon into a major operational expense, driven by complex pricing models, data transfer fees, and idle managed resources.

Our organization reached a critical tipping point where our monthly AWS invoice was no longer proportional to our actual compute utilization. We were paying for peace of mind, but the ROI was diminishing. This realization triggered an ambitious infrastructure review. The goal was clear: significantly reduce infrastructure overhead without sacrificing application performance, developer velocity, or system reliability.

This article provides an in-depth retrospective of our journey migrating a production web ecosystem from AWS to a bare-metal/VPS cluster on Hetzner, orchestrated by Coolify—an open-source, self-hosted Heroku alternative. By making this strategic shift, we successfully reduced our monthly cloud spend by 85%. Here is exactly how we did it.

---

The AWS Pain Points: Why We Needed an Alternative

Before discussing the solution, it is essential to understand why our AWS setup became financially unsustainable. Our architecture relied on a standard enterprise stack: Amazon ECS (Elastic Container Service) for container orchestration, AWS Fargate for serverless compute, Amazon RDS for managed PostgreSQL, and Application Load Balancers (ALBs) to route traffic.

While this setup was highly resilient, it suffered from three primary cost drivers:

  • The Managed Service Premium: Services like RDS and Fargate charge a massive markup compared to the raw compute and storage power they provide. We were paying for administrative abstraction that our internal DevOps capabilities could handle.
  • Data Transfer Out (DTO) Fees: AWS egress traffic fees are notoriously high. As our platform handled more media assets and API requests, our bandwidth costs began to rival our actual compute costs.
  • Over-Provisioning for Idle Time: To handle occasional traffic spikes, we maintained a baseline of provisioned capacity that remained largely underutilized during off-peak hours.
"We realized we weren't just paying for infrastructure; we were paying a premium for the AWS brand ecosystem. It was time to decouple our architecture from vendor lock-in."
---

Discovering the Alternative: Hetzner and Coolify

Our search for a more cost-effective solution led us to evaluate European cloud provider Hetzner. Known for providing high-performance bare-metal servers and Cloud VPS instances at a fraction of the cost of hyperscalers, Hetzner offered the raw hardware efficiency we required.

However, moving away from AWS meant losing the streamlined deployment pipelines that our developers relied on. We could not afford to replace cloud-native convenience with complex, manual SSH deployments and custom bash scripts. That is where Coolify entered the equation.

What is Coolify?

Coolify is an open-source, self-hosted Platform-as-a-Service (PaaS) that transforms raw servers into an intuitive deployment dashboard. It supports Docker, Git integrations, automatic SSL certificates via Let's Encrypt, and built-in database management. Essentially, Coolify provided us with the smooth developer experience of Vercel or Heroku, but hosted on our own dedicated Hetzner hardware.

---

Architecting the New Hetzner Cluster

Migrating a live production environment requires careful planning to prevent data loss and minimize downtime. We designed a multi-node cluster architecture on Hetzner to mirror the redundancy we previously had on AWS:

  1. The Main Orchestrator Node (Hetzner Cloud VPS): Dedicated solely to running the Coolify management dashboard and handling internal cluster telemetry.
  2. Worker Nodes (Hetzner Dedicated AX-Line Servers): High-performance, bare-metal servers equipped with AMD Ryzen processors and NVMe SSDs. These nodes run our production web applications, background workers, and API services via Docker Swarm/Coolify agents.
  3. Database Node: A dedicated instance optimized for high-I/O storage, running automated backup scripts to an offsite, S3-compatible cold storage provider.

By shifting to dedicated hardware, we were no longer sharing CPU threads with other cloud tenants. The immediate result was a dramatic improvement in raw processing speed and database query execution times.

---

Step-by-Step Migration Strategy

We executed the migration over a four-week period, following a strict risk-mitigation framework:

Phase 1: Environment Replication and Testing

We installed Coolify on our Hetzner orchestrator and connected our Git repositories. Coolify automatically detected our Dockerfiles and built the staging environments. We conducted rigorous load testing to ensure that the Hetzner hardware could handle traffic volumes equivalent to our peak AWS baselines.

Phase 2: Database Migration and Synchronization

Data integrity was our highest priority. We configured a read-replica on our new Hetzner database instance that continuously synchronized with our master Amazon RDS instance. This minimized data divergence and prepared us for a seamless cutover.

Phase 3: DNS Switch and Cutover

During a low-traffic maintenance window, we placed the AWS application into a temporary read-only mode, performed a final database synchronization, verified data parity, and updated our DNS records to point to our new Hetzner-backed Coolify cluster. Thanks to Coolify's automated reverse proxy handling, traffic was routed correctly within seconds.

---

The Financial and Operational Results

The outcomes of this migration surpassed our initial projections across every key metric. After running the new infrastructure for three consecutive months, our financial data confirmed a sustainably lower cost baseline.

1. Financial Breakdown (85% Cost Reduction)

Our monthly infrastructure expenditures dropped significantly. Below is a comparative look at our operational costs before and after the migration:

Infrastructure Component Previous AWS Cost (Monthly) New Hetzner + Coolify Cost (Monthly)
Compute / Containers (Fargate vs. Bare-Metal) $1,450 $220
Managed Database (RDS vs. Self-Hosted NVMe) $680 $90
Data Transfer & Networking $420 $20
Management Tooling (Coolify Open-Source) $0 $0
Total Monthly Spend $2,550 $330

2. Performance Gains

Because we transitioned from virtualized, multi-tenant cloud instances to dedicated, high-frequency physical hardware, our application response times improved. Average API latency dropped from 140ms on AWS to 45ms on Hetzner, largely due to faster database read/write speeds on the local NVMe drives.

3. Developer Experience Impact

A common concern was that losing AWS would hurt developer productivity. Coolify proved this concern unfounded. The developer workflow remained identical: pushing code to the main branch on GitHub automatically triggers a secure webhook, prompting Coolify to build and deploy the container with zero downtime.

---

Lessons Learned and Key Takeaways

While the financial benefits are undeniable, migrating away from a major cloud provider requires a realistic assessment of trade-offs. If your organization is considering a similar transition, keep these factors in mind:

  • You are responsible for your backups: On AWS, automated snapshots are a checkbox item. In a self-hosted environment, you must build, verify, and monitor your own automated backup pipelines to multi-region offsite storage.
  • Network topology takes effort: Setting up secure private networks between servers requires deliberate configuration within the Hetzner Robot console, whereas AWS handles this implicitly within VPC configurations.
  • The power of open-source: Utilizing modern tools like Coolify removes the traditional operational barriers of self-hosting, making infrastructure sovereignty a viable strategy for small-to-medium enterprises.

Conclusion

Hyperscale clouds like AWS are excellent choices for companies that require instant global scaling or niche machine learning services. However, for standard web applications, APIs, and microservices, the cloud premium is becoming harder to justify. By combining the cost efficiency of Hetzner hardware with the modern management capabilities of Coolify, we unlocked an 85% budget reduction while gaining superior hardware performance. It is a powerful reminder that with the right open-source tools, businesses can successfully reclaim control over their infrastructure and their bottom line.