NGINX Ruby

NGINX Ruby

The NGINX Ruby stack combines the open-source NGINX web server with a preinstalled Ruby runtime. It uses Passenger by default and can be reconfigured to run Puma or Unicorn.

NGINX Ruby Overview

NGINX Ruby is suitable for Ruby applications that require scalability, security, reliability, and cost-efficient resource use. The stack can be provisioned through the environment topology wizard in a few steps.

NGINXHandles incoming HTTP traffic and static content.
RubyProvides the language runtime for Rails, Rack, and other Ruby applications.
PassengerDefault application-server module for newly created NGINX Ruby environments.
PumaOptional Ruby server focused on speed and parallel request processing.
UnicornOptional server designed for low-latency and high-bandwidth Unix environments.
i

Initialization system

The NGINX Ruby template uses the modern systemd initialization daemon.

HTTP/3 Support

The NGINX Ruby stack is HTTP/3-ready with support enabled by default from NGINX 1.16.1 for Ruby 2.4.9, 2.5.7, 2.6.5, 2.7.0, and later supported releases.

!

Public IP required

A public IP address is required for direct HTTP/3 access because the platform Shared Load Balancer must be bypassed.

Create an NGINX Ruby Environment

1

Open the environment wizard

Click New Environment in the upper-left part of the platform dashboard.

Open the New Environment wizard
Open the environment topology wizard from the dashboard.
2

Select NGINX Ruby

Open the Ruby tab and choose NGINX Ruby as the application server. Add any other software stacks required by the application.

Select NGINX Ruby in the topology wizard
Select NGINX Ruby and add any database, cache, or supporting stacks.
3

Configure the environment

Select the Ruby engine version and adjust the resource limit, node count, public IP addresses, region, environment name, and other required settings.

4

Create the environment

Click Create. The NGINX Ruby environment is provisioned and displayed in the dashboard.

Verify the Environment

After provisioning completes, confirm that the NGINX Ruby layer is running in the dashboard. The environment is then ready for Ruby application deployment.

NGINX Ruby environment in the dashboard
The created NGINX Ruby environment is ready for application deployment.

Application-Server Modules

Passenger is enabled by default. The NGINX Ruby configuration can be changed to use Puma or Unicorn when another processing model is better suited to the application.

PassengerDefault option for newly created environments and a common choice for Rails applications.
PumaSuitable for applications that benefit from threaded and parallel request processing.
UnicornSuitable for prefork-based workloads on Unix-like systems.

Module switching

Only one application-server module should be enabled in the NGINX configuration at a time. Enabling several modules can cause compatibility errors.

Expected Result

A managed NGINX Ruby environment is created with the selected Ruby version, resource limits, node count, networking, and supporting stacks. Passenger is enabled by default, and the server is ready for Ruby application deployment.

Important Notes

  • A public IP is required for direct HTTP/3 access.
  • Passenger is the default NGINX Ruby application-server module.
  • Puma and Unicorn are available as alternative modules.
  • Only one application-server module should be active at a time.
  • Check the current Ruby and NGINX versions before production deployment.
  • Use the deployment guide to upload an archive or connect a version-control repository.

Common Issues and Solutions

NGINX Ruby is not listedCheck the Ruby tab and the hosting provider’s current software-stack availability.
HTTP/3 does not workAttach a public IP and confirm that traffic connects directly to the NGINX Ruby server.
Environment creation failsReview account limits, resource settings, region availability, and the environment task log.
Application server conflicts occurConfirm that only one of Passenger, Puma, or Unicorn is enabled.
Application does not startReview the Ruby version, dependencies, application-server configuration, deployment logs, and NGINX logs.