๐Ÿš€

Rails App Deployment SaaS Comparison

Practical comparison of Fly.io, Render, DigitalOcean, Fargate, Railway, Heroku

The biggest question when first deploying a Rails app is "where should I host it?". After Heroku removed its free tier, alternatives like Fly.io, Render, and Railway have rapidly gained popularity.

Comparison Criteria: "Where can a solo/small team deploy a Rails 8 + SQLite project fastest, cheapest, and most reliably?"

Service Min Cost Docker SQLite Persistent Volume Rails 8 Fit Best For
Fly.io ~$5/mo Yes Yes (volume) Yes High (official) MVP โ†’ Prod
Render Free tier Yes Limited (no persistent disk free) Paid only Medium MVP
DigitalOcean $4-6/mo Yes (manual) Yes (local disk) Yes (local SSD) High (most freedom) Production
Railway Usage-based Yes Limited Limited Medium Quick prototyping
Heroku $7/mo+ Yes No (ephemeral FS) No Low (PostgreSQL forced) Legacy

โš ๏ธ Fly.io + SQLite + Solid Queue = "database is locked"

Running Rails 8 SQLite + Solid Queue on Fly.io causes frequent "SQLite3::BusyException: database is locked" errors โ€” rarely occurring on DigitalOcean with identical setup.

Why Fly.io is worse: (1) Fly.io volume I/O latency is higher than DO's local SSD โ†’ locks held longer, (2) Solid Queue + web sharing same DB file, (3) WAL mode or busy_timeout may be insufficient.

Fix: Increase busy_timeout to 10000ms, separate DB files for queue/cache/cable. If issues persist, DigitalOcean + Kamal is more stable for SQLite.

Architecture Diagram

Deployment Difficulty Ranking (Easy โ†’ Hard)
Easy
Heroku Render Railway
Deploy with just git push. No infra knowledge needed
Medium
Fly.io DigitalOcean App Platform
Dockerfile understanding needed. CLI-based config
Advanced
Kamal + VPS AWS Fargate
Full understanding of Docker, networking, SSL required
Price vs Control Matrix
โ†‘ Full Control
Low Cost + High Control
Kamal + Hetzner
~$5/mo, full SSH access
High Cost + High Control
AWS Fargate
$30+/mo, enterprise-grade
Low Cost + Low Control
Render Free
Railway Free
$0, limited resources
Medium Cost + Low Control
Heroku
DigitalOcean
$7~25/mo, PaaS managed
โ† Low Cost โ†“ Low Control High Cost โ†’
Rails Deploy Flow (Simplified)
๐Ÿ“
Code
๐Ÿณ
Dockerfile
๐Ÿ”จ
Build Image
๐Ÿ“ฆ
Push to Registry
๐Ÿš€
Deploy to Platform
๐Ÿ”’
Domain + SSL
๐ŸŒ
Live!
* PaaS (Heroku, Render, etc.) automates this process
Recommendation Quick Guide
Side Project
Fly.io Railway
- Free or under $5/mo
- Great for quick prototyping
- Just need a Dockerfile
Startup
Render Fly.io
- $7~25/mo
- Managed DB, auto SSL
- Team collaboration supported
Production
Kamal + Hetzner Kamal + DO
- $5~20/mo (VPS cost only)
- Full SSH access, complete control
- Rails 8 official deploy tool
Key Points
Kamal is the default deploy tool since Rails 8 -- automates docker build + SSH deploy
PaaS is convenient but costs scale quickly -- consider VPS switch when traffic grows
Free plans have cold start delays -- not suitable for production

Key Points

1

Write Dockerfile (auto-generated in Rails 7.1+)

2

Configure environment variables (DATABASE_URL, SECRET_KEY_BASE, RAILS_MASTER_KEY)

3

Set up PostgreSQL/SQLite database

4

Asset precompile + image build

5

Deploy to PaaS (git push or Docker push)

6

Custom domain + SSL configuration

7

Monitoring + log verification

Use Cases

Quick deployment for side projects Minimum-cost deployment for MVP validation Staging environment for team projects Production service operations