For Rails
Rails on real VMs, no platform tax
Free to sign up. No egress fees on any product.
Why Rails on Edge
Linux and a VM were right all along
Puma or Falcon on real VMs
Run any Rack server (Puma, Falcon, Iodine) on a VM sized to fit. Boring, predictable and quick.Active Storage on S3
Configure the S3 service with the Edge endpoint. Direct uploads, variants and public URLs work unchanged.Postgres or MySQL alongside
Run the database as a Kamal accessory, on a separate VM over a free private network, or with your managed provider.Variants without the worker
Serve blobs through the CDN and ask for ?width=640&format=auto. No libvips on the request path, no variant records to track.Global CDN, zero egress
Propshaft assets and public blobs cache in 988 locations. Everything users download is free on the way out.Kamal or Capistrano
Keep the deploy workflow you like: Kamal, Capistrano or plain SSH. The Edge CLI provisions the VMs underneath.
Reference architecture
How Rails maps to Edge
Browsers
app.acme.co via Edge DNS
app.acme.co
caches /assets and public blobs
?width=640&format=auto
variants made at the edge
puma :3000
Docker via Kamal · s-4vcpu-8gb
postgres :5432
Kamal accessory on the same VM
acme-blobs
Active Storage :edge service
- Compute
Runs Puma (or Falcon) in Docker behind kamal-proxy, plus jobs and Postgres.
- Storage
Holds Active Storage uploads through the S3 service.
- CDN
Caches the asset pipeline output and public blob URLs.
- Image optimisation
Generates image variants on request, with no processing in Rails.
- DNS
Anycast DNS for the apex, www and email records.
- Shield
Guards Devise logins and signups against credential stuffing.
- Assist
One line in application.html.erb adds grounded answers to every page.
Deploy
From rails new to live in four steps
- 01
Create a VM
The hardened-ssh script turns off password logins and enables fail2ban and UFW. Kamal installs Docker itself on the first run.
shell$ edge compute create --name rails --size s-4vcpu-8gb \ --image ubuntu-24 --region london --script hardened-ssh - 02
Put Active Storage on Edge Storage
Then set config.active_storage.service = :edge in production.rb.
config/storage.ymledge: service: S3 endpoint: https://storage.edge.network access_key_id: <%= ENV["EDGE_ACCESS_KEY"] %> secret_access_key: <%= ENV["EDGE_SECRET_KEY"] %> region: us-east-1 bucket: acme-blobs force_path_style: true - 03
Point Kamal at the VM
Postgres runs as an accessory on the same VM. Move it to its own VM later by changing one host.
config/deploy.ymlservice: acme image: acme/app servers: web: - <vm-ip> proxy: host: app.acme.co registry: server: ghcr.io username: acme password: - KAMAL_REGISTRY_PASSWORD builder: arch: amd64 env: secret: - RAILS_MASTER_KEY - EDGE_ACCESS_KEY - EDGE_SECRET_KEY accessories: db: image: postgres:16 host: <vm-ip> port: "127.0.0.1:5432:5432" env: secret: - POSTGRES_PASSWORD directories: - data:/var/lib/postgresql/data - 04
Deploy and front it with the CDN
kamal setup prepares the server and boots accessories once. After that, every release is kamal deploy.
shell$ kamal setup $ kamal deploy $ edge cdn create --name acme $ edge cdn domains add cdn-0f4b7a \ --domain app.acme.co \ --origin https://<vm-ip> \ --jit-image
Prefer to hand it off? Give the job to your AI agent or have our engineers do it.
What it costs
A monolith-sized bill
- No dynos, add-ons or per-seat charges
- Zero egress on blobs and assets
- Image variants included with the CDN
- Billed hourly from a prepaid balance, with optional hard caps
Estimated monthly bill on Edge
Rails monolith · 5.5M requests a month · 35 GB of blobs
- Compute$38.47Performance VM · 4 vCPU · 8 GiB · 160 GB NVMe
- CDN$1.255.5M requests: first 500k free, 5M × $0.25 per million
- Storage$0.4535 GB of blobs: first 5 GB free, 30 GB × $0.015
- DNS$0.00Zone, apex, www and email records
- Egress$0.00
FAQ
Rails on Edge, answered
Does Kamal work on Edge?
Can I keep Capistrano?
How does Active Storage connect?
Where do background jobs run?
Can I run in more than one region?
Drop-in services
Add these without touching the stack
- Edge ShieldBot protection
POST /siteverify → score: 94A before_action guards Devise logins and signups against credential stuffing. Free, with no puzzle.
Free for most sites. No puzzles, no widget to style.Explore - Edge AssistAI answers
<script src="…/assist.js">One line in application.html.erb puts grounded answers on every page.
Free tier: 250 answered questions a monthExplore
Ship Rails on Edge
Bring your rails new or your ten-year-old monolith. Both deploy the same way.
Free tiers hard-cap. Nothing bills until you add a card.