Services About Us Why Choose Us Our Team Development Workflow Technology Stack Case Studies Portfolio Blog Free Guides Shopify Audit ($499) Estimate Project Contact Us
Back to Insights
Ruby on Rails • Nov 23, 2026 • 5 min read

Deploying Rails 8 on Hetzner Bare Metal with Kamal 2: $80/mo vs $800/mo AWS Breakdown

The modern Rails ecosystem has evolved past the false dichotomy of monolithic simplicity versus microservice complexity. With the release of Rails 8 and Kamal 2, teams can orchestrate containerized monolithic architec...

TV
TechVinta Team
Specialized in Rails, React, Marketplace & Sharetribe Flex Architecture
Verified Technical Guide
Deploying Rails 8 on Hetzner Bare Metal with Kamal 2: $80/mo vs $800/mo AWS Breakdown

Direct Answer: Running Rails 8 on Hetzner bare metal with Kamal 2 delivers AWS-grade performance for $80/mo instead of $800/mo. By bypassing managed cloud overhead like ECS, EKS, and multi-AZ RDS, teams eliminate data-transfer fees and database taxation, achieving predictable scaling, sub-millisecond I/O, and absolute data sovereignty.

The modern Rails ecosystem has evolved past the false dichotomy of monolithic simplicity versus microservice complexity. With the release of Rails 8 and Kamal 2, teams can orchestrate containerized monolithic architectures natively on bare-metal hardware. For growing SaaS products and enterprise ventures, the financial and architectural tax levied by hyperscalers like AWS is no longer justifiable. At TechVinta, our Principal Solutions Architects help high-growth startups migrate away from bloated cloud estates, reclaiming control over their infrastructure budgets and performance characteristics.

The Economics of Cloud Tax: Hetzner vs. AWS (2026 Breakdown)

When engineering teams architect infrastructure on AWS, they rarely account for the compound costs of managed services. An ostensibly simple production setup utilizing ECS Fargate, an Application Load Balancer, a multi-AZ Amazon RDS PostgreSQL instance, ElastiCache Redis, and NAT Gateways quickly accumulates overhead. Cross-AZ data transfer fees, EBS volume IOPS provisioning, and managed service markups push monthly bills toward the $800 threshold for workloads that barely strain their resources.

Hetzner Dedicated Root Servers alter this economic equation entirely. For approximately $80/mo, hardware such as the AX102 (AMD Ryzen 9 7950X, 128 GB DDR5 RAM, and dual 1.92 TB NVMe SSDs in RAID 1) provides raw compute power that outperforms mid-tier AWS EC2 instances costing four times as much. When paired with Kamal 2—Basecamp's zero-downtime deployment tool that pushes Docker containers directly to remote hosts over SSH—teams achieve a deployment experience rivaling Heroku or Render at a fraction of the cost.

Metric / Component Hetzner Bare Metal (Kamal 2 Stack) AWS Managed Stack (ECS/EKS + RDS)
Compute Infrastructure AMD Ryzen 9 7950X (16C/32T, 128GB DDR5) 4x c6i.xlarge (4 vCPU, 8GB RAM each)
Storage & Database Local NVMe RAID 1 (Self-hosted PostgreSQL + Redis) db.m6g.xlarge Multi-AZ RDS + Provisioned IOPS EBS
Base Monthly Cost $85.00 / month $795.00 / month
Data Transfer / Egress 20 TB included free, then €1.01 / TB ~$0.09 / GB ($90+ for 1TB egress)
Deployment Complexity Low (Kamal via SSH to Docker daemon) High (Terraform, IAM, VPC peering, ECS task definitions)
I/O Latency Profile < 0.2ms (Direct NVMe bus access) 1.5ms - 4.0ms (Network-attached EBS volumes)

Production Architecture: Rails 8, Kamal 2, and Hetzner Bare Metal

Deploying a production Rails 8 application via Kamal 2 on a single or clustered Hetzner setup relies on a clean separation of concerns. Traefik acts as the edge router and reverse proxy, handling automatic SSL termination via Let's Encrypt and routing traffic directly to containerized Puma application servers. PostgreSQL and Redis run as native Docker containers with persistent local NVMe volumes, backed up nightly to object storage (such as Hetzner Storage Box or Backblaze B2).

To configure Kamal 2 for a Hetzner deployment, your config/deploy.yml must be structured to target your dedicated server's IP address while managing accessories like Kamal-Proxy and Traefik seamlessly.


# config/deploy.yml
service: techvinta-core
image: registry.digitalocean.com/techvinta/core

servers:
  web:
    hosts:
      - 159.65.x.x
    options:
      pub: "443:80"
      volume:
        - "/var/lib/storage:/rails/storage"

proxy:
    ssl: true
    host: app.techvinta.com
    forward_headers: true

registry:
  server: registry.digitalocean.com
  username: 
    - KAMAL_REGISTRY_USERNAME
  password:
    - KAMAL_REGISTRY_PASSWORD

builder:
  arch: amd64

