Ruby on Rails VPS — Puma + PostgreSQL + Sidekiq

Ruby on Rails VPS — Production Rails
on Cloud VPS

Deploy Rails applications with Puma, Nginx, PostgreSQL, Redis, and Sidekiq on a dedicated Cloud VPS. Full root access, rbenv version management, and colocated services for maximum Rails performance.

Rails 7 Ready Puma + Nginx PostgreSQL + Redis Sidekiq Workers From $5/mo
Puma
Multi-Thread Server
Sidekiq
Background Jobs
PostgreSQL
Colocated
$5
Starting /mo
AMD Ryzen CPU
DDR5 RAM
NVMe SSD
10 Gbps Port
DDoS Protected
Full Root Access
35+ Locations
Instant Deploy
Why VPS?

Why Host Rails on a Cloud VPS?

Heroku is expensive at scale and sleeps free dynos. Railway and Render add cold starts. A Cloud VPS gives Rails always-on Puma threads, Sidekiq workers, ActionCable WebSockets, and full rbenv control.

Puma Multi-Threaded Server

Puma uses threads (not processes) for concurrency, making Rails more memory-efficient on a VPS. Configure thread counts to match your workload — more threads for I/O-bound apps, fewer for CPU-bound.

Sidekiq for Background Jobs

Sidekiq uses Redis to process background jobs (emails, notifications, data imports) asynchronously. Supervisor keeps Sidekiq workers running 24/7 — critical for Rails applications with job queues.

ActionCable WebSockets

Rails ActionCable requires persistent connections. A VPS provides the always-on Puma process that WebSocket connections require — PaaS platforms with sleeping dynos break WebSocket functionality.

PostgreSQL Rails Performance

ActiveRecord queries against a local PostgreSQL instance are dramatically faster than connecting to a remote database. N+1 query issues hurt less when database latency is sub-millisecond.

Recommended Stack

Recommended Tech Stack

The optimal software stack pre-configured for this use case on a Host4Fun Cloud VPS.

Ruby 3.2 (rbenv)
Version-managed Ruby
Puma
Multi-threaded Rails server
Nginx
Reverse proxy + assets
PostgreSQL 15
ActiveRecord database
Redis 7
Sidekiq broker + cache
Sidekiq
Background job processing
Let's Encrypt
Free SSL via Certbot
Capistrano (opt)
Zero-downtime deployments
Quick Deploy

Deploy in Minutes

Get up and running on a fresh Host4Fun Cloud VPS with these commands.

root@vps — quick deploy
# Install rbenv + Ruby (Ubuntu 22.04)
[root@vps ~]# apt update && apt install git curl libssl-dev libreadline-dev zlib1g-dev autoconf bison build-essential libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev postgresql redis-server nginx -y
[root@vps ~]# curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash && echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc && rbenv install 3.2.2 && rbenv global 3.2.2
[OK] Ruby 3.2.2 installed via rbenv

# Install Bundler and deploy Rails app
[root@vps ~]# gem install bundler && git clone https://github.com/you/rails-app.git && cd rails-app && bundle install
[root@vps ~/rails-app]# RAILS_ENV=production rails db:migrate && rails assets:precompile
[OK] DB migrated, assets compiled

# Start Puma (configure systemd for production)
[root@vps ~/rails-app]# RAILS_ENV=production bundle exec puma -C config/puma.rb
[OK] Rails app live at https://yourdomain.com
[root@vps ~]#
Why Host4Fun

Why Host4Fun Cloud VPS?

Everything that makes Host4Fun Cloud VPS the ideal infrastructure for your use case.

Puma Thread Configuration

Configure Puma's min/max thread count and worker processes to match your VPS resources. Rails 7 with Puma on 4 vCPUs handles hundreds of concurrent requests efficiently with proper thread pool sizing.

Sidekiq Job Processing

Sidekiq uses Redis queues and Ruby threads to process background jobs. Configure Sidekiq concurrency to match available Redis connections and CPU capacity. Monitor queue depths via Sidekiq Web UI.

ActiveRecord + PostgreSQL

Local PostgreSQL socket connection gives ActiveRecord sub-millisecond query latency. Rails' connection pooling (PgBouncer optional) efficiently manages database connections across Puma threads.

ActionCable WebSockets

Rails ActionCable works with Redis as the adapter for real-time features — notifications, chat, live updates. A VPS's persistent Puma process maintains WebSocket connections that PaaS dynos cannot sustain.

Fast Asset Pipeline

NVMe SSD speeds up asset precompilation and serving. Configure Nginx to serve precompiled assets directly with far-future cache headers — eliminating asset requests from hitting Rails.

rbenv Version Management

rbenv lets you install and switch between multiple Ruby versions on the same VPS. Pin your app to Ruby 3.2.x for stability while testing with 3.3.x — essential for managing Rails upgrades.

Comparison

VPS vs Alternatives

How a self-managed Host4Fun Cloud VPS compares to shared hosting and managed cloud services.

