Rails hosting on AWS

Rails hosting on AWS, without the DevOps project

Hatchbox launches EC2 instances in your AWS account and turns them into production Rails servers — Ruby, Postgres, Redis, SSL, background workers, and git-push deploys with zero downtime. No Dockerfiles, task definitions, or Terraform.

Includes a 7 day free trial. $15 per server per month after that — unlimited apps.

Plenty of Rails apps end up on AWS — for the credits, for a compliance requirement, or because the rest of the company is already there. The servers aren't the hard part. Everything around them is: VPCs, security groups, AMIs, a deploy pipeline, and keeping Ubuntu patched. That's the part Hatchbox does.

Add an IAM access key to Hatchbox, pick a region and an instance type, and Hatchbox builds the network and the server: Ubuntu 26.04 LTS, the Ruby version from your repo, your database, Caddy for SSL, and deploys on every push. The instances are yours, so AWS bills you directly and your credits, Savings Plans, and Reserved Instances apply as usual. Hatchbox is $15 a month per server, no matter how many apps you run on it.

What Hatchbox sets up on AWS

A VPC, or yours

Hatchbox can create a VPC for each cluster with IPv4 and IPv6, an internet gateway, and a security group that allows SSH, HTTP, and HTTPS. Already have a network? Pick your own VPC and subnet instead.

Any current instance type

Hatchbox lists every current-generation instance type in your region, burstable t4g and t3 first. Graviton works just like x86 — Hatchbox picks the matching Ubuntu 26.04 LTS image published by Canonical.

IAM roles instead of keys

Attach an IAM instance profile to a cluster, and your app reaches S3, SES, or SQS through the AWS SDK with no access keys in its environment variables. Every server boots from an encrypted gp3 volume.

RDS, or Postgres on the instance

Run Postgres, MySQL, Redis, or SQLite on your instances at no extra cost, or point your app at RDS and ElastiCache with a connection URL. Start on the instance and move to RDS when the app earns it.

Backups to S3

Schedule database backups from the dashboard and upload them to an S3 bucket in your account — or to Cloudflare R2 or any other S3-compatible storage.

GovCloud, too

Connecting a GovCloud account works the same way: tick the GovCloud box, and Hatchbox uses GovCloud regions and Canonical's GovCloud Ubuntu images.

Hatchbox detects Rails from your Gemfile and handles the rest — see how a Rails deploy works.

What Rails hosting on AWS costs

Your total is the instance, its public IPv4 address, and its EBS volume, billed by AWS, plus $15 for Hatchbox. On-demand prices in us-east-1, verified September 2026. Every app you add to a server is free.

Monthly cost of common Rails setups on AWS with Hatchbox
Setup Instance EC2 IPv4 + storage Hatchbox Total / month
Side project or staging t4g.small — 2 vCPU / 2GB, 30GB gp3 $12.26 $6.05 $15.00 $33.31
Typical production app — web, worker, Postgres, Redis t4g.medium — 2 vCPU / 4GB, 50GB gp3 $24.53 $7.65 $15.00 $47.18
Busy background jobs or steady CPU load m7g.large — 2 vCPU / 8GB, 80GB gp3 $59.57 $10.05 $15.00 $84.62

Prefer RDS? A single-AZ db.t4g.small with 20GB of storage adds about $26 a month, and Multi-AZ roughly doubles it. A 1-year Compute Savings Plan takes about 28% off the t4g instance price.

Hatchbox vs AWS's own ways to run Rails

AWS gives you several ways to run a Rails app. Each one is a reasonable choice for someone.

Elastic Beanstalk

No extra charge, and its Ruby platform runs Puma on Amazon Linux. You still configure environments, platform hooks, and usually an Application Load Balancer ($16+/month), and the database, cron, and background workers are set up separately. Hatchbox handles those from one dashboard, on plain Ubuntu you can SSH into.

ECS on Fargate

Containers without servers to manage. You'll maintain a Dockerfile, an image registry, task definitions, and a load balancer, and Fargate bills by the vCPU-hour and GB-hour — about $29 a month for one 1 vCPU / 2GB task on Arm, before the load balancer. ECS Express Mode, which AWS now recommends over App Runner, sets up Fargate and a load balancer for you.

Lightsail

