Welcome, Guest Login

Public Cloud Center

Getting Started with Meteor on Xervo

Last Updated: Mar 14, 2017 05:12PM EDT

Xervo provides direct deployment of Meteor applications through the use of the Xervo command line interface. This guide will demonstrate how to properly deploy your Meteor application to the Xervo platform.

Note: using the Meteor project type requires that you use Xervo CLI version 7.1.x or above, install the latest version by running $ npm install -g @xervo/cli

Note on Meteor updates: 
When Meteor comes out with new updates and you update your project to the latest Meteor version please make sure to test the application on a 'staging project' before deploying to your main project. Sometimes there will be new features in Meteor releases that will require us to update our Xervo CLI or Meteor runtime image.  If you run into an error with a new version of Meteor you are testing out, create an issue on our GitHub Meteor build repository.

1. Create a Project

The first step is to create an empty project. This can be done through the web interface or the Xervo command line.  Your meteor app must be using at least Meteor version 1.3.0 for the meteor runtime to work.  The latest version of Meteor is currently 1.4.x.x

Command Line

$ xervo project create
[?] Enter a project name: My Meteor Project

Web Interface


2. Create a Database

Meteor applications require a MongoDB database. Databases can be created through the web interface.

The Databases tab on the User Dashboard allows you to create and view MongoDB databases.

After clicking create, enter a database label and the default user credentials.

Once the database has been created it will display the connection information. This information can be accessed at any time on the database dashboard's administration tab.

3. Make sure you have a package.json file
(Meteor versions 1.4.x.x & later)


Make sure to have a package.json in your project directory.  This is different from the packages.json file.  A meteor package.json should look something like this:
Note: the dependencies listed below are just examples of npm modules one might use.

  "name": "My Meteor Project 1",
  "private": true,
  "mod-project-name": "MeteorProject1",
  "scripts": {
    "start": "meteor run"
  "dependencies": {
    "zombie": "4.2.1",
    "bcrypt": "0.8.7"
  "engines": {
    "node": "4.4.7"

4. Deploy Your Meteor Application

Deploy the Meteor application using the Xervo command line. Make sure to include the node-version flag. (Assuming you are using Meteor 1.4.x.x and make use of Node v4 features.)

$ cd /path/to/app
$ xervo deploy -p ProjectName

The Meteor app is not quite ready yet and the logs will show errors. We have to deploy first in order to receive a URL for Meteor's required environment variables.

5. Setup Your Environment Variables

Using the Xervo CLI or web interface enter the MONGO_URL and ROOT_URL environment variables.

Set the MONGO_URL environment variable to the connection string provided when the DB was created.

  • When you enter your MONGO_URL, remember to replace <username>:<password> with your actual username and password specified when you created the database.
$ xervo env set MONGO_URL \
  "mongodb://user:pass@percy.mongo.xervo.io:27017/8Y4fgyd \

Set the ROOT_URL environment variable to your project's URL. This is displayed at the top of your project dashboard and in the CLI at the end of the deploy.

Make sure you do not have a trailing slash ' / ' at the end of your ROOT_URL environment variable.

$ xervo env set ROOT_URL http://my-meteor-project-9339.app.xervo.io

These can also be set on the project dashboard's administration tab if desired.

Restart the project to pick up the new environment variables.

$ xervo project restart

Your Meteor project is now running. Visit the *.app.xervo.io URL to confirm. At this point you can follow the custom domain and SSL guides to complete your production ready Meteor application.

Deploying New Code

Now that the environment variables are configured correctly, new versions of the application can be deployed at any time by simply re-running the deploy command.

$ xervo deploy -p ProjectName

A Note on OpLog Tailing

With the release of Meteor 0.7.0 a new technique for live updates was introduced that involves inspecting MongoDB's operations log. The Xervo shared MongoDB databases do not currently provide access to the oplog. In order to use oplog tailing with a project hosted on Xervo a dedicated replica set is required. Please contact us for available options and pricing for dedicated MongoDB databases.

Troubleshooting your Meteor App

I'm getting the following when I go to my project URL: 'Unable to Connect to any Application Instances.'
  • This is a message from the load balancer when it does not receive a response from your application. Typically, this either means that your app is running, but is not listening on the right port, or your app is not running correctly. 

1. The first step you should take is to check the project logs.

  • Checking logs can be done from the web dashboard of your project, or the CLI.

2. If you are getting a Mongo auth error then you will want to check your environment variable for MONGO_URL.
Common issues with the MONGO_URL include:

  • incorrect username / password (this can be set from the mongodb web dashboard)
  • having unicode characters in the connection string (or any env var)
  • having '@' or a colon ' : ' in the password or username

3. Your logs show a ROOT_URL issue

  • this is typically due to not having 'http://' before the rest of the project URL.

4. Logs show 'cannot find property 'example' of null'
or 'cannot read property 'example' of undefined'


throw message; 


TypeError: Cannot read property 'done' of null


  • In this case you will want to check all modules which use mongodb, and make sure they are up to date.
  • In similar cases check your configuration for Meteor.  Check your Meteor settings (file or env var)
5. I am getting an 'assertion error'


> meteor-dev-bundle@0.0.0 start /mnt/app/bundle/programs/server
> node ../../main

  throw new assert.AssertionError({
AssertionError: "undefined" === "function"
    at wrapPathFunction (/mnt/app/bundle/programs/server/mini-files.js:77:10)
    at Object.<anonymous> (/mnt/app/bundle/programs/server/mini-files.js:108:24)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)


If you are seeing an error similar to the one shown above, make sure you have your node version specified in your package.json.

$ xervo deploy -p projectName

6. No relevant data is shown in the logs that can help with debugging!
  • Verify the servo size of your project (can be seen in the admin panel of your project dashboard)
  • Check your 'metrics' page of the web dashboard.
  • If you're seeing RAM usage that is high or close (within 50-100MB) of your servo size then you should up your servo size.  The recommended servo size for all meteor projects is a 512MB servo.

Go to top

Contact Us

    Our Support Policy
    Submit a Support Request

  • Public Cloud Support Hours
    9am-5pm EST Mon-Fri
    Outside of these hours response times may be up to 24hrs.

    Submit a support ticket by clicking 'status and support' icon on the left side of this page.

seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found