DEV Community

Cover image for 🚀 Why Rails 8’s New Deployment Model Is a Game-Changer
Brian Kim
Brian Kim

Posted on

🚀 Why Rails 8’s New Deployment Model Is a Game-Changer

Rails 8 Deployment Deep Dive: Render vs Heroku vs Kamal (Self‑Hosting)

🧩 Introduction

Ruby on Rails 8.0 (released November 2024) introduced a revolution in web app deployment — giving developers the freedom to host, manage, and scale their apps independently using Kamal 2, while still supporting modern PaaS (Platform‑as‑a‑Service) options like Render and Heroku.

This educational guide compares these three major deployment strategies:

  • 🟣 Heroku — the classic PaaS for simplicity
  • 🟢 Render — modern, cost‑efficient PaaS alternative
  • 🔵 Kamal 2 (Rails 8 default) — self‑hosted DevOps automation

You’ll learn how each model works, how much it costs, their pros and cons, and when each makes sense depending on your goals and technical level.


⚙️ 1. Rails 8: Why Deployment Has Changed

Rails 8 modernizes the deployment experience. It’s designed so that one developer can run production Rails apps without external services.

🔑 Key New Technologies

Feature Purpose Benefit
Kamal 2 Built‑in deploy automation (Docker + SSH + SSL) Replaces Heroku’s infrastructure layer
Solid Queue Background job processor using the database Removes need for Redis/Sidekiq
Solid Cache File or DB‑based caching system No Memcached/Redis required
Solid Cable In‑app pub/sub for ActionCable Simplifies real‑time features
Propshaft Modern, fast asset pipeline Simplifies asset compilation
Thruster Proxy Built‑in proxy and HTTP/2 server Removes need for Nginx

These updates make self‑hosting Rails apps realistic and affordable, especially for indie developers and small startups.


☁️ 2. Platform‑as‑a‑Service (PaaS) Overview

What is a PaaS?

A Platform‑as‑a‑Service abstracts the deployment process. You upload your code, and the platform handles servers, scaling, security, SSL, and databases.

Common PaaS options for Rails include:

  • Heroku (est. 2011, Salesforce‑owned)
  • Render (founded 2018, a Heroku‑style modern platform)
  • Fly.io, Railway, etc. (smaller players)

🟣 3. Heroku — The Original Rails PaaS

🧠 Concept

Heroku was built specifically for Rails. You push code via Git, and it builds, deploys, and runs your app automatically.

✅ Pros

  • Zero setup — deploy in minutes
  • Built‑in SSL, routing, scaling, metrics
  • Add‑ons marketplace (Postgres, Redis, SendGrid)
  • Great for teaching, demos, and prototypes

❌ Cons

  • High cost per dyno (web process)
  • Limited performance tuning
  • Vendor lock‑in (proprietary runtime)
  • Sleeping dynos on free plans (now discontinued)

💸 Typical Heroku Pricing (2025)

Resource Price
Hobby dyno (1 app) $7/mo
Standard dyno $25/mo
Postgres basic plan $9/mo
Redis add‑on $5/mo
Worker dyno (jobs) $10/mo

➡️ Total for a small production app: ~$40–$60/month


🟢 4. Render — The Modernized Alternative

🧠 Concept

Render provides a Heroku‑like workflow but on cheaper, modern infrastructure (Docker containers, persistent storage, and free SSL).

✅ Pros

  • Lower prices than Heroku
  • Persistent disks (unlike Heroku’s ephemeral filesystem)
  • Free SSL + continuous deployment from GitHub
  • Faster builds using Docker images

❌ Cons

  • Slightly slower cold starts
  • Fewer “add‑ons” than Heroku
  • Some manual tuning required for performance
  • Background jobs require a separate service (or multiple instances)

💸 Typical Render Pricing

Resource Price
Web service (512 MB) Free (limited hours)
Starter web (1 GB) $7/mo
PostgreSQL DB $7/mo
Redis instance $5/mo
Worker service $7/mo

➡️ Total small app cost: ~$20–$30/month

Render is an excellent middle ground — affordable and simple, but with modern infrastructure flexibility.


🔵 5. Kamal 2 — Rails 8’s Self‑Hosting Revolution

🧠 Concept

