Demonstration of WebSockets on Phusion Passenger
Switch branches/tags
Nothing to show

WebSockets on Phusion Passenger

This application demonstrates WebSocket support in Phusion Passenger. Passenger supports all major modern web technologies, such as WebSockets, entirely out of the box. You don't have to do anything: WebSocket support just works.

If you like this demo, please tweet about it or follow us on Twitter.

More information about Passenger:

Getting started

Clone this repository, install the gem bundle and start Passenger Standalone.

git clone
cd passenger-ruby-websocket-demo
bundle install
bundle exec passenger start

Access the demo application at and see it in action.

If you deploy this demo to production, be sure to enable sticky sessions in Passenger.


  • This app uses plain Rack, and thus is framework agnostic.
  • WebSockets work on Passenger for Nginx and Passenger Standalone. Apache is currently not supported.
  • At least version 5.0.25 of Passenger is required.
  • Only the RFC 6455 version of the WebSocket protocol is supported.

Tuning Passenger for WebSockets

WebSockets work great on both the open source variant of Phusion Passenger, as well as on Phusion Passenger Enterprise. But you need to tune a few settings. Please refer to the following places in the Passenger Library for more information:

This demo already contains tuning parameters for Passenger Standalone inside Passengerfile.json.

Next steps

Please enjoy Phusion Passenger, a product by Phusion. :-)