Jeremy H.
Jeremy H.

Reputation: 523

Error loading rsa private key - MUP to Deploy Meteor App at Digital Ocean w/SSL

I have a Meteor app I am deploying to a Digital Ocean Ubuntu server via MUP. It works great without SSL, but I can't figure out the SSL part.

I Purchased a Comodo SSL Cert. They sent me 4 .crt files. I can the following command:

cat cert1.crt cert2.crt cert3.crt mydomain.crt > ssl.pem

I then put that ssl.pem file in the root directory locally. Added "ssl": {"pem":"./ssl.pem"} to my mup.json file and ran mup setup -- everything is succesful until:

[45.55.225.190] x Verifying SSL Configurations (ssl.pem): FAILED
    -----------------------------------STDERR-----------------------------------
    Trying to initialize SSL contexts with your certificatesError loading rsa private key
    -----------------------------------STDOUT-----------------------------------
    ----------------------------------------------------------------------------

I'm not even sure how to troubleshoot this. I ran a quick find on the server and the ssl.pem is there, so mup successfully sent the file over, but it seems stud is not verifying the file or not finding it?

Upvotes: 3

Views: 477

Answers (1)

Jeremy H.
Jeremy H.

Reputation: 523

Turns out I was running into two different problems. First, you have the put the certificate files in a very specific order. Second, I was not including my key file. The command to create the .pem file needed was:

cat mydomain.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt mydomain.nopass.key > ssl.pem

This blog post at DeveloperSide.NET helped me tremendously.

Upvotes: 6

Related Questions