Migrating from Passenger 4 to 5 (Standalone version)

Passenger 5 comes with many major improvements and is mostly compatible with Passenger 4. This section highlights important and incompatible changes.

APT repository changed to 5.0

Our main APT repository switched to Passenger 5. If there is a pressing need to remain on Passenger 4, use the legacy Passenger 4 APT repository.

Minimum Rails version: 2.3

We've dropped support for Rails version older than 2.3.

To make Rails 2.3 apps work with Passenger 5, the app must have a config.ru file. For example:

# Require your environment file to bootstrap Rails
require ::File.dirname(__FILE__) + '/config/environment'

# Serve static assets from RAILS_ROOT/public directory
# use Rails::Rack::Static
# Dispatch the request
run ActionController::Dispatcher.new

Restart mechanism changed

Using restart.txt to restart the app is still supported, but with the new default settings, Passenger won't notice any changes until after max 10 seconds. We recommend using the passenger-config restart-app command.

If you want to revert to the old restart.txt behavior (where any change is noticed immediately on the next request), set passenger_stat_throttle_rate (using the Nginx configuration template) to 0.

Feature and configuration changes

  • If you use out-of-band garbage collection, beware that the X-Passenger-Request-OOB-Work header has now been renamed to !~Request-OOB-Work.
  • When using Rack's full socket hijacking, you must now output an HTTP status line.
  • The Nginx configuration template has changed. Users are encouraged to update it.
  • passenger-standalone.json has been renamed to Passengerfile.json.
  • passenger-standalone.json/Passengerfile.json no longer overrides command line options. Instead, command line options now have the highest priority.