How to Deploy a Ruby on Rails App with Serverfy
Back to Articles
Tutorials

How to Deploy a Ruby on Rails App with Serverfy

M

Matheus

Technical Content @ Serverfy

Rails Without the Capistrano Complexity

Capistrano has been the standard for Rails deployment for years, but its configuration is complex and error-prone. With Serverfy, you get zero-downtime atomic deployments without writing a single deploy script.

Your Rails Production Stack

ComponentWhat Serverfy Provides
App ServerPuma with worker/thread management
Reverse ProxyNginx with asset serving
DatabasePostgreSQL with automated backups
Background JobsSidekiq as managed daemon
SSLAuto-provisioned Let's Encrypt
DeploymentsAtomic, zero-downtime with rollback
MonitoringServer metrics + configurable alerts

Deployment Flow

1. Provision & Configure

Provision a server with Ruby, Node.js (for asset compilation), PostgreSQL, and Redis. Serverfy sets everything up automatically.

2. Connect Your Repo

Link your GitHub/GitLab/Bitbucket repo and set your deploy script:

bundle install --deployment --without development test
RAILS_ENV=production bundle exec rails assets:precompile
RAILS_ENV=production bundle exec rails db:migrate

3. Push & Deploy

Push to your main branch. Serverfy creates a new release directory, runs your deploy script, health-checks Puma, and switches traffic atomically. If anything fails, it rolls back automatically.

Sidekiq Workers

Configure Sidekiq as a managed process through Serverfy. It starts on boot, restarts on failures, and scales with your server resources.

Why Not Heroku?

FeatureHerokuServerfy
PricingPer-dyno ($25+/mo each)Flat monthly + cheap VPS
Worker ProcessesSeparate dyno ($25+/mo)Same server, no extra cost
DatabaseHeroku Postgres ($50+/mo)PostgreSQL on server (included)
MonitoringAdd-on ($$$)Built-in
Status PagesNot includedBuilt-in

Ready to Deploy Rails?

Leave Capistrano configs and expensive PaaS bills behind. Deploy Rails with Serverfy — Puma, PostgreSQL, Sidekiq, and zero-downtime included.