Unable to deploy with mup and SSL

I have a digital ocean droplet. I want to access my meteor app through https.
I use mup to deploy it. It worked fine for http but it doesn’t work for https at all, and I’ve been struggling all day.
I’m using force-ssl and a certificate from letsencrypt.
I simply get a message that this webpage is not available.

The main problem may be that I’m also running Wordpress on this site. So I need to run the meteor app at a different port (8001), see below.

This is my mup.json file:

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

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

  // 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.36 by default. Do not use v, only version number.
  "nodeVersion": "0.10.40",

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

  // Show a progress bar during the upload of the bundle to the server. 
  // Might cause an error in some rare cases if set to true, for instance in Shippable CI
  "enableUploadProgressBar": true,

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

  // Location of app (local directory)
  "app": ".",

  // Configure environment
  "env": {
    "ROOT_URL": "https://appx.xxx.com",
    "PORT": 8001

  "ssl": {
    "pem": "./ssl.pem"
//    "backendPort": 8001

  // 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

Any ideas will be much appreciated!!

I’m running apache on the production server. But I should still be able to access the meteor app directly as:

https://appx.xxx.com:8001 - based on the above but it just doesn’t work.

The browser says “This webpage is not available”.
Another browser says: The connection to appx.xxx.com:8001 was interrupted while the page was loading.
Internet Explorer says: This page can’t be displayed

Just to be clear, are you using Mup or MupX?

I’ve had much more success with stable deployments using MupX, including w/ SSL.

@xauxatz I believe with mup the SSL terminator is configured to run on port 443. Using the “backendPort” option doesn’t change this (it changes which port the SSL terminator should connect to internally to reach your Meteor app). Is your WP site using the default SSL port of 443? If not I’d recommend testing things out by re-enabling the “backendPort” option of 8001 and then trying to access your site at https://appx.gugalerts.com.

As @adamsidiali mentioned though, you really should look into using mupx for this (if your hosting requirements allow it).

1 Like

I use mup because mupx doesn’t support the ssl.pem format that I used in the conf file as generated by letsencrypt - at least as far as I know…

My wp install is not using port 443 so there should be no conflict.

I unfortunately already tried using backendPort without success.

You can actually use MupX w/ LetsEncrypt like this:

  "ssl": {
    "certificate": "./fullchain.pem",
    "key": "./privkey.pem"

Definitely not clearly documented, took me a while to figure out how to use the keys from letsencrypt…

1 Like

Thanks to everyone and especially adamsidiali.
I got it working with mupx!

1 Like