About Passenger and Meteor support

This page contains general information about Passenger and its Meteor support.

Why Meteor app packages?

If you have followed the Basics tutorial or the Deployment tutorial, then you have noticed that we recommend you to create a packaged version of your Meteor app. What is a Meteor package, and why does Passenger prefer a Meteor package in production?

Differences between non-packaged and packaged

During development, Meteor app directory only contains your application code and resources. On your development workstation, you already have the Meteor runtime installed. This Meteor runtime not only contains Meteor core library code, but also development tools for e.g. managing MongoDB.

A packaged Meteor app contains the Meteor runtime and various other necessary things for running a Meteor app in production. A packaged Meteor app is a normal Node.js application, plus a copy of the Meteor runtime. A packaged Meteor app also does not run MongoDB for you. Instead, it expects that MongoDB is already installed, and that you tell it where MongoDB is.

Why you should use app packages in production

Passenger can run Meteor apps both in non-packaged and packaged form. However, we recommend using app packages in production for the following reasons:

  • Running Meteor applications in production as packaged apps is the officially recommended way by MDG - "Never use --production flag to deploy!", creator of Meteor.
  • You do not have to install the Meteor runtime in the production environment, you only need Node.js and MongoDB.
  • Many Passenger production-grade features, such as multi-process management, load balancing, etc. only work properly if you run the application as multiple processes. However, Passenger can only run your Meteor app with multiple processes if it is in packaged form. In non-packaged form, the various processes conflict with each other because they all try to start MongoDB.
  • Packaged apps use fewer resources because they do not have to load the Meteor development tools.

It is safe to deploy Meteor apps in unpackaged form, as long as you do not use multiple processes.