FeatureHost4Fun Cloud VPSHerokuRenderFly.io
Dyno/Container Sleep Always on free tier sleeps
Sidekiq Support extra dyno cost
ActionCable
Monthly Cost$5–$14/mo$25–$50+/mo$7–$20/mo$5–$20/mo
Use Cases

Who Uses This VPS?

Real use cases from developers, agencies, and businesses running on Host4Fun Cloud VPS.

Rails SaaS Applications

Production Rails SaaS products with multi-tenancy, Sidekiq job processing, and ActionCable real-time features. VPS gives you the always-on infrastructure SaaS products require.

E-Commerce with Rails

Rails-based stores (Solidus, Spree) need reliable PostgreSQL performance and Sidekiq for order confirmation emails and inventory updates. VPS delivers both colocated.

API-Only Rails

Rails API mode with PostgreSQL for high-performance JSON APIs. Puma's threading handles concurrent mobile/frontend requests efficiently without the overhead of server-side rendering.

Real-Time Rails Apps

ActionCable-powered chat, notifications, and live dashboards. Persistent WebSocket connections on a VPS Puma server — no cold starts or sleeping dynos breaking real-time features.

Learning Rails Deployment

Rails developers learning Capistrano, Puma configuration, Sidekiq setup, and Rails credentials management need a real VPS. $5/mo provides the full production Rails deployment experience.

Email-Heavy Applications

Sidekiq processes transactional email queues, digest emails, and notification jobs asynchronously. ActionMailer + Sidekiq + a local SMTP relay makes reliable email delivery straightforward.

Pricing

Choose Your VPS Plan

All plans include AMD Ryzen CPU, DDR5 RAM, NVMe SSD, 10 Gbps, DDoS protection, and dedicated IPv4.

Starter
 
$5/mo
 
  • 1 vCPU AMD Ryzen
  • 1 GB DDR5 RAM
  • 15 GB NVMe SSD
  • 1 TB Bandwidth
  • 10 Gbps Port
  • Full Root Access
  • DDoS Protection
Get Started
Basic
 
$7/mo
 
  • 2 vCPU AMD Ryzen
  • 2 GB DDR5 RAM
  • 30 GB NVMe SSD
  • 4 TB Bandwidth
  • 10 Gbps Port
  • Full Root Access
  • DDoS Protection
Get Started
Most Popular
Professional
Rails optimal — Puma + PostgreSQL + Sidekiq
$14/mo
 
  • 4 vCPU AMD Ryzen
  • 4 GB DDR5 RAM
  • 60 GB NVMe SSD
  • 8 TB Bandwidth
  • 10 Gbps Port
  • Full Root Access
  • DDoS Protection
Deploy Now
Business
 
$28/mo
 
  • 6 vCPU AMD Ryzen
  • 8 GB DDR5 RAM
  • 120 GB NVMe SSD
  • 16 TB Bandwidth
  • 10 Gbps Port
  • Full Root Access
  • DDoS Protection
Get Started

Annual billing charged as one payment. Prices exclude taxes.

FAQ

Frequently Asked Questions

The Professional plan ($14/mo, 4 vCPU, 4 GB DDR5 RAM) is optimal for Rails — handles Puma threads, PostgreSQL, Redis, and Sidekiq workers simultaneously. The Basic plan ($7/mo, 2 GB) suits smaller apps without Sidekiq.
Install Ruby via rbenv, PostgreSQL, Redis, Nginx, and Sidekiq dependencies. Clone your app, bundle install, run db:migrate and assets:precompile. Start Puma as a systemd service, configure Nginx to proxy to Puma's Unix socket, and use Supervisor for Sidekiq.
Puma is recommended for modern Rails. Puma uses threads for concurrency (more efficient memory-wise than Unicorn's process-per-worker model). Rails 7 is fully thread-safe. Use Puma with --workers for multi-process + thread hybrid mode on multi-core VPS.
Install Redis, add sidekiq gem, configure Sidekiq to use your Redis URL, create Supervisor config to run `bundle exec sidekiq -C config/sidekiq.yml`, and enable the Supervisor service. Sidekiq Web UI can be mounted in routes.rb for job monitoring.
Yes. Rails ActionCable over WebSockets works with Redis as the adapter. Configure `config/cable.yml` to use Redis, mount ActionCable in routes, and ensure Nginx is configured to proxy WebSocket upgrade headers to Puma.
A Rails app with Puma (5 threads) uses 200-400 MB RAM. With Sidekiq (10 concurrency) add another 200-300 MB. PostgreSQL and Redis use 50-200 MB each. The Professional plan (4 GB DDR5) comfortably handles a production Rails stack with room to spare.
Related Pages
Python VPSNode.js VPSDocker VPSDeveloper VPS

Deploy Your Ruby on Rails VPS Today

Puma + PostgreSQL + Sidekiq. Always-on Rails. ActionCable WebSockets. AMD Ryzen + NVMe SSD. From $5/mo.

Deploy Your VPS Now View All Plans