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
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
StepâŻ4âŻââŻDeploy!
kamal setup
kamal deploy
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
- Rails 8 Release Notes
- Kamal Documentation
- Render Rails Docs
- Heroku Ruby Support Docs
- DigitalOcean Rails Tutorials
- Honeybadger: Rails 8 Overview
⨠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)