Hosting multiple apps on Linode with mup


I have successfully used mup to deploy a meteor app to a linode instance. In mup.json I have specified the env{} to have a port of 3000

With a new app, I set the port of 3001 and so adjust my nginx vhost accordingly, but the page gives 502 Bad Gateway. Nginx nginx/1.6.2

Below is the nginx vhost and the mup.json

Any ideas?


server {
  listen                *:80;

  server_name ;

  access_log            /var/log/nginx/;
  error_log             /var/log/nginx/;

  location / {
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header X-Forwarded-For $remote_addr;
// mup.json

  // Server authentication info
  "servers": [
      "host": "",
      "username": "jonwhittlestone",
      // "password": "password"
      // or pem file (ssh based authentication)
      "pem": "~/.ssh/"

  // Install MongoDB in the server, does not destroy local MongoDB on future setup
  "setupMongo": false,

  // WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
  "setupNode": true,

  // WARNING: If nodeVersion omitted will setup 0.10.33 by default. Do not use v, only version number.
  "nodeVersion": "0.10.28",

  // Install PhantomJS in the server
  "setupPhantom": true,

  // Application name (No spaces)
  "appName": "example",

  // Location of app (local directory)
  "app": "/Users/jonwhittlestone/code/example",

  // Configure environment
  "env": {
    "ROOT_URL": "",
    "PORT": "3001", // The port you want to bind to on your server.
    "UPSTART_UID": "jonwhittlestone" // The user you want to run meteor as.

  // Meteor Up checks if the app comes online just after the deployment
  // before mup checks that, it will wait for no. of seconds configured below
  "deployCheckWaitTime": 15

@howapped: I have deployed an app using port 3000 and the setting is pretty much the same as yours.

However, I can only access my website by going to How can I make it accessible by going to (i.e. without specify port 3000 in my URL)

@williams did you specify


and point your dns to your server’s IP? If so nginx should serve your app on

If you’re still having trouble you can try this tool (work in progress) which installs and configures nginx automatically with your deployment.

@hellstad yes I did. I suspect meteor up is not running my meteor app in nginx vhosts.

I go to and check my app and cannot find nginx listed in the tool my website used. Some of my settings, e.g. redirect, is ignored.

I am new to nginx. Do you know how to run Meteor app in nginx vhost?

Thanks folks - I was deploying the site as a holding page, with a view to building on later. I just disabled my need for a database and the problem went away.

@williams kill your meteor app and go to, see if it shows the default nginx page. I think you might not have setup nginx properly.

@hellstad I got the nginx error page if I killed the meteor app.

@hellstad I think I solved the problem by changing the UPSTART_UID to “root”.

I’d like to try this. Can you share your experience further, please?