Running Meteor


Meteor is a web framework written on top of Node.js. Meteor hooks into Passenger for seamless process launching and flexible, agile scalability. Meteor requires terminal access to use. This guide covers launching Meteor on a v6+ platform.


  1. PREREQUISITE: follow the MongoDB tutorial to setup MongoDB.
  2. Install Meteor from the terminal:
    • cd ~
      curl | sh
    • Once done, you’ll see a confirmation that it has been installed:
      Meteor has been installed in your home directory (~/.meteor).
      Writing a launcher script to /usr/local/bin/meteor for your convenience.
      To get started fast:
      $ meteor create ~/my_cool_app
      $ cd ~/my_cool_app
      $ meteor
    • Note: tempting as it may be, do not install the meteor package from npm. The package available is an unofficial fork and has not been removed by the repository custodian.
  3. Change directories to /var/www to create a new Meteor app that will, in this example, be called meteorapp and connected to a subdomain accessible via
    • cd /var/www
      meteor create meteorapp
  4. Next, connect public/ to a subdomain within the control panel via Web > Subdomains

    Connecting Meteor to a subdomain in the control panel

    Connecting Meteor to a subdomain in the control panel

  5. Now for the most difficult and daring step: adding 6 directives and substituting variables! Meteor requires a few environment variables to run reliably. These variables are handed off from Apache to Passenger and passed onto Meteor. You will need to know your home directory, because this location stores a few additional Meteor system files. Create a .htaccess control file in public/
    • PassengerNodejs /usr/bin/node
      PassengerStickySessions On
      SetEnv HOME /home/<USERNAME>
      SetEnv MONGO_URL mongodb://<PORT>/meteor
      SetEnv MONGO_OPLOG_URL mongodb://<PORT>/local
      SetEnv ROOT_URL http://<HOSTNAME>
    • Substitute <HOSTNAME> for your fully-qualified domain created within the control panel. In our example, taking into account the domain and subdomain meteorapp, it is
    • Substitute <PORT> for the MongoDB port chosen from the PREREQUISITE MongoDB tutorial at the start.
    • Substitute <USERNAME> for the username that you logged into the control panel with and where Meteor was installed. This is your home directory.
  6. Access your Meteor install through the web site. The first request will take several seconds to initialize and connect to the database. Once initialized, subsequent requests will be much faster (and have a 95% chance of vaporizing from exceeding terminal velocity).
  7. Enjoy!

    Meteor confirmation page on a basic install

    Meteor confirmation page after installation

Odds and Ends


Meteor piggybacks Passenger, and in doing so, can be easily restarted using the tmp/ control directory. Follow the general guide to restarting a Passenger-backed application.

See also

Leave a Reply