Ruby on Rails hosting runs Rails applications in production with the right Ruby version, an application server, a database, background job processing and asset compilation. Rails makes development fast, and the hosting should make deployments equally predictable. A VPS gives you full control over the stack and the resources to run Rails reliably as your application grows.
The typical Rails production stack
Rails applications run on Puma behind Nginx or Caddy, with PostgreSQL or MySQL as the database. Background jobs run with Sidekiq on Redis or with Solid Queue on the database in newer Rails versions. Assets are precompiled during deployment. Kamal, the deployment tool from the Rails team, uses Docker to deploy applications to any server with zero downtime, while Capistrano remains popular for non-container deployments.
- Puma application server with multiple workers
- PostgreSQL or MySQL database
- Sidekiq or Solid Queue for background jobs
- Kamal or Capistrano for deployments
- Nginx or Caddy for TLS and static files
Managing Ruby versions and gems
Install Ruby with a version manager such as rbenv, asdf or mise, matching the version in your .ruby-version file. Bundler installs gems from Gemfile.lock for consistent environments. With Docker-based deployments, the Ruby version is defined in the Dockerfile, which simplifies upgrades and keeps servers clean.
Performance tuning
Rails memory usage grows with the number of Puma workers and threads, so size RAM accordingly. Enable YJIT in recent Ruby versions for faster execution. Use eager loading to avoid N+1 queries, add database indexes and cache fragments with Redis or Solid Cache. Monitor memory over time, and restart workers if leaks appear in long-running processes.
Security and maintenance
Keep Rails and gems updated, run bundle audit to catch vulnerable dependencies and store credentials with Rails encrypted credentials or environment variables. Force SSL in production, protect the admin area and back up the database and uploaded files regularly. Plan Rails major upgrades one version at a time, fixing deprecation warnings before moving on.
Choosing a VPS
Small Rails apps run on a VPS with a few gigabytes of RAM. Applications with Sidekiq, many users or heavy processing need more memory and CPU. Compare RAM, CPU, storage and bandwidth in the VPS plans below.