accessories:
  db:
    image: postgres:16-alpine
    host: 159.65.x.x
    port: 5432
    env:
      clear:
        POSTGRES_DB: core_production
      secret:
        - POSTGRES_PASSWORD
    files:
      - config/postgres/postgresql.conf:/etc/postgresql/postgresql.conf
    directories:
      - data:/var/lib/postgresql/data

  redis:
    image: redis:7.2-alpine
    host: 159.65.x.x
    port: 6379
    directories:
      - data:/data

Harnessing Rails 8 Native Capabilities on Bare Metal

Rails 8 is engineered for this exact infrastructure profile. Features like Solid Queue (database-backed active job processing), Solid Cache (database-backed caching layer), and Solid Cable (database-backed Action Cable adapter) eliminate the need for external service dependencies like Redis or RabbitMQ for standard queueing operations, drastically simplifying your Docker compose and Kamal accessory footprint.

When running on Hetzner bare metal, Solid Queue leverages the immense single-thread performance of modern AMD Ryzen or Intel Core processors. Database writes happen against NVMe drives boasting hundreds of thousands of IOPS without the network latency penalty of cloud-attached storage blocks. This architectural consolidation means a single $80/mo Hetzner node can comfortably handle thousands of requests per second, matching workloads that would require an intricate web of autoscaling groups on AWS.

Migration and Engineering Partnership with TechVinta

Transitioning mission-critical Ruby on Rails workloads from managed cloud providers to dedicated bare metal requires meticulous planning regarding zero-downtime database cutovers, backup verification, and secure SSH key management. TechVinta specializes in high-performance infrastructure engineering, modernizing legacy Rails applications, and building scalable SaaS platforms.

Our distributed team maintains a strict 4-6 hour US timezone overlap, enabling seamless daily syncs, rapid incident response, and transparent engineering collaboration. Whether you need an end-to-end cloud migration audit or full-stack architectural implementation, contact TechVinta to future-proof your infrastructure.

Frequently Asked Questions

Is a single Hetzner bare metal server a single point of failure (SPOF)?

Yes, a single dedicated server introduces a hardware SPOF. However, for applications scaling up to millions of requests, reliability is typically achieved through a multi-node Kamal cluster (e.g., two web nodes behind a load balancer and a dedicated database node) or automated nightly disaster recovery snapshots paired with fast-provisioning fallback scripts. Even a 3-node Hetzner cluster costs less than $250/mo, remaining a fraction of AWS pricing.

How does Kamal 2 handle zero-downtime deployments on bare metal?

Kamal 2 utilizes an internal accessory called Kamal-Proxy alongside Traefik. When you execute kamal deploy, Kamal pulls the new Docker image on the target host, spins up the new container version, health-checks it locally, and transparently shifts incoming traffic routing over to the new container before gracefully stopping the old container instance.

How are database backups and security handled outside of AWS RDS?

Database backups are managed via scheduled cron jobs running pg_dump compressed and encrypted via GPG, then shipped asynchronously offsite to an independent object storage provider like Hetzner Storage Box or Backblaze B2. Security is enforced via strict UFW firewall configurations, SSH key-only authentication, disabling root password logins, and keeping the host operating system updated via unattended upgrades.

⚡ Interactive Sizing Tool

Ruby on Rails 8 Upgrade Sizing & Cost Estimator

Estimate upgrade sprints, budget ranges at our senior US-aligned rate ($45/hr), and annual infrastructure savings with Solid Queue & Kamal 2.

Estimated Timeline
4–6 Weeks
2–3 Agile Sprints
Budget ($45/hr)
$7,200 – $11,500
Fixed-Price Milestones
Annual Cloud & Redis Savings: $4,800 / year
Dropping Redis for Solid Queue + migrating from Heroku to Kamal 2 on Hetzner/AWS bare-metal saves 60–80% monthly hosting overhead.
Zero-Downtime Guarantee: Dual-boot Gemfile strategy ensures your current Rails production app continues shipping features while Rails 8 branch is perfected.
Senior Rails & Sharetribe Architecture

Building, Scaling, or Modernizing Your Platform?

TechVinta delivers senior engineering ($35–$65/hr) with guaranteed 4–6 hours daily US EST/PST overlap. We specialize in custom Sharetribe Flex marketplaces, Ruby on Rails 8 modernizations, and high-throughput Stripe Connect integrations.

⚡
$35–$65/hr Transparent RatesDirect senior talent, no agency bloat
🇺🇸
4–6h Daily US OverlapLive EST/PST syncs & sprint reviews
🔒
100% Client IP & NDAEnterprise standards & clean code
Book a 15-Min Intro Call Get Free Project Sizing →
Share this article:
TV

Written by TechVinta Team

We are a full-stack development agency specializing in Ruby on Rails, React.js, Vue.js, Flutter, Shopify, and Sharetribe. We write about web development, DevOps, and building scalable applications.

Need Senior Developers?
$35–$65/hr · 4–6h US overlap

Keep Reading

TechVinta Assistant

Online - Ready to help

Hi there!

Need help with your project? We're online and ready to assist.

🍪

We use cookies for analytics to improve your experience. See our Cookie Policy.