Kamal 2 (formerly “MRSK”) is a deployment system that lets you host your Rails app on your own server (e.g. DigitalOcean, Hetzner, Linode, AWS EC2).

You control the infrastructure, but Kamal automates all the hard parts:

  • Docker image creation
  • SSL certificates (Let’s Encrypt)
  • Reverse proxy setup
  • Rolling deploys and restarts

✅ Pros

  • Extremely cheap — as low as $5/month for a VPS
  • No external dependencies (Solid Queue replaces Redis)
  • Educational — you learn DevOps fundamentals
  • Complete control — configure caching, jobs, or scaling as needed
  • Offline independence — not tied to any vendor

❌ Cons

  • You maintain the server (security, updates, backups)
  • Requires some Linux & Docker knowledge
  • No auto‑scaling (manual configuration for multiple servers)

💸 Typical Kamal Self‑Hosting Cost

Provider Plan Price Notes
DigitalOcean 1 vCPU / 1 GB RAM $5 Perfect for small apps
Hetzner 2 vCPU / 2 GB RAM $7 High performance per dollar
Linode 2 GB / 1 vCPU $10 Reliable US option
AWS EC2 t3.micro $9 Free tier for 1 year

➡️ Total cost: ~$5–$10/month


🧮 6. Cost Comparison

Feature / Resource Heroku Render Kamal 2 (Self‑Host)
App Hosting $25 $7 $5
Background Jobs $10 $7 $0 (Solid Queue)
Caching $5 $5 $0 (Solid Cache)
SSL / HTTPS Free Free Free (Let’s Encrypt)
Custom Domains Free Free Free
Storage Ephemeral Persistent Persistent
Monthly Total ≈ $45–$60 ≈ $20–$30 ≈ $5–$10

💡 Savings: Kamal 2 can save $400+ per year while giving you full infrastructure ownership.


🛠️ 7. How to Deploy with Kamal 2 (Educational Walkthrough)

Step 1 – Provision a VPS

Create a Linux server on DigitalOcean, Linode, or Hetzner.

Ensure ports 22 (SSH), 80 (HTTP), and 443 (HTTPS) are open.

Step 2 – Install Kamal

gem install kamal
kamal init
Enter fullscreen mode Exit fullscreen mode

This creates a config/deploy.yml file.

Step 3 – Configure Deploy File

service: myapp
image: myapp
servers:
  web:
    - 192.168.1.100
registry:
  username: brian
  password: <%= ENV["REGISTRY_PASSWORD"] %>
env:
  clear:
    RAILS_ENV: production
Enter fullscreen mode Exit fullscreen mode

Step 4 – Deploy!

kamal setup
kamal deploy
Enter fullscreen mode Exit fullscreen mode

Kamal builds a Docker image, pushes it to your server, configures SSL via Let’s Encrypt, and starts your app 24/7.


⚖️ 8. Trade‑Off Summary

Category Heroku Render Kamal 2
Setup Speed 🚀 Fastest ⚡ Very Fast 🧰 Moderate
Cost 💸 High 💵 Medium 💎 Low
Control 🔒 Limited 🔒 Partial 🔓 Full
Scaling Auto Manual/Auto Manual
Maintenance Provider Provider You
Learning Value 💤 Low 🧠 Medium 🎓 High
Suitable For MVPs, teaching Startups, indie apps Developers who want full control

🧭 9. Choosing the Right Path

Scenario Best Option
Just learning Rails Heroku
Building MVPs with low cost Render
Running production apps you own Kamal 2
Startup founder or indie dev Kamal 2
Corporate project Render or Kamal 2 hybrid

🧠 10. Educational Takeaways

  • Heroku taught the world how easy Rails deployment could be.
  • Render made it cheaper and more flexible.
  • Rails 8 + Kamal 2 make it yours — one developer, one VPS, one command.
  • Self‑hosting now requires less infrastructure knowledge than ever.
  • Understanding all three makes you a well‑rounded software engineer.

📘 11. Resources


✨ Final Thoughts

Rails 8 changes the game — it brings deployment full circle.

Developers no longer have to rely solely on large platforms to run production‑grade apps.

Whether you choose Heroku, Render, or Kamal, you now have the power to pick the level of control, cost, and learning that fits you.


Top comments (0)