Skip to content

For Rails

Rails on real VMs, no platform tax

Puma on a VM you control, Active Storage on an S3-compatible bucket, and assets cached in 988 locations. Keep Kamal or Capistrano. We supply the machines and the network.

Free to sign up. No egress fees on any product.

Why Rails on Edge

Linux and a VM were right all along

Rails runs best on a plain server you understand. We add the global CDN and S3 storage that make it sing.
  • 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

Puma behind kamal-proxy, Postgres and jobs alongside, Active Storage in a bucket and the CDN in front.
  • 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

Rails 8 ships with a Dockerfile and Kamal config. Give Kamal an Edge VM and it does the rest.
  1. 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
  2. 02

    Put Active Storage on Edge Storage

    Then set config.active_storage.service = :edge in production.rb.

    config/storage.yml
    edge:
      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
  3. 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.yml
    service: 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
  4. 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

One Performance VM runs Puma, jobs and Postgres with room to breathe. Blobs live in a bucket and the CDN carries the bytes.
  • 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
See compute pricing

Estimated monthly bill on Edge

Rails monolith · 5.5M requests a month · 35 GB of blobs

USD
  • 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
Total$40.17

FAQ

Rails on Edge, answered

Something else? Ask an engineer.
Does Kamal work on Edge?
Yes. Kamal deploys to any server it can reach over SSH. Create the VM with the Edge CLI, put its IP in config/deploy.yml and run kamal setup. Docker and kamal-proxy are installed for you.
Can I keep Capistrano?
Yes. Create the VM, install Ruby and Puma as you would on any Ubuntu server, and point deploy/production.rb at its IP. Nothing about Capistrano changes.
How does Active Storage connect?
Through the standard S3 service with endpoint https://storage.edge.network and force_path_style: true. Direct uploads, variants and public URLs work as documented.
Where do background jobs run?
Solid Queue can run inside Puma on the same VM. For Sidekiq or GoodJob, add a job role or a Redis accessory in Kamal, or move workers to their own VM when volume grows.
Can I run in more than one region?
Yes. Edge Compute runs in London and Miami. Put a VM in each and use geographic routing in Edge DNS to send visitors to the nearest one. The CDN serves assets from every location either way.

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.