AWS's flat-priced servers: 2GB of memory with 3TB of transfer and an IPv4 address is $12 a month — less than a comparable EC2 instance, with far more transfer included. Create a Lightsail instance with Ubuntu LTS and Hatchbox can set it up as a custom server — the cheapest way to run Rails inside AWS.

EC2 with Hatchbox

Real instances in your VPC, set up for Rails: deploys, databases, cron, workers, SSL, and logs in one place, and several apps per server for the same $15. Your AWS discounts apply, and if you leave Hatchbox the instances keep running.

Things to know before you pick AWS

Bandwidth isn't included

The first 100GB of outbound traffic each month is free across your account, then it's $0.09/GB — serving 1TB a month costs about $81. A $24 DigitalOcean Droplet includes 4TB.

IPv4 addresses cost extra

AWS charges $0.005 an hour for every public IPv4 address, about $3.65 a month per server. It's small, but it's on every instance.

Burstable instances can surprise you

t4g and t3 instances run in unlimited mode by default. If CPU stays above the baseline all day, AWS bills surplus credits on top of the hourly price. Busy workers belong on an m7g or c7g instead.

Graviton is the better deal

A t4g.medium costs about 20% less than a t3.medium with the same memory. Most Rails apps run on Arm without changes, since common gems with native extensions build on arm64.

What customers say

I run 15+ Rails apps and static sites with Hatchbox. My bill went from $400/month on Heroku to $28/mo with Hatchbox & DigitalOcean combined.

Donn Felker

Software Professional

If you want the most bang for your buck, Hatchbox / Hetzner / DigitalOcean is the killer combo. You can throw sooo much at this and it's crazy how inexpensive it is.

Josh Pigford

Serial Entrepreneur

Applications deployed
24,000+
Deployments run
2 million+
Deploying since
2016

Read more customer stories

Rails on AWS questions

Still stuck? Ask us directly — a real person who has deployed a lot of Rails apps to AWS will answer.

Which EC2 instance should I use for a Rails app?

A t4g.medium (2 vCPU / 4GB) comfortably runs a typical Rails app with Puma, a Solid Queue or Sidekiq worker, Postgres, and Redis on one instance. A t4g.small is enough for staging. Move to an m7g when background jobs keep the CPU busy, so you're not paying for surplus burst credits.

How does Hatchbox connect to my AWS account?

With an access key for an IAM user that can manage EC2. Add the access key ID and secret to Hatchbox and pick a region. Our AWS setup guide walks through creating the IAM user.

Do my AWS credits and Savings Plans still apply?

Yes. The instances are in your AWS account and AWS bills you for them directly, so credits, Savings Plans, Reserved Instances, and any enterprise discount apply exactly as they would to instances you launched yourself.

Should I use RDS?

Use it when you want Multi-AZ failover and managed backups. Create the RDS instance in the same VPC, allow traffic from your servers' security group, and add its connection string to your app as DATABASE_URL. A single-AZ db.t4g.small with 20GB of storage is about $26/month.

Can I use Lightsail instead of EC2?

Yes. Create a Lightsail instance with Ubuntu LTS and add it to Hatchbox as a custom server with its IP address. You won't get Hatchbox's automatic VPC setup, but Lightsail's bundled pricing is hard to beat on AWS.

Is AWS more expensive than DigitalOcean or Hetzner?

Usually, yes — especially once bandwidth and IPv4 addresses are counted. A 2 vCPU / 4GB Droplet with 4TB of transfer is $24 a month. Teams choose AWS for credits, compliance, or to sit next to the rest of their infrastructure, and Hatchbox works the same way on all three; see Rails hosting on DigitalOcean.

What happens to my instances if I cancel Hatchbox?

Nothing. They're in your AWS account and keep running exactly as they are, with your apps, databases, and files. You just stop getting automated deploys and server management.

Simple, predictable pricing.

We charge per server, not per app. Run one application or twenty on the same box — the bill doesn't change.

Start free trial

$15

/server/mo
  • Unlimited applications
  • Deploy anywhere
  • Zero downtime deployments
  • Custom domains & free SSL
  • Databases, cron jobs & background workers
  • Full SSH access to your servers
  • Real, human support
  • 7 day free trial

Ready to deploy your Rails app?

Hatchbox has run more than 2 million deploys across 24,000+ applications since 2016. Start a 7 day free trial and put yours on a server you own.